ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthieu Riou" <matth...@offthelip.org>
Subject Re: Ode fault handling
Date Tue, 16 Sep 2008 14:42:25 GMT
On Tue, Sep 16, 2008 at 1:13 AM, maxxo <germandgw@yahoo.de> wrote:

>
> Hallo,
> thanks for the answer.
> I am pretty sure that the fault is properly declared in the operation. For
> me it is important to know how ode recognize whether the soap fault message
> belongs to a fault declared in the wsdl operation element or not which
> would
> lead to a failure because its an unknown fault.
>
> How ode implements this mapping from the SOAP message to the fault declared
> in the WSDL description?
>

We check the detail element and map it to the fault declared on the WSDL
operation. If you want to check the code it's at the end of the following
files (parseSoapFault and inferFault):

http://svn.apache.org/repos/asf/ode/branches/APACHE_ODE_1.X/axis2/src/main/java/org/apache/ode/axis2/util/SoapMessageConverter.java
http://svn.apache.org/repos/asf/ode/branches/APACHE_ODE_1.X/utils/src/main/java/org/apache/ode/utils/wsdl/WsdlUtils.java

This testcase demonstrates the catch:

http://svn.apache.org/repos/asf/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/resources/TestStructuredFault/HelloWorld2.bpel

Matthieu


> In the operation-element I declared „ZipCodeFault" but the
> faultstring-element of the returning soap messages contains
> „BusinessFaultException". The payload in the details-section of the soap
> message is correct.
>
> My WSDL description:
>
> <types>
>    <xsd:schema
> targetNamespace="http://services.sopware.org/ZipCodeFromAddress">
>      <xsd:element name="getZipCodeFromAddressRequest">
>        <xsd:complexType>
>          <xsd:sequence>
>            <xsd:element name="city" type="xsd:string"/>
>            <xsd:element name="street" type="xsd:string"/>
>            <xsd:element name="hno" type="xsd:string"/>
>          </xsd:sequence>
>        </xsd:complexType>
>      </xsd:element>
>      <xsd:element name="getZipCodeFromAddressResponse">
>        <xsd:complexType>
>          <xsd:sequence>
>            <xsd:element name="ZipCode" type="xsd:string"/>
>          </xsd:sequence>
>        </xsd:complexType>
>      </xsd:element>
>      <xsd:element name="ZipCode_fault">
>        <xsd:complexType>
>          <xsd:sequence>
>            <xsd:element name="ZipCodeFaultString" type="xsd:string"/>
>          </xsd:sequence>
>        </xsd:complexType>
>      </xsd:element>
>    </xsd:schema>
>  </types>
>
>  <wsdl:message name="getZipCodeFromAddressRequest">
>    <wsdl:part element="tns:getZipCodeFromAddressRequest"
> name="parameters"/>
>  </wsdl:message>
>  <wsdl:message name="getZipCodeFromAddressResponse">
>    <wsdl:part element="tns:getZipCodeFromAddressResponse"
> name="parameters"/>
>  </wsdl:message>
>   <wsdl:message name="ZipCodeFromAddressFault">
>    <wsdl:part element="tns:ZipCode_fault" name="parameters"/>
>  </wsdl:message>
>
>   <portType name="ZipCodeFromAddress" sdx:status="design">
>    <wsdl:operation name="getZipCodeFromAddress">
>      <wsdl:input message="tns0:getZipCodeFromAddressRequest"/>
>      <wsdl:output message="tns0:getZipCodeFromAddressResponse"/>
>      <wsdl:fault message="tns0: ZipCodeFromAddressFault"
> name="ZipCodeFault"/>
>    </wsdl:operation>
>  </portType>
>
>
> Matthieu Riou-5 wrote:
> >
> > On Mon, Sep 15, 2008 at 5:31 AM, maxxo <germandgw@yahoo.de> wrote:
> >
> >>
> >> Hallo,
> >>
> >> I have a question concerning how ode processes soap faults thrown within
> >> the
> >> service provider. Indeed there are a lot of threads in list but I found
> >> no
> >> proper answer for my problem.
> >> I created a BPEL process where I invoke a service. When the service
> >> couldn't
> >> process the request it sends a fault message defined in the WSDL
> >> description
> >> of the service. The problem is that ode don't throw the appropriate
> fault
> >> thus I cannot catch it within a fault handler. I read the section
> >> "Activity
> >> Failure and Recovery" from the ode user guide. When I set the attribute
> >> faultOnFailure to true the invoke-element throws an activityFailure. I
> >> don't
> >> know whether I completely understood the distinction between faults and
> >> failure, but I thought that ode will throw faults defined in the WSDL
> >> description and only throw activityFailure when the service does not
> >> respond
> >> or respond with a messages not being defined in the WSDL description.
> >>
> >> Is this assumption true?
> >
> >
> > You're correct, ODE won't enter activity recovery for a WSDL fault. So
> you
> > have to check your WSDL and make sure the fault thrown is properly
> > declared
> > in the operation.
> >
> > Matthieu
> >
> >
> >>
> >> If true, does ode take the fault name from the faultstring-element from
> >> the
> >> soap-fault messages?
> >>
> >> I ask this because I use the soa framework Sopera 3.1 to build the
> >> services
> >> and I am afraid that it doesn't implement correctly the soap standard
> but
> >> I
> >> am not really sure.
> >>
> >> Thank you for your answers.
> >>
> >> Fault message definition:
> >>
> >> <wsdl:message name="ZipCodeFromAddressFault">
> >>    <wsdl:part element="tns:ZipCode_fault" name="parameters"/>
> >>  </wsdl:message>
> >>
> >> SOAP response message:
> >>
> >> <?xml version='1.0' encoding='UTF-8'?>
> >>   <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
> >>      <env:Body>
> >>         <env:Fault>
> >>            <faultcode>server</faultcode>
> >>            <faultstring>BusinessFaultException</faultstring>
> >>            <detail>
> >>               <ns2:ZipCode_fault
> >> xmlns:ns2="http://services.sopware.org/ZipCodeFromAddress">
> >>                  <ZipCodeFaultString> No proper zip code
> >> found!</</ZipCodeFaultString>
> >>               </ns2:ZipCode_fault>
> >>            </detail>
> >>         </env:Fault>
> >>      </env:Body>
> >>   </env:Envelope>
> >>
> >> Part of the ode log:
> >>
> >> DEBUG - GeronimoLog.debug(66) | Response from provider was: [<?xml
> >> version="1.0" encoding="UTF-8"?>
> >> <ns2:ZipCode_fault
> >> xmlns:ns2="http://services.sopware.org/ZipCodeFromAddress
> >> "><ZipCodeFaultString>No
> >> proper zip code found!</ZipCodeFaultString></ns2:ZipCode_fault>
> >> ]
> >> DEBUG - GeronimoLog.debug(66) | replyWithFailure
> >> mex=hqejbhcnphr3ldqk8dnsww
> >> failureType=OTHER description=SOPERA service replies with error message
> >> details=[message: null]
> >> DEBUG - GeronimoLog.debug(66) | Invoking message response for mexid
> >> hqejbhcnphr3ldqk8dnsww and channel 23
> >> DEBUG - GeronimoLog.debug(66) | Triggering response
> >> ERROR - GeronimoLog.error(104) | Failure during invoke: SOPERA service
> >> replies with error message
> >> DEBUG - GeronimoLog.debug(66) | ActivityRecovery: Activity 13 requires
> >> recovery
> >> INFO - GeronimoLog.info(79) | ActivityRecovery: Registering activity 13,
> >> failure reason: SOPERA service replies with error message on channel 24
> >> DEBUG - GeronimoLog.debug(66) | Setting execution state on instance
> 25435
> >> 15.09.2008 14:07:28
> >> org.sbb.management.messaging.impl.OperationMonitorBackend
> >> INFO: added response time for operation getZipCodeFromAddress : 125
> >>
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Ode-fault-handling-tp19492019p19492019.html
> >> Sent from the Apache Ode User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Ode-fault-handling-tp19492019p19507295.html
> Sent from the Apache Ode User mailing list archive at Nabble.com.
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message