cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tomas Olsson <...@sics.se>
Subject Dynamic clients
Date Fri, 25 Mar 2011 13:09:08 GMT
Hi,
I have stumbled on this annoying problem (CXF 2.3.2), if I want to 
create two dynamic clients like this:

JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
deviceClient1 = dcf.createClient(wsdlURL1);
deviceClient2 = dcf.createClient(wsdlURL2);

But only the first one will work properly. When I call the second one it 
does not find the generated classes (the same if I shift their creation 
order, the last created will not work properly). I believe the problem 
can be due to both having the same namespace. Part of the exception below:

WARNING: Interceptor for 
{http://tempuri.org/}BasicSwitchWS#{http://tempuri.org/}GetSwitchStatus 
has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Marshalling Error: 
org.tempuri.GetSwitchStatus is not known to this context
     at 
org.apache.cxf.jaxb.JAXBEncoderDecoder.marshall(JAXBEncoderDecoder.java:256)
     at org.apache.cxf.jaxb.io.DataWriterImpl.write(DataWriterImpl.java:169)
     at 
org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:110)
     at 
org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68)
     at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
     at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516)

Is there any workaround? I cannot change their namespaces.

/Tomas



Mime
View raw message