You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Steven Thein <st...@oracle.com> on 2009/12/16 20:08:14 UTC

Exception when decrypting response message body....

Hi all,

                I had a Web Services configured to accept encrypted request and send back encrypted response. When the response is send back to the client I got the following exception. I thought that it might caused by schema validation, so took it out, but I got a different exception included down below.

What could have cause this?

 

Thanks

Steve

 

org.apache.cxf.interceptor.Fault: Unmarshalling Error: cvc-elt.1: Cannot find the declaration of element 'CreateUsersResponse'. 

      at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:764)

      at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:623)

      at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:128)

      at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:101)

      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)

      at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:671)

      at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2177)

      at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2057)

      at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1982)

      at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)

      at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:637)

      at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)

      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)

      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:483)

      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:309)

      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:261)

      at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)

      at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)

 

 

 

Exception after I took out schema validation:

 

org.apache.cxf.interceptor.Fault: Unmarshalling Error: unexpected element (uri:"", local:"Return"). Expected elements are <{http://xmlns.oracle.com/Primavera/P6/V7/WS/User}Return> 

    at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:764)

    at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:623)

    at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:128)

    at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:101)

    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)

    at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:671)

    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2177)

    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2057)

    at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1982)

    at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)

    at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:637)

    at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)

    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)

    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:483)

    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:309)

    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:261)

    at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)

    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)

    at $Proxy41.deleteUsers(Unknown Source)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    at java.lang.reflect.Method.invoke(Method.java:597)

    at com.primavera.wsclient.helper.CRUDHelper.callWSDelete(CRUDHelper.java:434)

 

 

 


Re: Exception when decrypting response message body....

Posted by Daniel Kulp <dk...@apache.org>.
Both are related.   The details of the returned fault are apparently not 
matching the schema defined in the wsdl.    It LOOKS like JAXB/CXF is 
expecting the elements in the detail of the fault to be qualified, but the 
fault on the wire has them unqualified.    Can you capture the fault from the 
log and see what it looks like?

Dan



On Wed December 16 2009 2:08:14 pm Steven Thein wrote:
> Hi all,
> 
>                 I had a Web Services configured to accept encrypted request
>  and send back encrypted response. When the response is send back to the
>  client I got the following exception. I thought that it might caused by
>  schema validation, so took it out, but I got a different exception
>  included down below.
> 
> What could have cause this?
> 
> 
> 
> Thanks
> 
> Steve
> 
> 
> 
> org.apache.cxf.interceptor.Fault: Unmarshalling Error: cvc-elt.1: Cannot
>  find the declaration of element 'CreateUsersResponse'.
> 
>       at
>  org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:
> 764)
> 
>       at
>  org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:
> 623)
> 
>       at
>  org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:128)
> 
>       at
>  org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLitera
> lInInterceptor.java:101)
> 
>       at
>  org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorCha
> in.java:236)
> 
>       at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:671)
> 
>       at
>  org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRespon
> seInternal(HTTPConduit.java:2177)
> 
>       at
>  org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRespon
> se(HTTPConduit.java:2057)
> 
>       at
>  org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPCo
> nduit.java:1982)
> 
>       at
>  org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
> 
>       at
>  org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:637)
> 
>       at
>  org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInt
> erceptor.handleMessage(MessageSenderInterceptor.java:62)
> 
>       at
>  org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorCha
> in.java:236)
> 
>       at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:483)
> 
>       at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:309)
> 
>       at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:261)
> 
>       at
>  org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> 
>       at
>  org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
> 
> 
> 
> 
> 
> 
> 
> Exception after I took out schema validation:
> 
> 
> 
> org.apache.cxf.interceptor.Fault: Unmarshalling Error: unexpected element
>  (uri:"", local:"Return"). Expected elements are
>  <{http://xmlns.oracle.com/Primavera/P6/V7/WS/User}Return>
> 
>     at
>  org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:
> 764)
> 
>     at
>  org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:
> 623)
> 
>     at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:128)
> 
>     at
>  org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLitera
> lInInterceptor.java:101)
> 
>     at
>  org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorCha
> in.java:236)
> 
>     at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:671)
> 
>     at
>  org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRespon
> seInternal(HTTPConduit.java:2177)
> 
>     at
>  org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRespon
> se(HTTPConduit.java:2057)
> 
>     at
>  org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPCo
> nduit.java:1982)
> 
>     at
>  org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
> 
>     at
>  org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:637)
> 
>     at
>  org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInt
> erceptor.handleMessage(MessageSenderInterceptor.java:62)
> 
>     at
>  org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorCha
> in.java:236)
> 
>     at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:483)
> 
>     at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:309)
> 
>     at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:261)
> 
>     at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> 
>     at
>  org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
> 
>     at $Proxy41.deleteUsers(Unknown Source)
> 
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 
>     at
>  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> 39)
> 
>     at
>  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm
> pl.java:25)
> 
>     at java.lang.reflect.Method.invoke(Method.java:597)
> 
>     at
>  com.primavera.wsclient.helper.CRUDHelper.callWSDelete(CRUDHelper.java:434)
> 

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