This content has been marked as final.
Show 3 replies
-
1. Re: How to acess Web service with complex parameters without
acxjbertr Jun 21, 2006 11:06 AM (in response to tnfink)If your jaxrpc-mapping document is in your classpath then you can just do a getResource() on it and then pass it into the createService() method (since it is overloaded). Here is an example:
URL wsdlLocation = new URL("http://localhost:8080/testpurchaseservice?wsdl"); URL mappingLocation = cl.getResource("jaxrpc-mapping.xml"); QName serviceName = new QName("http://de.akquinet.fws.jboss.webservices.pojo/purchasews/rpcstyle", "PurchaseService"); ServiceImpl service = (ServiceImpl) factory.createService(wsdlLocation, serviceName, mappingLocation);
-
2. Re: How to acess Web service with complex parameters without
acxjbertr Jun 21, 2006 11:28 AM (in response to tnfink)Oops. I forgot to include a couple of lines in the example. Try this:
ServiceFactoryImpl factory = new ServiceFactoryImpl(); ClassLoader cl = Thread.currentThread().getContextClassLoader(); URL wsdlLocation = new URL("http://localhost:8080/testpurchaseservice?wsdl"); URL mappingLocation = cl.getResource("jaxrpc-mapping.xml"); QName serviceName = new QName("http://de.akquinet.fws.jboss.webservices.pojo/purchasews/rpcstyle", "PurchaseService"); ServiceImpl service = (ServiceImpl) factory.createService(wsdlLocation, serviceName, mappingLocation);
Also, you will need these imports as the Service from javax.xml.rpc does not have the right, overloaded method.import org.jboss.ws.jaxrpc.ServiceFactoryImpl; import org.jboss.ws.jaxrpc.ServiceImpl;
-
3. Re: How to acess Web service with complex parameters without
acxjbertr Jun 21, 2006 11:37 AM (in response to tnfink)PS - This is mentioned in the JBossWS User Guide (http://labs.jboss.com/portal/jbossws/user-guide/en/html/clients.html) in section 5.2 ("Dynamic Invocation Interface").