Not sure if this is helpful, but...

I had a similar problem  wherein the client app would retrieve the WSDL via 
https protocol, but CXF would generate the soap address location with an http 
protocol. So, whenever I would execute a web service operation, based on this 
wsdl, it would have a fit because my requests were https and it was expecting 
http. After talking to Dan Diephouse about this, he told me I could override 
this by explicitly setting the web services endPoint URI. That solved it for 
me. In my situation, CXF was not detecting the incoming protocol correctly 
because the https request hit the load balancer which in turn passed the 
request to the server via http protocol. So, CXF generated the wsdl with an 
endpoint of http and wouldn't recognize/accept in coming operation calls using 
https.

R. Grimes


-----Original Message-----
From: Alp Timurhan Çevik [mailto:[email protected]] 
Sent: Thursday, February 26, 2009 3:45 PM
To: [email protected]
Subject: HTTP-HTTPS trouble

Hello,

I am experiencing a difficulty with HTTP-HTTPS.

I am calling some web services, which have both HTTP and HTTPS endpoints on the 
test system. I would like to call both protocols, based on a parameter supplied 
from the data, which is supplied before calling the web service.

I was happily able to do that, until I started using 1.6.0.11. I was using
1.6.0.6 or smth previously. As soon as I started using v11, I received an 
exception. Googling it out, I found out that the problem was due to some web 
service method changes, introduced in 1.6.0.10, thus I needed to use cxf 
version > 2.1. No big deal, downloaded 2.1.4 and started working with it, as I 
have some thin clients that have some roms which have only v11.

After starting to use jre 1.6.0.11 and cxf 2.1.4, I started receiving another 
exception, which is,

java.io.IOException: Illegal Protocol http for HTTP URLConnection Factory.

I had setup

http.setTlsClientParameters(new TLSClientParameters()); 
http.getTlsClientParameters().setSecureSocketProtocol("SSL");
http.getTlsClientParameters().setDisableCNCheck(true);
http.getTlsClientParameters().setTrustManagers(getDummyTrustManager());

previously, prior to changing the jre.

Googling out the exception,

http.getTlsClientParameters().setSecureSocketProtocol("SSL");

was the required row, but I already had it running.

So searching some more, I came across some article stating that the wsdl adress 
should include https if I needed to call https adresses. I have some 50 wsdls 
to connect to, but I have changed the location parameter in wsdls using some 
ant scripting. I was able to call https later on, but unable to call http, 
receiving

java.io.IOException: Illegal Protocol http for HTTPS URLConnection Factory.

now.

What I need is something that can change the urlconnectionfactory after 
instantiation, not only at the time of reading the wsdl.

Tried to use JaxWsClientProxyBean, but was not very successful, as I need 
tlsclientparameters and also some other parameters, and also I need the adress 
from the original wsdl, which I later modify according to the protocol 
requested.

Thanks a lot for your time,
Alp

Reply via email to