You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ode.apache.org by LeeCK <le...@yahoo.com> on 2010/02/04 06:22:29 UTC
Wrong fault type is returned for operation with mutliple fault
types
Hi,
If a ws operation defines multiple fault types in the wsdl, when this
operation is invoked and returns a fault message, the fault message that
catch by bpel will always be the first fault type (first in alphabetical
order). I am using ODE 1.3.4 with
ode-jbi.messageMapper=org.apache.ode.jbi.msgmap.JbiWsdl11WrapperMapper
After some debugging, I found out that there is a mistake with
JbiWsdl11WrapperMapper.toFaultType(line 207). if
(etype.equals(p.getElementName())) will always return the first fault type
in the fault types list. It should be changed to NOT EQUALS - if
(!etype.equals(p.getElementName()))
Example:
When the search operation is called, the endpoint returns
UnexpectedErrorFault . But when the fault message reaches bpel script, the
fault message has somehow converted to InvalidSObjectFault.
<definitions>
<operation name="search">
<soap:operation soapAction=""/>
<input>
<soap:header use="literal" message="tns:Header"
part="SessionHeader"/>
<soap:header use="literal" message="tns:Header"
part="CallOptions"/>
<soap:header use="literal" message="tns:Header"
part="PackageVersionHeader"/>
<soap:body parts="parameters" use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
<fault name="InvalidSObjectFault">
<soap:fault name="InvalidSObjectFault" use="literal"/>
</fault>
<fault name="InvalidFieldFault">
<soap:fault name="InvalidFieldFault" use="literal"/>
</fault>
<fault name="MalformedSearchFault">
<soap:fault name="MalformedSearchFault" use="literal"/>
</fault>
<fault name="UnexpectedErrorFault">
<soap:fault name="UnexpectedErrorFault" use="literal"/>
</fault>
</operation>
</definitions>
--
View this message in context: http://old.nabble.com/Wrong-fault-type-is-returned-for-operation-with-mutliple-fault-types-tp27447898p27447898.html
Sent from the Apache Ode User mailing list archive at Nabble.com.