I generated Java files from WSDL with WSDL2Java converter, but I don't know how can I use service with these files, because there are no examples. I'm implementing client side.
解决方案
Regarding Axis2: read these these links they contain some examples:
EDIT: Regarding Axis1: it is based on JAX-RPC and you need to instantiate stub object or use service locator to get stub instance and all WS operations will be in that. An example is given here:
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);
}
}
这篇博客介绍了如何在客户端实现服务调用,针对Axis2和Axis1提供了详细的步骤。对于Axis2,建议查阅相关链接中的示例;而对于Axis1,通过实例展示了如何实例化Stub对象或使用ServiceLocator获取Stub并执行Web服务操作。
804

被折叠的 条评论
为什么被折叠?



