Previous article we have learned how to use Java Tools MyEclipse development of a WebService interface, then the interface developed how to call? Then we'll solve the problem.
1: Start by creating a Java project to select--new Webservice Client
2: Select Jax-WS, Next
3: Write the test address of the interface inside the WSDL URL
↓ Next WSDL validation unexpectedly error, how to solve please look down
Change localhost IP address to host
Next, OK passes validation
The client will default to us to select the package to import
5: Client configuration is complete, test the calling interface class, create a main method in client project to test, the code is as follows
public static void Main (string[] args) {
TODO auto-generated Method Stub
Operatorinfoservice os=new Operatorinfoservice ();
Os.getoperatorinfoport (). AddUser (888, "King");
}
Look at the effect--------------------------------------we found that the record with UserID 888 in the database was added, A call to add a user interface has been completed-------------------------------------------------------
Develop a program that invokes the WebService interface using MyEclipse