cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Venkatasrinath Yelchuru (JIRA)" <>
Subject [jira] [Commented] (CXF-5427) set-jaxb-validation-event-handler=false not working when fault message is changed.
Date Mon, 29 May 2017 11:53:04 GMT


Venkatasrinath Yelchuru commented on CXF-5427:

I notice this issue in 3.1.11 version.
can some one tell me how to resolve this Issue ?



> set-jaxb-validation-event-handler=false not working when fault message is changed.
> ----------------------------------------------------------------------------------
>                 Key: CXF-5427
>                 URL:
>             Project: CXF
>          Issue Type: Bug
>          Components: JAXB Databinding
>    Affects Versions: 2.6.2
>         Environment: CXF 2.6.2, JAXB2.2.4
>            Reporter: Pranab Baishya
>            Assignee: Daniel Kulp
>              Labels: patch
>             Fix For: 2.7.9, 3.0.0-milestone2
> Hello,
> We have a requirement to consumed web services for non-breaking changes in the producer
web services so that we need not generate/ recompile CXF generated clients code every time
for some non breaking changes in the Web service producer/server.
> The changes that can happen in the producer web services or server are as follows:
> 1.Changes to the Data Structures such as addition of a new element at the end for both
inbound and outbound messages.
> This has an impact on the CXF client as if the data structure changes, in the client
code, we will get marshal and unmarshall error. To resolve the issue, we did a small fix to
> @EndpointProperties({@EndpointProperty(key = "set-jaxb-validation-event-handler", value="false")})

> in the Service interfaces code generated by CXF . This fix seems to fix the problem when
the message are in request and response format.
> But, the above fix is not taking care of the scenerio when the CXF client is receiving
a fault error message and there is a change in the structure of fault error message say, a
new field is added to the message which is not available in the cxf generated code.
> The XML structure of response in error scenario:
> <?xml version="1.0"?>
> <s:Envelope xmlns:s="">
>   <s:Body>
>     <s:Fault>
>       <faultcode>s:eInvalidArguments</faultcode>
>       <faultstring xml:lang="en-US">eInvalidArguments</faultstring>
>       <detail>
>         <Error xmlns="<abc>" xmlns:i="">
>           <CorrelationId xmlns="<abc>">1234</CorrelationId>
>           <DateTime xmlns="<abc>">XXXX-XX-XXTXX:XX:XX.XXXXXXXX</DateTime>
>           <Description xmlns="<abc>">eInvalidArguments</Description>
>           <InternalDescription xmlns="<abc>">Access denied to this user</InternalDescription>
>           <Type>eInvalidArguments</Type>
>           <UserToken xmlns:a="<abc>">
>             <a:Status>Ok</a:Status>
>             <a:Token>xyz</a:Token>
>           </UserToken>
>           <InternalErrorCode>1</InternalErrorCode>
>         </Error>
>       </detail>
>     </s:Fault>
>   </s:Body>
> </s:Envelope>
> Here, internalErrorCode is a newly added element in the webservice which is breaking
our client code by throwing "unwinding now org.apache.cxf.interceptor.Fault: Unmarshalling
Error: unexpected element" because the in the generated client code InternalErrorCode field
doesnt exists. 
> We are not getting the marshal and unmarshall exception in case of proper request and
response message even though there is change in the inbound or outbound message.
> Can we fix the issue quickly or CXF provide any quick fix for the fault error scenerio
when there is a change in the error structure. Pleas suggest.

This message was sent by Atlassian JIRA

View raw message