Use the JDK's own command Wsimport to parse the WSDL document

Source: Internet
Author: User
Tags wsdl

Generate client code to access WebService with tool Wsimport

Wsimport Location:

C:\Program Files\java\jdk1.8.0\bin

wsimport-d D:/webservice-keep http://192.168.1.131:8080/BillingSystem/ com.mobile263.billing.webservices.service.eswebservice?wsdl

Command parameter Description:

-keep: Whether to generate Java source files

-d: Specify Output directory

-S: Specify Source code output directory

-P: Generating files in package form

-verbose: Display output information in console other command parameters please refer to: http://download-llnw.oracle.com/javase/6/docs/technotes/tools/share/wsimport.html

Calling code:

public class TestClient {public
	static void Main (string[] args) {
		Eswebserviceimplservice service = new Eswebserv Iceimplservice ();
		Eswebservice  eswebservice = Service.geteswebserviceimplport ();
		Stringarray sa= eswebservice.querysjlist ("17091234567", 20140212151617l, 20140212151690l, "SJ");
		System.out.println (Sa.getitem ());
	}
}

The return data is an array of strings:

[{"AreaCode": "010       ", "Roamtype": "3", "Gloalroamcost": "1234567890                      ", "Upperflow": 123456789012345, "Downflow ": 123456789012345," Billingnumber ":" 17091234567             "," StartTime ":" 20140212151621 "," IMSI ":" 460014890228030 "," EndTime ":" 20140212151622 "}, {" AreaCode ":" 010       "," Roamtype ":" 0 "," gloalroamcost ":" 1234567890                      "," Upperflow " : 123456789012345, "Downflow": 123456789012345, "Billingnumber": "17091234567             ", "StartTime": "20140212151617", " IMSI ":" 460014890228030 "," EndTime ":" 20140212151618 "}, {" AreaCode ":" 010 "       ," Roamtype ":" 3 "," Gloalroamcost ":" 1234567890                      "," Upperflow ": 123456789012345," Downflow ": 123456789012345," Billingnumber ":" 17091234567             "," StartTime ":" 20140212151619 "," IMSI ":" 460014890228030 "," EndTime ":" 20140212151620 "}]





Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.