Now that he is a moderately cerebral disabled patient, he has lost his memory and everything. The bigger reason is that he is getting more and more lazy. No nonsense, let's watch it next time.
Open Eclipse (not My Eclipse) and create a new Java project;
2. After creating a new Java project, create a new Web Service Client in this project;
3. Enter the wsdl address provided by the Web Service server and click next;
4. Select the package where the generated client code is stored;
5. Create a new test class, the class example is as follows:
- import java.rmi.RemoteException;
- publicclass Test {
- /**
- * Use axis to call webservice instance
- * @param args
- */
- publicstaticvoid main(String[] args) {
- try {
- //Replace with the corresponding proxy class
- QueryValidatorServicesProxy proxy = new QueryValidatorServicesProxy();
- proxy.setEndpoint( "WSDL address provided by web service" );
- //Replace to get the corresponding serice
- QueryValidatorServices service = proxy.getQueryValidatorServices();
- //Call the method provided by the web service
- String result = service.querySingle("id5", "******", "XXXX", "XX,XXXXXX");
- System.out.println(result);
- } catch (RemoteException e) {
- e.printStackTrace ();
- }
- }
- }