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 "}]