Handling Soap Fault Response.

Hi All,
I have a Proxy to SOAP scenario. 
While testing from SoapUI --
I am getting response for the valid input and for the invalid input the response is below.
In the scenario through SAP PI , the valid input given from the HTTP client is getting a valid response and the scenario is running fine.
But while checking the negative test, giving the invalid input, it is ending in a System error in PI.
We have to handle this and send the error back to the source system.
FAULT RESPONSE IN SoapUI :
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <soap:Fault>
         <faultcode>soap:Client</faultcode>
         <faultstring>System.Web.Services.Protocols.SoapException: Server was unable to read request. ---> System.InvalidOperationException: There is an error in XML document (6, 45). ---> System.InvalidOperationException: Instance validation error: 'AD' is not a valid value for Currency.
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read1_Currency(String s)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read2_ConversionRate()
   at Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer.Deserialize(XmlSerializationReader reader)
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
   --- End of inner exception stack trace ---
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
   at System.Web.Services.Protocols.SoapServerProtocol.ReadParameters()
   --- End of inner exception stack trace ---
   at System.Web.Services.Protocols.SoapServerProtocol.ReadParameters()
   at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()</faultstring>
         <detail/>
      </soap:Fault>
   </soap:Body>
</soap:Envelope>
*System error message in SAP PI* :
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?><!-- Inbound Message --> <SAP:Error SOAP:mustUnderstand="1" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"><SAP:Category>XIAdapterFramework</SAP:Category><SAP:Code area="MESSAGE">GENERAL</SAP:Code><SAP:P1/><SAP:P2/><SAP:P3/><SAP:P4/><SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: SOAP: response message contains an error XIAdapter/PARSING/ADAPTER.SOAP_EXCEPTION - soap fault: System.Web.Services.Protocols.SoapException: Server was unable to read request. ---&gt; System.InvalidOperationException: There is an error in XML document (1, 328). ---&gt; System.InvalidOperationException: Instance validation error: 'US' is not a valid value for Currency.
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read1_Currency(String s)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read2_ConversionRate()
   at Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer.Deserialize(XmlSerializationReader reader)
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
   --- End of inner exception stack trace ---
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
   at System.Web.Services.Protocols.SoapServerProtocol.ReadParameters()
   --- End of inner exception stack trace ---
   at System.Web.Services.Protocols.SoapServerProtocol.ReadParameters()
   at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()</SAP:AdditionalText><SAP:Stack/><SAP:Retry>M</SAP:Retry></SAP:Error>
I want to capture the text in Fault string in the Fault response and send it back to the Source system.
I have referred many blogs but i am unable to do it.
Will java mapping work as this is a response from the Target Webservice and NOT an errorin PI.

Hello.
If your scenario is ECC -> Proxy -> PI -> SOAP -> WS -> SOAP -> PI -> Proxy -> ECC.
In ESR create a Fault Message Type, and added to your Service Interface (Outboun/Inbound), use a XSLT mapping to take anyway format response, rebuid your proxy ABAP and see your "message fault" on exception tab.
this works for me.
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema">
     <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
     <xsl:template match="/">
          <ns0:FMT_ResponseAuth>                              
                    <standard>
                         <faultText>
                              <xsl:value-of select="//detail"/>
                         </faultText>                         
                    </standard>
          </ns0:FMT_ResponseAuth>
     </xsl:template>
I hope this help you.
Edited by: KrlosRios on Nov 2, 2011 5:59 PM

Similar Messages

  • BEA-382500: ALSB Service Callout action received SOAP Fault response

    Hi Friends...
    <BR>
    <BR>
    <BR>
    During the implementation of TUTORIAL: 2 Loan Example of AquaLogic Service Bus 2.1,
    I am getting fault response when testing the Proxy Service. Please help me in the following....
    <BR>
    <BR>
    <BR>
    <b>BEA-382500: ALSB Service Callout action received SOAP Fault response</b>
    <BR>
    <BR>
    <BR>
    <b>error: failed to load java type corresponding to t=LoanStruct@java:normal.client</b>
    <BR>
    at
    <BR>
    <BR>
    <BR>
    <BR>
    com.bea.staxb.runtime.internal.FailFastErrorHandler.add(FailFastErrorHandler.java:45)
    at com.bea.staxb.runtime.internal.MarshalStreamUtils.addError(MarshalStreamUtils.java:274)
    at com.bea.staxb.runtime.internal.MarshalStreamUtils.addError(MarshalStreamUtils.java:249)
    at com.bea.staxb.runtime.internal.UnmarshalResult.addError(UnmarshalResult.java:140)
    at com.bea.staxb.runtime.internal.UnmarshalResult.addError(UnmarshalResult.java:124)
    at com.bea.staxb.runtime.internal.UnmarshalResult.getPojoBindingType(UnmarshalResult.java:327)
    at com.bea.staxb.runtime.internal.UnmarshalResult.getPojoTypeFromXsiType(UnmarshalResult.java:310)
    at com.bea.staxb.runtime.internal.RuntimeBindingType.determineActualRuntimeType(RuntimeBindingType.java:256)
    at com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalType(UnmarshalResult.java:210)
    at com.bea.staxb.runtime.internal.SoapUnmarshallerImpl.unmarshalType(SoapUnmarshallerImpl.java:93)
    at weblogic.wsee.bind.runtime.internal.EncodedDeserializerContext.unmarshalType(EncodedDeserializerContext.java:66)
    at weblogic.wsee.bind.runtime.internal.BaseDeserializerContext.internalDeserializeType(BaseDeserializerContext.java:170)
    at weblogic.wsee.bind.runtime.internal.BaseDeserializerContext.deserializeType(BaseDeserializerContext.java:87)
    at weblogic.wsee.codec.soap11.SoapDecoder.decodePart(SoapDecoder.java:401)
    at weblogic.wsee.codec.soap11.SoapDecoder.decodeParams(SoapDecoder.java:236)
    at weblogic.wsee.codec.soap11.SoapDecoder.decodeParts(SoapDecoder.java:163)
    at weblogic.wsee.codec.soap11.SoapDecoder.decode(SoapDecoder.java:116)
    at weblogic.wsee.codec.soap11.SoapCodec.decode(SoapCodec.java:136)
    at weblogic.wsee.ws.dispatch.server.CodecHandler.decode(CodecHandler.java:138)
    at weblogic.wsee.ws.dispatch.server.CodecHandler.handleRequest(CodecHandler.java:39)
    at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:127)
    at weblogic.wsee.ws.dispatch.server.ServerDispatcher.dispatch(ServerDispatcher.java:85)
    at weblogic.wsee.ws.WsSkel.invoke(WsSkel.java:80)
    at weblogic.wsee.server.servlet.SoapProcessor.handlePost(SoapProcessor.java:66)
    at weblogic.wsee.server.servlet.SoapProcessor.process(SoapProcessor.java:44)
    at weblogic.wsee.server.servlet.BaseWSServlet$AuthorizedInvoke.run(BaseWSServlet.java:165)
    at weblogic.wsee.server.servlet.BaseWSServlet.service(BaseWSServlet.java:84)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3214)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1983)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1890)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1344)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    <BR>
    Message was edited by:
    alwaysvaghu
    Message was edited by:
    alwaysvaghu

    I've been getting this problem as well. However, the thing that confuses me is that if I use the command-line client (as described in the tutorial), everything seems to work fine. However, if I use the test console, it fails to work (giving the fault described in an ancestor of this post).
    I've tried added a 'Rename' operation, but I just get the java1 namespace as well.
    If the problem was just the namespace issue as stated, wouldn't the command-line client have a similar problem?

  • Handling SOAP faults

    hello,
    I created a java control which calls an external webservice. How do you handle
    SOAP fault messages coming back from the webservice?
    Weblogic just throws an java.lang.reflect.UndeclaredThrowableException since it
    cannot parse the expected XML message.
    For example, when I call Logon() via the java control. The WebService should
    reply with a LogonResult object(in xml format). However, if there's an error,
    the WebService returns a SOAP Fault message. Since this fault message is not
    in the format of the expected LogonResult xml schema, weblogic throws an error
    (since it cannot create the LogonResult object) and the caller just receives the
    UndeclaredThrowableException without knowing any of the contents within the SOAP
    Fault.
    I'd like to be able to send back the SOAP fault content back to the calling function.
    I've tried throwing an exception from the java control handler, but it gets swallowed
    up by the SOAP Handler so I still get an exception with no content.
    any info is appreciated.
    thanks,
    Tom

    Hi,
    Do you get answer for that?
    I had similar problem and solved this in this way:
    In this java.lang.reflect.UndeclaredThrowableException handler is possible to get also SoapFault back:
    catch (java.lang.reflect.UndeclaredThrowableException e){
    RemoteException re = (RemoteException).getUndeclaredThrowable();
    ServiceControlException sfe = (ServiceControlException)re.getCause();
    SoapFault fault = sfe.getSoapFault();
    XmlObject[] objs = fault.getDetailContents();
    // more procssing here to get Soap detailed error
    Maybe this helps.
    rgrds,
    H

  • Getting "OSB Service Callout action received SOAP Fault response" on trying to invoke a service using service callout

    I'm trying to invoke a search service using service callout . However on trying to test it , I'm getting this response
    <con:fault  xmlns:con="http://www.bea.com/wli/sb/context">
    <con:errorCode>BEA-382500</con:errorCode>
    <con:reason>
    OSB Service Callout action received SOAP Fault response
    </con:reason>
    <con:details>
    <con1:ReceivedFaultDetail  xmlns:con1="http://www.bea.com/wli/sb/stages/transform/config">
    <con1:faultcode  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">soapenv:Client</con1:faultcode>
    <con1:faultstring>Cannot find dispatch method for {}</con1:faultstring>
    <con1:http-response-code>500</con1:http-response-code>
    </con1:ReceivedFaultDetail>
    Please help in resolving this error.
    Thanks,
    Rohit

    you are calling wrong  the Service.
    ¿what kind of service do you have? RPC? Document?
    ir your target service its document, I recommend this:
    1. Test target service with OSB
    2. copy XML request and XML response from the test.
    3. use XML request format that you got at Step 2 in your source service and using it at your "Service Callout".

  • Handling SOAP Fault Message in BPM

    Hello XI SDN'ers,
    I am getting SOAP Fault Message in my SOAP Scenario and I am not aware of Handling that error in my BPM. Could any one tell me, How to handle such error's in BPM?
    Thanks & Regards,
    Satish.

    hi satesh
    using "exception handler" in BPM we can handle the error messages
    regards
    kummari

  • Handling Soap Faults in orchestration

    I have BizTalk exposing a WCF-BasicHttp endpoint, and an orchestration that picks it up, calls another WCF service and send the result back to the client. Any exceptions from the back-end service is handled using "Propagate Fault Message"
    setting on the Send Port
    As you can see from the picture above, I've set the Exception Object Type
    to the Fault_1 operation of Port_1. In the Expression shape, I trace the fault message and everything looks fine.
    However the exception is totally messed up on the client:
    Any ideas?
    Thank you
    If this answers your question, please use the "Answer" button to say so... Mikael - http://blogical.se/blogs/mikael

    instead of getting "<? xml" you're getting "\0<\0?\0...". I'd check the encoding across the messages.
    Also to be doubly sure, in your catch statement can you do a dump into EventLog to check if you're getting the SOAP Fault properly and your assignment is the culprit or you're getting the SOAP Fault itself in a different encoding format?
    Regards.

  • Handling SOAP fault

    Hi,
    we call a web service from Netweaver 7.0 ABAP system through PI.
    So the scenario is Netweaver 7.0 ABAP -> PI -> Web service (HTTP SOAP)
    When the web service gives a SOAP Fault, it returns an error message which we want to be able to get in the ABAP calling system. However , when a SOAP Fault happens the mapping fails and the only exception we get back in the abap system is
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="MAPPING">CANNOT_READ_PAYLOAD</SAP:Code>
    How can we actually get the real fault message back to the abap system ... ?
    Thanks.

    Are you using the wsdl generated by XI or you have imported the service provider WSDL?
    If its from XI there is nothing more to do just do the inteface mapping with all the mapping (request , response and fault)
    In case you are using the service provide wsdl.... you have to import it into the external definitions of XI.
    Needs to create the interface and select the proper message for the interfaces and do the mapping and use it in interface mapping.
    Hope its clear

  • Handling SOAP faults in Flex 2

    i want to capture a soap fault from my .NET web service in my
    flex 2 client app. i found this code sample but it seems to be for
    flex 3 (it fails to compile when i try to use it - but maybe i am
    just not using it correctly?)
    if (event.fault is SOAPFault) {
    var fault:SOAPFault=event.fault as SOAPFault;
    var faultElement:XML=fault.element;
    }

    Yeah, this is a problem between the Flash Player and the
    browser. The player doesn't get the full exception code if the
    server returns a 200.
    The only solutions ar to trap all errors on the server, or
    force the server to not return a 200.
    Google this for more detail.
    Tracy

  • SOAP Fault Response

    Hi,
    When we execute a service using XAI Dynamic submission we get a Fault response for an invalid request or any framework error and a actual response for the correct input.
    Is it possible to send a Fault Response for the error scenarios from a custom developed service ? Is it possible to send a Fault response for the error scenarios and actual schema response for the successful scenarios from a single service ? Thanks in advance

    Hi,
    When we execute a service using XAI Dynamic submission we get a Fault response for an invalid request or any framework error and a actual response for the correct input.
    Is it possible to send a Fault Response for the error scenarios from a custom developed service ? Is it possible to send a Fault response for the error scenarios and actual schema response for the successful scenarios from a single service ? Thanks in advance

  • Handling SOAP fault message

    Hi,
    My scenario is Client sync proxy to webservice.
    I have done the mapping from zreuest ->Webservice Request  and webservice Resp -> zresponse.
    Now, when i am calling the webservice getting the following Error message on XI
    *Inbound Message:*
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Inbound Message
      -->
    - <INVALID_INPUT>
      <description>java.lang.NullPointerException</description>
      </INVALID_INPUT>
    *Error message*:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Request Message Mapping
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="UNKNOWN">APPLICATION_ERROR</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>application fault</SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="">INVALID_INPUT</SAP:ApplicationFaultMessage>
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    And on client proxy side, getting the error message as Mapping program not found.
    Let me know how to handle this type of errors.
    Regards,
    Sreenivas.

    Hi Pratik,
    i forgot to mention that currently webservice is down, still am getting error response as i mentioned.
    When i tested the same using XMLSPY, getting pop up with 'Webservice has send empty response'.
    And when i am calling client proxy method, am getting error as 'Mapping program not found' 
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Request Message Mapping
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="MAPPING">NO_MAPPINGPROGRAM_FOUND</SAP:Code>
      <SAP:P1>Object ID 90CAAB770D493EA8B7C07DD83B595DE4 Software Component AE7169A03E4411DE88C0D0F38D770551</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Interface mapping Object ID 90CAAB770D493EA8B7C07DD83B595DE4 Software Component AE7169A03E4411DE88C0D0F38D770551 does not exist in runtime cache</SAP:Stack>
      <SAP:Retry>N</SAP:Retry>
      </SAP:Error>
    Regards,
    Sreenivas.

  • Handling SOAP Fault messages in BPM

    Hi,
    My scenario is Sync-Async Bridge involving File to SOAP transformation. I have used BPM as 1 file has many records and each record is required to call the web service synchronously.
    In the BPM I have
    Receive ---> Transform (1:n multimapping ) -
    > Block (Par for Each)
    In Block  I have Send Sync step to call Web service . I have an exception branch for the send step for catching Fault message that is sent back from webservice for Application Fault.
    Problem:
    Though the Fault message is sent from web service ,in the BPM  the block goes in error saying : "No exception defined for fault message ".  The Exception brach is not executed.
    Please suggest if anyone has come across such a scenario and solution to this.

    hi satesh
    using "exception handler" in BPM we can handle the error messages
    regards
    kummari

  • Handling soap fault messages

    Hi All,
    I had webservice and am able to pass geneate proper response based on client request but when they are making invalid request i.e
    removing some tag or making syntax related mistake, in response i'm getting exception related to <faultcode>soap:Client</faultcode>.
    I check my logs and it seems that the request is not coming to my service. The exception/response seems to generated by web server.Instead of webserver, i want to pass my customised exception for eg."invalid request".Can I do it?? If yes, how can i do it?
    Also, this webservice is being consumed by lotsa users, so if possible i don't want to do code change in existing services.If simply by setting some configuration or writing a wrapper might do.
    Really appreciated if someone reply with proper answer.
    Thanks in advance.
    Cheers,
    Cha

    you can use
    PROCEDURE p_check_fault(p_resp IN OUT NOCOPY response) as
    fault_node xmltype;
    fault_code varchar2(256);
    fault_string varchar2(32767);
    begin
    DBMS_OUTPUT.PUT_LINE('Checking fault string...');
    fault_node := p_resp.doc.extract('/env:fault',
    'xmlns:env="http://schemas.xmlsoap.org/soap/envelope/');
    if (fault_node is not null) then
    DBMS_OUTPUT.PUT_LINE('Fault!!!...');
    fault_code := fault_node.extract('/env:fault/faultcode/child::text()',
    'xmlns:env="http://schemas.xmlsoap.org/soap/envelope/').getstringval();
    fault_string := fault_node.extract('/env:fault/faultstring/child::text()',
    'xmlns:env="http://schemas.xmlsoap.org/soap/envelope/').getstringval();
    DBMS_OUTPUT.PUT_LINE('CODE:' || fault_code || '.Msj:' || fault_string);
    raise_application_error(-20993, 'Error: '
    || fault_code || ' - ' || fault_string);
    end if;
    end p_check_fault;

  • Handling of SOAP Faults in SOAP Clients consuming PI Web services

    Hi there,
    the following is in regards to SOAP fault error handling in a SOAP client that consumes a Web Service published by PI.
    I have been reading a number of threads and blogs in regards to this topic and I am still left with some open questions which I hope to get some final answersclarifications through this thread.
    In particular the blogs
    Handling Web Service SOAP Fault Responses in SAP NetWeaver XI      - Handling Web Service SOAP Fault Responses in SAP NetWeaver XI
    XI: Propagation of meaningful error information to SOAP Client     - XI: Propagation of meaningful error information to SOAP Client
    have caused by attention.
    Both of these threads are realating to the Fault Message type one can use to return errors back to a SOAP Client (.Net, Java, etc.).
    In our scenario we published a number of Web Services through PI that provide functionality to integrate with an R3 back-end system using inbound ABAP Proxies.
    The services are standardised and will be consumed by a number of .NetJava applications and systems. The reason for the use of ABAP proxies is the customer specific application logic that is executed in the backend system. The Web services are synchronous and don't use ccBPM in the middle. Transformations are performed in PI combined with various lookups to set default values before the message is passed into the ABAP Framework of the R3 back-end system. The lookups are done against the R3 back-end system using the PI RFC Lookup feature.
    The inbound proxies currently return application errors as part of the response message back to the SOAP client. For more critical errors we introduced the use of Fault message types as the method to return the information back to the SOAP Client. This is all working satisfactory.
    The questions I have are as follows.
    1. When an error occurs at the IE level (e.g. mapping error), ABAP Proxy framework level (e.g. conversion from XML to ABAP format) or Adapter Framework level (Adapter releated error) a different SOAP fault message structure is returned to the SOAP Client than the one    used for the application errors. The SOAP fault message structure used in this case is the standard SOAP fault used by PI to return system errors back to the caller. For those SOAP fault messages there is no payload generated that could be mapped to the SOAP fault structure used for the application errors. This would be preferrable as there would be only one Fault message structure used for both inbound ABAP proxy generated fault messages and PI generated fault messages.
    Also the error messages generated by PI can be quite cryptic and difficult to interpret at the client end and could be filtered     ranslated during message mapping if the payload of the PI generated SOAP fault message could be accessed in a message mapping.
    Point 3 of the above thread 2759 indicates that this would be possible but doesn't outline how. Could somebody please clarify this for me as I don't believe that this is really possible ???.
    My idea instead was to use the PI SOAP fault message structure to also return application errors. Therefore I would create a Fault message type that matches the PI SOAP fault structure. This would enable the SOAP Client to handle only one SOAP Fault error structure. Would that be something to look into instead ?????.
    2. We have been looking at using the integrated WEB AS SOAP adapter instead of using the AF Sender SOAP adapter. While playing with this we encountered differences in the content returned through the SOAP fault generated by PI. A sample is below. Shouldn't the content of these SOAP faults be the same if the error that caused it is the same. Also the SOAP fault returned by the IE SOAP adapter is much more    useful in this particular case. Both errors below are the same, a conversion error from XML to ABAP took place in the inbound ABAP proxy framework of the back-end system.
    SOAP fault returned when using SOAP Sender adapter of AF
    <!see the documentation>
    <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
       <SOAP:Body>
          <SOAP:Fault>
             <faultcode>SOAP:Server</faultcode>
             <faultstring>Server Error</faultstring>
             <detail>
                <s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">
                   <context>XIAdapter</context>
                   <code>ADAPTER.JAVA_EXCEPTION</code>
                   <text>com.sap.aii.af.ra.ms.api.DeliveryException: XIProxy:PARSE_APPLICATION_DATA:
         at com.sap.aii.adapter.xi.ms.XIEventHandler.onTransmit(XIEventHandler.java:455)
         at com.sap.aii.af.ra.ms.impl.core.queue.consumer.CallConsumer.onMessage(CallConsumer.java:134)
         at com.sap.aii.af.ra.ms.impl.core.queue.Queue.run(Queue.java:916)
         at com.sap.aii.af.ra.ms.runtime.MSWorkWrapper.run(MSWorkWrapper.java:56)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)</text>
                </s:SystemError>
             </detail>
          </SOAP:Fault>
       </SOAP:Body>
    </SOAP:Envelope>
    SOAP fault using integrated SOAP adapter of PI IE
    <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
       <SOAP:Body>
          <SOAP:Fault>
             <faultcode>SOAP:Server</faultcode>
             <faultstring>System Error</faultstring>
             <detail>
                <s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">
                   <context/>
                   <code>ABAP.PARSE_APPLICATION_DATA</code>
                   <text>Error during XML => ABAP conversion (Request Message; error ID: CX_ST_DESERIALIZATION_ERROR; (/1SAI/TXSBE20FF604BAFEF8D990A XML Bytepos.: 564  XML Path: ns1:CreatePORequest(1)POHEADER(2)COMP_CODE(1) Error Text: Data loss occurred when converting ############################## Kernel ErrorId: CONVT_DATA_LOSS))</text>
                </s:SystemError>
             </detail>
          </SOAP:Fault>
       </SOAP:Body>
    </SOAP:Envelope>
    I have been reading threads for hours without being able to find one that answers questions 1 or provides a blog that outlines the approach one should take for error handling in SOAP clients that consume PI Web Services (and covers both PISystem generated faults and faults raised in Proxies).
    There may already be a blog or thread and I just missed it.
    Any comments are welcome.
    Thanks. Dieter

    Hi Dieter,
    As Bhavesh already mentioned fault messages are used for application errors. The same is described in SAP XI help:
    http://help.sap.com/saphelp_nw04/helpdata/en/dd/b7623c6369f454e10000000a114084/frameset.htm
    In case of system error (e.g. field length too long in proxy call or error in XI/PI mapping) there seems to be no standard way of handling it and propagating the response to the consumer of webservice.
    Each system error is not recognized by SOAP adapter and SOAP adapter exception is raised.
    The only bizzare solution that I can see is developing an adapter module and transport wrong message to standard fault message before delivering it to adapter engine:
    http://help.sap.com/saphelp_nw04/helpdata/en/a4/f13341771b4c0de10000000a1550b0/frameset.htm
    Kind regards,
    Wojciech
    btw nice thread

  • PI 7.1 Adapter Module Development - Identify SOAP Fault Message

    Hi Experts,</br>
    here's a PI 7.1 Adapter Module Development issue I hope you can help me to resolve. It's about identifying SOAP fault messages.</br>
    </br>
    Scenario at a glance:</br>
    Adapter Modules placed in the modules chain at request and response time in a synchronous Scenario:</br>
    - Request: SOAP Axis to RFC </br>
    - Response and Fault Response: RFC to SOAP Axis</br>
    </br>
    The issue is how to identify SOAP fault message in SOAP Axis Adapter Module in the response message:</br>
    The client gets SOAP fault messages like the follwong one:</br>
       <SOAP:Body>
          <SOAP:Fault>
             <faultcode>SOAP:Server</faultcode>
             <faultstring>Server Error</faultstring>
             <detail>
                <ns1:exception xmlns:ns1="http://typen.geschaeftsstelle.pab.barmer.de">
                   <ns1:errortext>bla bla bla ...</ns1:errortext>
                </ns1:exception>
             </detail>
          </SOAP:Fault>
       </SOAP:Body>
    </br>
    </br>
    But when trying to access the tags faultcode and/or faultstring in the adapter module via xPath expressions I do not get them. Obviously the SOAP Fault tags are built AFTER the adapter module has been passed. So my question is:</br>
    How can I clearly/uniquely detect a SOAP fault response message (and distinguish it from a "normal" response message) in my SOAP Axis Adapter Module?</br>
    </br>
    I tried it the following way:</br>
    </br>
    </br>
    // Check Message Payload for SOAP Fault Message via xPath expressions</br>
    ...</br>
    // SOAP Fault Code</br>
    zv_xPression = zc_constXPattern.replaceFirst("&", "faultcode");</br>
    zv_soapFaultCode = XPathAPI.eval(zv_doc, (String) zv_xPression).toString();</br>
    // SOAP Fault String</br>
    zv_xPression = zc_constXPattern.replaceFirst("&", "faultstring");</br>
    zv_soapFaultString = XPathAPI.eval(zv_doc, (String) zv_xPression).toString();</br>
    // check for SOAP Fault Message</br>
    if (zv_soapFaultCode.equals("") && zv_soapFaultString.equals("")) {</br>
         // Create Audit Log entry - NOT a SOAP Fault Message</br>
         zv_msgText = zc_constModuleName + " 0190: xPath - OK! This message is NOT a SOAP Fault Message";</br>
         zv_audit.addAuditLogEntry(zv_msgKey, AuditLogStatus.SUCCESS, zv_msgText);</br>
         zv_faultCheck = false;</br>
    }</br>
    else {</br>
         ...</br>
         // Create Audit Log entry - SOAP Fault Message</br>
         zv_msgText = zc_constModuleName </br>
              + " 0200: xPath - this message is a SOAP Fault Message. " </br>
              + " - Faultcode is: " + zv_soapFaultCode </br>
              + " - Faultstring is: " + zv_soapFaultString; </br>
         zv_audit.addAuditLogEntry(zv_msgKey, AuditLogStatus.ERROR, zv_msgText);</br>
         ...</br>
    }</br>
    ...</br>
    </br></br>
    But zv_soapFaultCode and zv_soapFaultString are always empty (with other payload tags this coding works fine).</br>
    </br>
    Any ideas? </br></br>
    Thanx very much in advance!</br></br>
    Regards,</br>
    Volker

    Hi Alex!
    Like already mentioned I solved my problem by identifying the SOAP exception with the messageClass attribute of the PI message header. Acess code:
    try {
    String zv_msgClass = zv_piMsg.getMessageClass().toString();
    } catch (Exception e) {
    zv_msgText = zc_constModuleName
    + " E0110: Message processing terminated."
    + " Reason: Error while getting MessageClass "
    + zv_dataSource
    + e;
    // create trace and audit log entry (severity ERROR) for exception
    zv_location.errorT(ZV_SIGNATURE, zv_msgText);
    zv_audit.addAuditLogEntry(zv_msgKey, AuditLogStatus.ERROR, zv_msgText);
    ModuleException me = new ModuleException(e);
    zv_location.throwing(ZV_SIGNATURE, me);
    e.printStackTrace();
    throw me;
    }     // end of try-catch-block
    But I do not think this will solve your problem. I am almost sure, that something in your Axis configuration is wrong/missing. If a handler cannot be instatiated then it really may be missing. Have a look at defaultTrace.trc. Maybe you will find more suitable information about the root cause of your problem. Also have a look at NWA under software components and/or application modules if you can find/see your modules.
    But there is a general issue when trying to catch PI fault messages. If e.g. the requestor tries to login with wrong userid/pasword, then you will have no chance to catch this kind of error - at least as far as I know. Because in this very early stage of PI message processing no module is called.
    One last question: Did you develop your own Adapter or just an adapter module? In the first case: Is your adapter started and healthy? Have a look at RWB -> communication channel monitoring.
    Regards,
    Volker

  • Handling SOAP errors and parsing error

    Hi,
    I guess these are two questions.
    We are implementing a webservice from a provider. The WSDL is RPC-style. We could import it in PI and generate the proxies in ABAP. The requests are properly sent to the provider but we have problems with the returning message.
    Line: -
    When the response is positive, we get a parsing problem. Executing the service in SoapUI, this is the returning message:
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
       <SOAP-ENV:Body>
          <SOAP-ENV:loginResponse>
             <Result>s4vep9dm4iu1teh877cdduk0e1</Result>
          </SOAP-ENV:loginResponse>
       </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    When testing in SPROXY, this is the result (without the soap body):
    - <SOAP-ENV:loginResponse xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
      <Result>0s5bbett500h183v7fi32jm2o3</Result>
      </SOAP-ENV:loginResponse>
    We get the following error message from the parser: Element 'loginResponse' expected. Should the 'loginResponse' tag refer to another namespace? Does this mean the provider's respons is wrong?
    Line: -
    When the response is negative, we get the following response (as seen in SoapUI):
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
       <SOAP-ENV:Body>
          <SOAP-ENV:Fault>
             <faultcode>0001</faultcode>
             <faultstring>Invalid account credentials.</faultstring>
          </SOAP-ENV:Fault>
       </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    This is the error we see when we test in SPROXY:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Inbound Message
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIAdapterFramework</SAP:Category>
      <SAP:Code area="MESSAGE">GENERAL</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: SOAP: response message contains an error XIAdapter/PARSING/ADAPTER.SOAP_EXCEPTION - soap fault: Invalid account credentials.</SAP:AdditionalText>
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    In order to be able to catch this standard soap fault, we took a look at this blog:/people/jin.shin/blog/2007/05/21/handling-web-service-soap-fault-responses-in-sap-netweaver-xi
    It guided us through the fault mapping, but still we don't get the correct respons. Are there some supplementary settings we have to pay attention to?
    Thanks for any help.
    Kris

    > We get the following error message from the parser: Element 'loginResponse' expected. Should the 'loginResponse' tag refer to another namespace?
    > Does this mean the provider's respons is wrong?
    Yes, indeed. The namespace "http://schemas.xmlsoap.org/soap/envelope/" must not be used for SOAP body elements.
    Here the webservice has to be changed.
    > In order to be able to catch this standard soap fault, we took a look at this blog:/people/jin.shin/blog/2007/05/21/handling-web-service-soap-fault-responses-in-sap-netweaver-xi
    > It guided us through the fault mapping, but still we don't get the correct respons. Are there some supplementary settings we have to pay attention to?
    I think the SOAP adapter changes the application fault into a system fault. So you should have the response in the system fault exception in ABAP proxy.

Maybe you are looking for

  • How to deploy custom development with JDI

    We use JDI to deploy webdynpro for ESS application. for that we create a track, check in ESS components in the track and set up run time systems. now we are going to do custom development, for example: create interactive forms, etc.. we would like to

  • SAPGUI 7.20 PL4: Input history is not working

    Hello, we're on the way to roll out SAPGUI 7.20 PL4. Now I discoverd a serious bug: Local input history isn't working anymore. I switched on tracing on SAPGUI to see whats wrong, an the cause is simple: SAPGUI uses comma (,) instead of dot (.) in the

  • 10.4.7 Install wont work

    I am re-installing 10.4.7 on my Intel Quad Tower - says there is a error and wants me to restart and try again - second time I had to do this. I have the drive partitioned with XP on the second partition. Do I need to clear that out too and start ove

  • Error: bad interpreter: No such file or directory

    Solved....if you ever executing any file from the $iAS/bin directory and get the "bad interpreter: No such file or directory" then all you do is edit that file in vi or whatever, the look at the first line where it said #!/bin/ksh (in by case, it use

  • Error in Previewing data from a UD Source System

    Hi, I have created a data source from a UD Source System; however, when I preview data, I am prompted by this message: "Inbound processing of data package 000001 finished" There is no error, but there is also no data preview that is displayed. Can yo