Which "DynamicClientFactory" are you using? If you aren't using the JaxWsDynamicClientFactory, give that a try. The non-jaxws version has a bunch of restrictions related to the wrappers that may be kicking in here.
Dan On Tuesday, April 26, 2011 10:33:55 AM srinivas thallapalli wrote: > Hi All, > > I was trying to invoke a webservice with CXF client using dynamic client > approach but failing with following exception > > Exception in thread "main" java.lang.RuntimeException: > org.apache.cxf.binding.soap.SoapFault: Unmarshalling Error: cvc-elt.4.3: > Type 'xs:string' is not validly derived from the type definition, > 'getAlertDataRequest', of element 'ns2:getAlertDataRequest'. > > Caused by: org.apache.cxf.binding.soap.SoapFault: Unmarshalling Error: > cvc-elt.4.3: Type 'xs:string' is not validly derived from the type > definition, 'getAlertDataRequest', of element 'ns2:getAlertDataRequest'. > at > org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalF > ault(Soap11FaultInInterceptor.java:75) at > org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMess > age(Soap11FaultInInterceptor.java:46) at > org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMess > age(Soap11FaultInInterceptor.java:35) at > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai > n.java:243) at > org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(Ab > stractFaultChainInitiatorObserver.java:99) at > org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage > (CheckFaultInterceptor.java:69) at > org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage > (CheckFaultInterceptor.java:34) at > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai > n.java:243) at > org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:672) at > org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRespons > eInternal(HTTPConduit.java:2254) at > org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRespons > e(HTTPConduit.java:2134) at > org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPCon > duit.java:1988) at > org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputSt > ream.java:47) at > org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188) at > org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66) at > org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:639) at > org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInte > rceptor.handleMessage(MessageSenderInterceptor.java:62) at > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai > n.java:243) at > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:484) at > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:310) at > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:262) at > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:282) at > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:268) > > > > However the webservice invocation is fine with soapUI. > > On investigation I found that, the request (soap) message sent was not > correct: > > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> > > <soap:Body> > > <ns2:getAlertDataRequest xmlns:ns2="http://ws.alerts.sbm.savvion.com/" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string"> > > ebms > > </ns2:getAlertDataRequest> > > </soap:Body> > > </soap:Envelope> > > > > Instead it should be: > > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> > > <soap:Body> > > <ns2:getAlertDataRequest xmlns:ns2="http://ws.alerts.sbm.savvion.com/" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string"> > > <user>ebms</user> > > </ns2:getAlertDataRequest> > > </soap:Body> > > </soap:Envelope> > > > I am not able to findout, why CXF client request message does not contain > <user> </user> inside </ns2:getAlertDataRequest>. > > Any help appreciated. > > Thanks > > -- > View this message in context: > http://cxf.547215.n5.nabble.com/Problem-with-CXF-tp4341066p4341066.html > Sent from the cxf-user mailing list archive at Nabble.com. -- Daniel Kulp [email protected] http://dankulp.com/blog Talend - http://www.talend.com
