Fault Handler

View: New views
3 Messages — Rating Filter:   Alert me  

Fault Handler

by kamz75 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

[entpack] Fault Handler

Hi,

I am trying to use a Fault Handler to log errors from a web service call to a database table in BPEL.
I am calling a webservice to update something and using a Fault Handler-Catch to trap an exception and write the contents to the soap message to a database table.

The returned SOAP message from the failed webservice update is attached, as is the XSD for this message Part.
<<soap_error.xml>> <<soap-error.xsd>>
I am finding that the Catch does not trap the soap error event thought the Fault Variable Type as been define as the same as the returned soap error.

The only way to trap the fault is to use the CatchAll, which does not allow me to trap the contents and process the error so that I can write it to a database table.

Is there any way to trap such messages using the catch, or even the catch-all so that I can process the contents of the error appropriately.

Thanks
Kam


<?xml version="1.0"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
  <S:Body>
    <ns2:Fault xmlns:ns2="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope">
      <faultcode>ns2:Server</faultcode>
      <faultstring>error.database.6057
</faultstring>
      <detail>
        <ns2:exception xmlns:ns2="http://jax-ws.dev.java.net/" class="com.perceptive.ctms.exceptions.ImpactMessengerException" note="To disable this feature, set com.sun.xml.ws.fault.SOAPFaultBuilder.disableCaptureStackTrace system property to false">
          <message>error.database.6057</message>
          <ns2:stackTrace>
            <ns2:frame class="com.perceptive.ctms.framework.database.Pao" file="Pao.java" line="341" method="handleSQLException"/>
            <ns2:frame class="com.perceptive.ctms.pao.FwaPatPao" file="FwaPatPao.java" line="250" method="doPat"/>
            <ns2:frame class="com.perceptive.ctms.bd.PatientsBdImpl" file="PatientsBdImpl.java" line="1504" method="createPatient"/>
            <ns2:frame class="com.perceptive.ctms.services.patients.PatientServiceImpl" file="PatientServiceImpl.java" line="64" method="createPatient"/>
            <ns2:frame class="sun.reflect.NativeMethodAccessorImpl" file="NativeMethodAccessorImpl.java" line="native" method="invoke0"/>
            <ns2:frame class="sun.reflect.NativeMethodAccessorImpl" file="NativeMethodAccessorImpl.java" line="39" method="invoke"/>
            <ns2:frame class="sun.reflect.DelegatingMethodAccessorImpl" file="DelegatingMethodAccessorImpl.java" line="25" method="invoke"/>
            <ns2:frame class="java.lang.reflect.Method" file="Method.java" line="585" method="invoke"/>
            <ns2:frame class="com.sun.xml.ws.api.server.InstanceResolver$1" file="InstanceResolver.java" line="246" method="invoke"/>
            <ns2:frame class="com.sun.xml.ws.server.InvokerTube$2" file="InvokerTube.java" line="146" method="invoke"/>
            <ns2:frame class="com.sun.xml.ws.server.sei.EndpointMethodHandler" file="EndpointMethodHandler.java" line="257" method="invoke"/>
            <ns2:frame class="com.sun.xml.ws.server.sei.SEIInvokerTube" file="SEIInvokerTube.java" line="93" method="processRequest"/>
            <ns2:frame class="com.sun.xml.ws.api.pipe.Fiber" file="Fiber.java" line="595" method="__doRun"/>
            <ns2:frame class="com.sun.xml.ws.api.pipe.Fiber" file="Fiber.java" line="554" method="_doRun"/>
            <ns2:frame class="com.sun.xml.ws.api.pipe.Fiber" file="Fiber.java" line="539" method="doRun"/>
            <ns2:frame class="com.sun.xml.ws.api.pipe.Fiber" file="Fiber.java" line="436" method="runSync"/>
            <ns2:frame class="com.sun.xml.ws.server.WSEndpointImpl$2" file="WSEndpointImpl.java" line="243" method="process"/>
            <ns2:frame class="com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit" file="HttpAdapter.java" line="444" method="handle"/>
            <ns2:frame class="com.sun.xml.ws.transport.http.HttpAdapter" file="HttpAdapter.java" line="244" method="handle"/>
            <ns2:frame class="com.sun.xml.ws.transport.http.servlet.ServletAdapter" file="ServletAdapter.java" line="135" method="handle"/>
            <ns2:frame class="com.sun.xml.ws.transport.http.servlet.WSServletDelegate" file="WSServletDelegate.java" line="129" method="doGet"/>
            <ns2:frame class="com.sun.xml.ws.transport.http.servlet.WSServletDelegate" file="WSServletDelegate.java" line="160" method="doPost"/>
            <ns2:frame class="com.sun.xml.ws.transport.http.servlet.WSServlet" file="WSServlet.java" line="75" method="doPost"/>
            <ns2:frame class="javax.servlet.http.HttpServlet" file="HttpServlet.java" line="709" method="service"/>
            <ns2:frame class="javax.servlet.http.HttpServlet" file="HttpServlet.java" line="802" method="service"/>
            <ns2:frame class="org.apache.catalina.core.ApplicationFilterChain" file="ApplicationFilterChain.java" line="252" method="internalDoFilter"/>
            <ns2:frame class="org.apache.catalina.core.ApplicationFilterChain" file="ApplicationFilterChain.java" line="173" method="doFilter"/>
            <ns2:frame class="com.perceptive.ctms.authentication.filters.AuthenticationFilter" file="AuthenticationFilter.java" line="119" method="doFilter"/>
            <ns2:frame class="org.apache.catalina.core.ApplicationFilterChain" file="ApplicationFilterChain.java" line="202" method="internalDoFilter"/>
            <ns2:frame class="org.apache.catalina.core.ApplicationFilterChain" file="ApplicationFilterChain.java" line="173" method="doFilter"/>
            <ns2:frame class="org.apache.catalina.core.StandardWrapperValve" file="StandardWrapperValve.java" line="213" method="invoke"/>
            <ns2:frame class="org.apache.catalina.core.StandardContextValve" file="StandardContextValve.java" line="178" method="invoke"/>
            <ns2:frame class="org.apache.catalina.core.StandardHostValve" file="StandardHostValve.java" line="126" method="invoke"/>
            <ns2:frame class="org.apache.catalina.valves.ErrorReportValve" file="ErrorReportValve.java" line="105" method="invoke"/>
            <ns2:frame class="org.apache.catalina.core.StandardEngineValve" file="StandardEngineValve.java" line="107" method="invoke"/>
            <ns2:frame class="org.apache.catalina.connector.CoyoteAdapter" file="CoyoteAdapter.java" line="148" method="service"/>
            <ns2:frame class="org.apache.coyote.http11.Http11Processor" file="Http11Processor.java" line="868" method="process"/>
            <ns2:frame class="org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler" file="Http11BaseProtocol.java" line="663" method="processConnection"/>
            <ns2:frame class="org.apache.tomcat.util.net.PoolTcpEndpoint" file="PoolTcpEndpoint.java" line="527" method="processSocket"/>
            <ns2:frame class="org.apache.tomcat.util.net.LeaderFollowerWorkerThread" file="LeaderFollowerWorkerThread.java" line="80" method="runIt"/>
            <ns2:frame class="org.apache.tomcat.util.threads.ThreadPool$ControlRunnable" file="ThreadPool.java" line="684" method="run"/>
            <ns2:frame class="java.lang.Thread" file="Thread.java" line="595" method="run"/>
          </ns2:stackTrace>
        </ns2:exception>
      </detail>
    </ns2:Fault>
  </S:Body>
</S:Envelope>


soap-error.xsd (3K) Download Attachment

Re: Fault Handler

by Sergey Lunegov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Kam,

would you please file an issue in IZ in enterprise/bpel project.
Please attach your NB project, <<soap_error.xml>> <<soap-error.xsd>>

Thanks,
Sergey


Farmah, Kam wrote:

>
> Hi,
>
> I am trying to use a Fault Handler to log errors from a web service
> call to a database table in BPEL.
> I am calling a webservice to update something and using a Fault
> Handler-Catch to trap an exception and write the contents to the soap
> message to a database table.
>
> The returned SOAP message from the failed webservice update is
> attached, as is the XSD for this message Part.
> <<soap_error.xml>> <<soap-error.xsd>>
> I am finding that the Catch does not trap the soap error event thought
> the Fault Variable Type as been define as the same as the returned
> soap error.
>
> The only way to trap the fault is to use the CatchAll, which does not
> allow me to trap the contents and process the error so that I can
> write it to a database table.
>
> Is there any way to trap such messages using the catch, or even the
> catch-all so that I can process the contents of the error appropriately.
>
> Thanks
> Kam
>

RE: Fault Handler

by kamz75 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi thanks for the response.
I have raised a bug as you have requested:
http://www.netbeans.org/issues/show_bug.cgi?id=123890

Regards
Kam

-----Original Message-----
From: Sergey.Lunegov@... [mailto:Sergey.Lunegov@...]
Sent: Wednesday 12 December 2007 14:32
To: nbentpack@...
Subject: Re: [entpack] Fault Handler

Hi Kam,

would you please file an issue in IZ in enterprise/bpel project.
Please attach your NB project, <<soap_error.xml>> <<soap-error.xsd>>

Thanks,
Sergey


Farmah, Kam wrote:

>
> Hi,
>
> I am trying to use a Fault Handler to log errors from a web service
> call to a database table in BPEL.
> I am calling a webservice to update something and using a Fault
> Handler-Catch to trap an exception and write the contents to the soap
> message to a database table.
>
> The returned SOAP message from the failed webservice update is
> attached, as is the XSD for this message Part.
> <<soap_error.xml>> <<soap-error.xsd>>
> I am finding that the Catch does not trap the soap error event thought

> the Fault Variable Type as been define as the same as the returned
> soap error.
>
> The only way to trap the fault is to use the CatchAll, which does not
> allow me to trap the contents and process the error so that I can
> write it to a database table.
>
> Is there any way to trap such messages using the catch, or even the
> catch-all so that I can process the contents of the error
appropriately.
>
> Thanks
> Kam
>
LightInTheBox - Buy quality products at wholesale price!