Hi,
I have a CXF client (2.2.0) with generated stubs from wsdl that sits
behind a squid proxy. I have made the proxy configuration in cxf.xml as
below.
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
xsi:schemaLocation="http://cxf.apache.org/transports/http/configuration
http://cxf.apache.org/schemas/configuration/http-conf.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<http-conf:conduit name="*.http-conduit">
<http-conf:client Connection="Keep-Alive"
ProxyServer="10.167.1.218"
ProxyServerPort="3128"
AllowChunking="false"
AutoRedirect="true"/>
<http-conf:tlsClientParameters secureSocketProtocol="SSL">
</http-conf:tlsClientParameters>
</http-conf:conduit>
</beans>
The problem is that the client tries to download the wsdl at runtime not
using the proxy, when this fails I get a WSDL Parse error. If I open upp
access without proxy server it works ok. I can then see that the wsdl is
downloaded and then the webservice call is done through the proxy.
1, why is the wsdl dowloaded at runtime when I generated stubs from the
wsdl. Is there an option to wsdl2java that prevents this ?
2, if I have proxy settings, shouldn't they be used also when the client
tries to download the wsdl and not only for weservice calls ?
The webservice uses SSL i.e. https.
I have tried and specified a file URL to the WSDL in my Java code and
placed a copy of the wsdl locally on the server. This works ok but it's
not how I would have liked to solve it.
File f = new File("c:\\sample.wsdl");
Sample_Service service = new Sample_Service(
f..toURI().toURL());
port = service.getSampleHttpPort();
Client client = ClientProxy.getClient(port);
client.getRequestContext().put(
BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
"https://sample.url/SampleService");
Any input is appreciated.
Jens