I want to grab public data platform of Shanghai recorded data of traffic accident, the given interface service http://180.168.211.29:8080/jxwjk/services/JXWJK? platform WSDL
I am using myeclipse10 to create a web service client, the code is as follows:
package gov. Gongan. JXW. Client;
The import java.net.MalformedURLException;
The import gov. Gongan. JXW. Services. JxwjkService;
Import org. Codehaus. Client. Client. XFireProxyFactory;
Import org. Codehaus. Client. The service. The service;
Import org. Codehaus. Client. Service. Binding. ObjectServiceFactory;
Public class JxwjkClient {
/* *
* @ param args
*/
Public static void main (String [] args) {
String serviceURL="http://180.168.211.29:8080/jxwjk/services/JXWJK";
Service serviceModel=new ObjectServiceFactory ()
The create (JxwjkService. Class);
XFireProxyFactory serviceFactory=new XFireProxyFactory ();
JxwjkService service=null;
Try {
Service=(JxwjkService) serviceFactory. Create (
(org. Codehaus. Client. Service. Service) serviceModel,
ServiceURL);
String XMLS=service. GetAcdFile (" 1010 ", "50", "four putuo branch of traffic police detachment");
System. The out. Println (XMLS);
} the catch (MalformedURLException e) {
e.printStackTrace();
}
}
}
But always hint at the front of the several errors of the Import pack, a few libraries can't find the exit, seek advice, in addition, after input while creating the client interface address, add a lot of local service related library but JxwjkService also said can't find
CodePudding user response:
You have a look at your local maven repository warehouse inside the folder path (according to the path for gov. Gongan. JXW) is there somethingCodePudding user response:
Should be a jar can't find itCodePudding user response:
To maven site search client from client - all choose the latest version in 2007 (the latest version is also very old)https://mvnrepository.com/artifact/org.codehaus.xfire/xfire-all/1.2.6
https://repo1.maven.org/maven2/org/codehaus/xfire/xfire-all/1.2.6/xfire-all-1.2.6.jar
JxwjkService this was developed by your partner, or government. Your work Ann
Gov. Gongan. JXW. Services. JxwjkService;
You have a problem doing web service client technical framework ah, how to use given anything so old
CodePudding user response:
Tianfang