You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "Manolescu, Radu (IT)" <Ra...@MorganStanley.com> on 2008/08/14 18:32:20 UTC

CXF Server & Client | Same JRE | Config Conflict

We are writing a program which is a CXF server on one side, and a client
to other services on another side.
We have successfully implemented the server and the client separately,
but we cannot bring them together in one JRE, because of configuration
conflicts.
 
 
Our CXF server faces a C# GUI and communicates with it via SOAP
messages. This works in a prototype.
The server needs to interact with some outside services for information.
We have successfully tested prototype clients for those services.
However, when we integrate the two, we find that the client becomes
unable to communicate to the outside services.
The exception being thrown is shown below. We believe that this means
that the conduit definition is not being found, and this raises the
question of which config file it should be in.
 

	Caused by: java.io.IOException: Illegal Protocol https for HTTP
URLConnection Factory.

	at
org.apache.cxf.transport.http.HttpURLConnectionFactoryImpl.createConnect
ion(HttpURLConnectionFactoryImpl.java:44)

	at
org.apache.cxf.transport.http.MSHTTPConduit.prepare(MSHTTPConduit.java:4
25)

	at
org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(Messag
eSenderInterceptor.java:46)

	... 37 more

	 

Does anyone have any experience with running a CXF service and client in
the same JRE?
 
Thanks,
 
 
Radu Manolescu
Morgan Stanley | Technology
2000 Westchester Ave, 1st Floor | Purchase, NY  10577
--------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.

Re: CXF Server & Client | Same JRE | Config Conflict

Posted by Daniel Kulp <dk...@apache.org>.
You really have a couple of options:

1) Merge the client and server configurations into the same spring config.   
The same bus could be used then.

2) Use a seperate bus for the client.   This is quite a bit trickier.  Before 
you create you client, you would need to do a:
Bus origBus = BusFactory.getThreadDefaultBus();
Bus bus = SpringBusFactory.createBus("url/to/config.file");
BusFactory.setThreadDefaultBus(bus);
and after word set it back to the origBus.

Dan



On Thursday 14 August 2008 12:32:20 pm Manolescu, Radu (IT) wrote:
> We are writing a program which is a CXF server on one side, and a client
> to other services on another side.
> We have successfully implemented the server and the client separately,
> but we cannot bring them together in one JRE, because of configuration
> conflicts.
>
>
> Our CXF server faces a C# GUI and communicates with it via SOAP
> messages. This works in a prototype.
> The server needs to interact with some outside services for information.
> We have successfully tested prototype clients for those services.
> However, when we integrate the two, we find that the client becomes
> unable to communicate to the outside services.
> The exception being thrown is shown below. We believe that this means
> that the conduit definition is not being found, and this raises the
> question of which config file it should be in.
>
>
> 	Caused by: java.io.IOException: Illegal Protocol https for HTTP
> URLConnection Factory.
>
> 	at
> org.apache.cxf.transport.http.HttpURLConnectionFactoryImpl.createConnect
> ion(HttpURLConnectionFactoryImpl.java:44)
>
> 	at
> org.apache.cxf.transport.http.MSHTTPConduit.prepare(MSHTTPConduit.java:4
> 25)
>
> 	at
> org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(Messag
> eSenderInterceptor.java:46)
>
> 	... 37 more
>
>
>
> Does anyone have any experience with running a CXF service and client in
> the same JRE?
>
> Thanks,
>
>
> Radu Manolescu
> Morgan Stanley | Technology
> 2000 Westchester Ave, 1st Floor | Purchase, NY  10577
> --------------------------------------------------------
>
> NOTICE: If received in error, please destroy and notify sender. Sender does
> not intend to waive confidentiality or privilege. Use of this email is
> prohibited when received in error.



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