You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Christopher Cheng <ch...@gmail.com> on 2008/12/16 16:38:52 UTC

problem changing endpoint address from https to http

I was trying to change the endpoint address from a https address to http
address

endpointAddress = http://webservices.mydomain.com/websrc;
SessionCreateRQService service = new SessionCreateRQService();
SessionCreatePortType port = service.getSessionCreatePortType();
Map<String, Object> requestContext =
((BindingProvider)port).getRequestContext();
requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
endpointAddress);


CXF produces an error like this. What am I missing?

Caused by: java.io.IOException: Illegal Protocol http for HTTPS
URLConnection Factory.
 at
org.apache.cxf.transport.https.HttpsURLConnectionFactory.createConnection(HttpsURLConnectionFactory.java:124)
 at org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:482)
 at
org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:46)
 ... 14 more

Re: problem changing endpoint address from https to http

Posted by Daniel Kulp <dk...@apache.org>.
You'll probably need to do:

Client cl = ClientProxy.getClient(port);
(HttpConduit)cl.getConduit()).setTlsClientParameters(null);

to make sure the TLS stuff is all reset to nothing and force re-initializing 
the conduit as a non-tls conduit.

Dan


On Tuesday 16 December 2008 10:38:52 am Christopher Cheng wrote:
> I was trying to change the endpoint address from a https address to http
> address
>
> endpointAddress = http://webservices.mydomain.com/websrc;
> SessionCreateRQService service = new SessionCreateRQService();
> SessionCreatePortType port = service.getSessionCreatePortType();
> Map<String, Object> requestContext =
> ((BindingProvider)port).getRequestContext();
> requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
> endpointAddress);
>
>
> CXF produces an error like this. What am I missing?
>
> Caused by: java.io.IOException: Illegal Protocol http for HTTPS
> URLConnection Factory.
>  at
> org.apache.cxf.transport.https.HttpsURLConnectionFactory.createConnection(H
>ttpsURLConnectionFactory.java:124) at
> org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:482) at
> org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSe
>nderInterceptor.java:46) ... 14 more



-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog