cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CXF-5427) set-jaxb-validation-event-handler=false not working when fault message is changed.
Date Thu, 05 Dec 2013 20:01:36 GMT

     [ https://issues.apache.org/jira/browse/CXF-5427?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Daniel Kulp resolved CXF-5427.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.7.9
                   3.0.0-milestone2
         Assignee: Daniel Kulp


I believe this is now fixed.   If you could test the next set of snapshots to double check,
that would be great.   

The side effect is that if validate is turned on, faults are now properly validated.   Previously,
they were never validated.  

> set-jaxb-validation-event-handler=false not working when fault message is changed.
> ----------------------------------------------------------------------------------
>
>                 Key: CXF-5427
>                 URL: https://issues.apache.org/jira/browse/CXF-5427
>             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: 3.0.0-milestone2, 2.7.9
>
>
> 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
add
> @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="http://schemas.xmlsoap.org/soap/envelope/">
>   <s:Body>
>     <s:Fault>
>       <faultcode>s:eInvalidArguments</faultcode>
>       <faultstring xml:lang="en-US">eInvalidArguments</faultstring>
>       <detail>
>         <Error xmlns="<abc>" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
>           <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
(v6.1#6144)

Mime
View raw message