new*_*bie 24 java axis wsdl2java
我使用WSDL2Java转换器从WSDL生成Java文件,但我不知道如何使用这些文件的服务,因为没有示例.我正在实施客户端.
And*_*ich 10
关于Axis2:阅读这些链接,它们包含一些例子:
http://ws.apache.org/axis2/1_5_1/quickstartguide.html#clients
http://ws.apache.org/axis2/1_0/userguide3.html
编辑:关于Axis1:它基于JAX-RPC,您需要实例化存根对象或使用服务定位器来获取存根实例,并且所有WS操作都将在其中.这里给出一个例子:
public class Tester {
public static void main(String [] args) throws Exception {
// Make a service
AddressBookService service = new AddressBookServiceLocator();
// Now use the service to get a stub which implements the SDI.
AddressBook port = service.getAddressBook();
// Make the actual call
Address address = new Address(...);
port.addEntry("Russell Butek", address);
}
}
Run Code Online (Sandbox Code Playgroud)