CXF Gurus,

I can write a web client that can communicates with a secure web
service using authentication:
fooWebServiceUrl =
"https://example.com:8443/webapp/fooWebService?wsdl<https://exampel.com:8443/webapp/fooWebService?wsdl>
";
fooWebService_ss = new FooWebService_Service();
fooWebService_ss.addPort(FooWebService_Service.FooWebServiceImplPort,
                         javax.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING,
                         fooWebServiceUrl);
fooWebService = fooWebService_ss.getPort(
                         FooWebService_Service.FooWebServiceImplPort,
                          FooWebService.class);

After this I get an http conduit, from fooWebService, and configure
authentication and tls. However, this above code assumes that the WSDL
exists on the file system. That is, by default this line:
fooWebService_ss = new FooWebService_Service();

will look for the WSDL, where the wsdl2java command found the wsdl.

What if I want to retrieve the WSDL from the URL as follows:
 fooWebService_ss = new FooWebService_Service(new URL(fooWebServiceUrl));

This won't work, as written, because there is no authentication or tls
configured at the time the WSDL is retrieved.

How can this be done? Is it even possible?

tia,
rouble

Reply via email to