[jboss-user] [JBossWS] - Possible to use a JSR 109 Client with a custom soap address
sappenin
do-not-reply at jboss.com
Fri Aug 4 14:40:21 EDT 2006
Is it possible to use a JSR 109 client with a locally packaged wsdl file (i.e., META-INF/Service.wsdl), yet override the soap:address that the ServiceFactory uses?
I basically want to call a web-service at a URL that I specify at runtime.
In the JbossWS user guide, it appears that I can do this using an unconfigured DII client (http://labs.jboss.com/portal/jbossws/user-guide/en/html_single/index.html#dii-clients) . But I'd like to do this with a JSR 109 client.
It appears that I can change the published wsdl location using a JSR109 client, per the following code:
| ServiceFactoryImpl factory = (ServiceFactoryImpl) ServiceFactory.newInstance();
| ClassLoader cl = Thread.currentThread().getContextClassLoader();
| URL wsdlLocation = cl.getResource("Service.wsdl");
| URL mappingLocation = cl.getResource("jaxrpc-mapping-client.xml");
| QName serviceName = new QName(SERVICE_NAMESPACE, ENDPOINT_SERVICE_NAME);
| ServiceImpl service = (ServiceImpl) factory.createService(wsdlLocation, serviceName, mappingLocation);
|
| ServiceMetaData data = service.getServiceMetaData();
| data.setWsdlPublishLocation()
|
|
But I don't want to change the location that the Service looks to for the WSDL. I actually want my JSR109 client use a runtime defined soap:address.
Is this possible?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963295#3963295
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963295
More information about the jboss-user
mailing list