Use tools: eclipse Standard Edition, without any plug-ins.
Procedure:
XxxxLocator service = java.net. URL url = java.net. URL ("URL? WSDL "xxxxStub stub = String x2 = stub. sendMessageFunction ("String", "String" }}} new test class
Extension:
In fact, you can not only create a java project, but also create a Dynamic Web Project, but more people use it for the C/S architecture;
Attached to the previous article about various WebServices: Summary of various methods for java to call webService
Postscript:
I have read a lot of information online, but I have limited capabilities and various frameworks. If there is a problem or not, the following reasons may occur:
XFire: In eclipse plugin, xfire prompts "UnsupportedOperationException ()" exception in the xxxxImpl class. As a result, the progress is changed for half a day without any progress!
CXF: After using Apache's latest CXF2.7.6 and getting started with wsdl2java. bat,
Cmd to the bat file directory
Run: set JAVA_HOME = "E: \ Progra ~ 1 \ Java \ jdk1.7.0 _ 05"
Run: call wsdl2java. bat "URL? Wsdl"
In this way, the java code of the webservice client can be automatically generated, !, "WSDLToJava Error: Rpc/encoded wsdls are not supported with CXF ";
Axis: SAOP: Now let's look at the Axis1.x and Axis2.x examples!
It's easy to learn.