Hi again,
By furthur investigation I am quite sure that the reason that my setup does not work is because of the namespace-package mapping. So, how do I change the JAXB default package name for the JaxWsDynamicClientFactory? I suspect it is in JAXB context properties but I do not know how to do that.

/Tomas

On 3/25/11 2:09 PM, Tomas Olsson wrote:
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



Reply via email to