Ok, I have opened an issue (https://issues.apache.org/jira/browse/ODE-194)
and included a minimal runnable example for showing the error.


Jens Goldhammer wrote:
> 
> Ok, I have made further analysis. I tested the service with a generated
> axis2-client and I see that I am getting back the fault correctly, i.e. I
> can access the self-defined faultcode, faultActor and so on.
> 
> My wsdl definition for this wsdl fault contains following:
> 
>     <xsd:element name="faultCode" type="xsd:string">
>         <xsd:annotation>
>             <xsd:documentation>
>                               faultCode consists of a five letter identifier 
> plus a
>                               three digit id (serial number). For example, 
> "GENEX001"
>                               is a generic error and "AUTEX001" is a 
> authenification
>                               error
>                       </xsd:documentation>
>         </xsd:annotation>
>     </xsd:element>
>     <xsd:element name="faultString" type="xsd:string">
>         <xsd:annotation>
>             <xsd:documentation>
>                               corresponding description of the faultCode
>                       </xsd:documentation>
>         </xsd:annotation>
>     </xsd:element>
>     <xsd:element name="faultActor" type="xsd:string">
>         <xsd:annotation>
>             <xsd:documentation>
>                               element displays url of the webservice where the
>                               exception occured
>                       </xsd:documentation>
>         </xsd:annotation>
>     </xsd:element>
>     <xsd:element name="faultDetail" type="xsd:string">
>         <xsd:annotation>
>             <xsd:documentation>
>                               element pictures the actual exception message 
> and
>                               complete stack trace.
>                       </xsd:documentation>
>         </xsd:annotation>
>     </xsd:element>
> 
> 
>     <xsd:element name="LogFault">
>         <xsd:annotation>
>             <xsd:documentation>
>                               fault element for handling errors during the 
> logservice
>                       </xsd:documentation>
>         </xsd:annotation>
>         <xsd:complexType>
>             <xsd:sequence>
>                 <xsd:element ref="types:faultCode"/>
>                 <xsd:element ref="types:faultString"/>
>                 <xsd:element ref="types:faultActor"/>
>                 <xsd:element ref="types:faultDetail"/>
>             </xsd:sequence>
>         </xsd:complexType>
>     </xsd:element>
> 
> 
> I send a response and I am getting back following response:
> 
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
>    <soapenv:Body>
>       <soapenv:Fault>
>          <faultcode>soapenv:Server</faultcode>
>          <faultstring>LogFaultException</faultstring>
>          <detail>
>             <ns2:LogFault
> xmlns:ns2="http://cis.log.interface.de.ibm.com/types";>
>                <s547:faultCode
> xmlns:s547="http://cis.de.ibm.com/simpleTypes";>LOGEX002</s547:faultCode>
>                <s548:faultString
> xmlns:s548="http://cis.de.ibm.com/simpleTypes";>Database for LogService not
> available.</s548:faultString>
>                <s549:faultActor
> xmlns:s549="http://cis.de.ibm.com/simpleTypes";>logRun</s549:faultActor>
>                <s550:faultDetail
> xmlns:s550="http://cis.de.ibm.com/simpleTypes";>no
> stacktrace.</s550:faultDetail>
>             </ns2:LogFault>
>          </detail>
>       </soapenv:Fault>
>    </soapenv:Body>
> </soapenv:Envelope>
> 
> I have tested it with an autogenerated axis-client and a junit-testmethod.
> If the logfaultexception is thrown by the service, I can output the
> faultActor, faultString, detail and code in the catch-block.
> 
>       /**
>        * Auto generated test method
>        */
>       public void testlogRun() {
> 
>               LogRunResponseVO logRun = null;
>               try {
>                       com.ibm.de.cis.log.client.CisLogServiceStub stub = new
> com.ibm.de.cis.log.client.CisLogServiceStub(
>                                       endpoint);
>                       
> com.ibm.de.cis.log.client.CisLogServiceStub.LogRunRequestVO
> logRunRequestVO18 =
> (com.ibm.de.cis.log.client.CisLogServiceStub.LogRunRequestVO)
> getTestObject(com.ibm.de.cis.log.client.CisLogServiceStub.LogRunRequestVO.class);
>                       logRunRequestVO18.setEmptyparam(
>                       logRun = stub.logRun(logRunRequestVO18);
>               } catch (AxisFault e) {
>                       e.printStackTrace();
>               } catch (RemoteException e) {
>                       e.printStackTrace();
>               } catch (LogFaultException e) {
>                       LogFault fault = e.getFaultMessage();
>                       System.out.println("Actor: " + fault.getFaultActor());
>                       System.out.println("Code:" + fault.getFaultCode());
>                       System.out.println("Detail:" + fault.getFaultDetail());
>                       System.out.println("FaultString:" + 
> fault.getFaultString());
>                       e.printStackTrace();
>               } catch (Exception e) {
>                       e.printStackTrace();
>               }
>               System.out.println(logRun.getRunId());
> 
>       }
> 
> Question is why Ode cannot access these information? Following stacktrace
> is available in Ode.
> 
> <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";><soapenv:Header><addr:To
> xmlns:addr="http://www.w3.org/2005/08/addressing";>http://localhost:8180/cisLogWeb/services/cisLogService</addr:To><addr:Action
> xmlns:addr="http://www.w3.org/2005/08/addressing";>http://cis.log.interface.de.ibm.com/service/logRun</addr:Action><addr:ReplyTo
> xmlns:addr="http://www.w3.org/2005/08/addressing";><addr:Address>http://www.w3.org/2005/08/addressing/anonymous</addr:Address></addr:ReplyTo><addr:MessageID
> xmlns:addr="http://www.w3.org/2005/08/addressing";>uuid:hqejbhcnphr2n1qwgjen65</addr:MessageID></soapenv:Header><soapenv:Body><axis2ns2:LogRunRequestVO
> xmlns:axis2ns2="http://cis.log.interface.de.ibm.com/types";
> xmlns:types="http://cis.log.interface.de.ibm.com/types";>
>                                     <xsd:emptyparam
> xmlns:xsd="http://cis.de.ibm.com/simpleTypes";>true</xsd:emptyparam>
>                                    
> </axis2ns2:LogRunRequestVO></soapenv:Body></soapenv:Envelope>
> 10:48:58,462 DEBUG [SessionOutHandler] <?xml version='1.0'
> encoding='utf-8'?><soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";><soapenv:Header><addr:To
> xmlns:addr="http://www.w3.org/2005/08/addressing";>http://localhost:8180/cisLogWeb/services/cisLogService</addr:To><addr:Action
> xmlns:addr="http://www.w3.org/2005/08/addressing";>http://cis.log.interface.de.ibm.com/service/logRun</addr:Action><addr:ReplyTo
> xmlns:addr="http://www.w3.org/2005/08/addressing";><addr:Address>http://www.w3.org/2005/08/addressing/anonymous</addr:Address></addr:ReplyTo><addr:MessageID
> xmlns:addr="http://www.w3.org/2005/08/addressing";>uuid:hqejbhcnphr2n1qwgjen65</addr:MessageID></soapenv:Header><soapenv:Body><axis2ns2:LogRunRequestVO
> xmlns:axis2ns2="http://cis.log.interface.de.ibm.com/types";
> xmlns:types="http://cis.log.interface.de.ibm.com/types";>
>                                     <xsd:emptyparam
> xmlns:xsd="http://cis.de.ibm.com/simpleTypes";>true</xsd:emptyparam>
>                                    
> </axis2ns2:LogRunRequestVO></soapenv:Body></soapenv:Envelope>
> DEBUG - GeronimoLog.debug(66) | Found a header in incoming message,
> checking if there are endpoints there.
> 10:48:59,503 DEBUG [SessionInHandler] Found a header in incoming message,
> checking if there are endpoints there.
> ERROR - GeronimoLog.error(108) | Error sending message
> (mex={PartnerRoleMex#hqejbhcnphr2n1qwgjen64 [PID
> {http://com.ibm.de.cis/archive}cisArchive-40] calling
> [EMAIL PROTECTED](...)}):
> LogFaultException
> org.apache.axis2.AxisFault: LogFaultException
>       at
> org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:486)
>       at
> org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:343)
>       at
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389)
>       at
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
>       at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
>       at
> org.apache.ode.axis2.ExternalService$1$1.call(ExternalService.java:148)
>       at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
>       at java.util.concurrent.FutureTask.run(FutureTask.java:123)
>       at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>       at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>       at java.lang.Thread.run(Thread.java:595)
> 10:48:59,513 ERROR [ExternalService] Error sending message
> (mex={PartnerRoleMex#hqejbhcnphr2n1qwgjen64 [PID
> {http://com.ibm.de.cis/archive}cisArchive-40] calling
> [EMAIL PROTECTED](...)}):
> LogFaultException
> org.apache.axis2.AxisFault: LogFaultException
>       at
> org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:486)
>       at
> org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:343)
>       at
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389)
>       at
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
>       at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
>       at
> org.apache.ode.axis2.ExternalService$1$1.call(ExternalService.java:148)
>       at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
>       at java.util.concurrent.FutureTask.run(FutureTask.java:123)
>       at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>       at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>       at java.lang.Thread.run(Thread.java:595)
> DEBUG - GeronimoLog.trace(54) | Mex[hqejbhcnphr2n1qwgjen64].setPortOp(...)
> 10:48:59,663 DEBUG [MessageExchangeImpl]
> Mex[hqejbhcnphr2n1qwgjen64].setPortOp(...)
> 
> Thanks for your help.
> Jens
> 
> 
> Jens Goldhammer wrote:
>> 
>> 
>> 
>> Alex Boisvert wrote:
>>> 
>>> On 10/2/07, Jens Goldhammer <[EMAIL PROTECTED]> wrote:
>>>>
>>>> I believe in my case that Axis2 cannot acces the fault which the
>>>> service
>>>> responses to ODE back. Here the initial business fault become an ODE
>>>> fault
>>>> and behave as you have described already.
>>>> Or does the stacktrace below has an other meaning?
>>>>
>>>> org.apache.axis2.AxisFault: LogFaultException
>>>>         at
>>>> org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java
>>>> :486)
>>> 
>>> 
>>> The stacktrace indicates Ode detected the fault and is re-throwing it. 
>>> But
>>> I'm not sure I understand what doesn't work for you.... is it that,
>>> 
>>> 1) Your service sends back a Fault (described in WSDL) and you can't
>>> catch
>>> it in your process?
>>> 
>>> 2) Your service sends back a Fault (not in WSDL) and you use
>>> "faultOnFailure=true" but you can't catch it in your process?
>>> 
>>> In either case, if you can simplify your setup and attach your files to
>>> a
>>> Jira issue we could look into things in detail.
>>> 
>>> alex
>>> 
>>> 
>> 
>> It is the first point- I send back a fault and I cannot catch it in
>> Ode... and I don“t know why...
>> I see that there is an wsdl fault, but Ode does not execute the fault
>> handler for this fault...
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Error-handling-in-bpel-processes-tf4555881.html#a13055706
Sent from the Apache Ode User mailing list archive at Nabble.com.

Reply via email to