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

Similar Messages

  • 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

  • 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 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

  • 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 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 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

    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

  • Soap Fault Handler

    Hi
    I have written a prrof of concept page in Application Express Builder to call a web service.
    It all works OK as far as it goes; the page process gets the data and the report section displays the data. The success and error messages defined in the page process are displayed too.
    However, I found in the documentation that the error message section on the process definition is for unhandled errors (Soap faults). I need to get at the 'detail' in the soap fault.
    Where do I define the handler and are there any tips on how to code it?
    Thanks

    Hello Nick,
    Contact BEA Support and ask for CR182310_81sp2.jar
    This should solve your problem.
    For information the fix is included in version SP4
    Regards
    Nohmenn

  • Handling custom soap fault

    I am trying to call a web service using the JPublisher generated pl/sql functions. The function works fine when there is no exception from the web service. However when the web service raises an exception (required by the business logic) I am receiving the following exception:
    ORA-29532: Java call terminated by uncaught Java exception: java.rmi.RemoteException: javax.xml.rpc.soap.SOAPFaultException:Error occurred at
    ORA-06512: at line 8
    This is a valid exception. However I want to handle the exception and read the ErrorCode and ErrorMessage passed in the custom SOAP fault message. I want to know if there is any provision in JPublisher (SQLJ/JDBC) to handle (Custom) SOAP fault messages.

    Hi,
    Do you have a solution for this problem? I'm dealing with the same problem:
    ORA-29532: Java call terminated by uncaught Java exception: java.rmi.RemoteException: javax.xml.rpc.soap.SOAPFaultException:
    regards, Hans

  • Soap fault message handling in XI

    Hi,
    I am using axis 1.4. SAP XI is my clinet. My wsdl file as below
    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions targetNamespace="http://ws.example.com/service"
       xmlns:wns="http://ws.example.com/service"
       xmlns:tns="http://ws.exampleenterprise.com"
       xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
       xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    <wsdl:types>
             <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
                    targetNamespace="http://ws.exampleenterprise.com"
                    elementFormDefault="qualified">
                     <xs:complexType name="SecrtySbj">
                             <xs:sequence>
                                     <xs:element name="usrname" type="xs:string"/>
                                     <xs:element name="pswrd" type="xs:string"/>
                             </xs:sequence>
                     </xs:complexType>
                     <xs:complexType name="AuthenticateRequest">
                             <xs:sequence>
                                     <xs:element name="secrtySbj" type="tns:SecrtySbj"/>
                             </xs:sequence>
                     </xs:complexType>
                     <xs:element name="authenticateRequest" type="tns:AuthenticateRequest"/>
                     <xs:complexType name="AuthenticateResponse" >
                             <xs:sequence>
                                     <xs:element name="sessnId" type="xs:string"/>
                             </xs:sequence>
                     </xs:complexType>
                     <xs:element name="authenticateResponse" type="tns:AuthenticateResponse"/>
                     <xs:complexType name="customFault">
                             <xs:sequence>
                                     <xs:element name="customCd" type="xs:int"/>
                                     <xs:element name="customMsg" type="xs:string" minOccurs="0"/>
                                     <xs:element name="customExcp" type="xs:string" minOccurs="0"/>
                             </xs:sequence>
                     </xs:complexType>
                     <xs:element name="customFault" type="tns:customFault"/>
             </xs:schema>
    </wsdl:types>
    <wsdl:message name="authRequest">
       <wsdl:part name="parameters" element="tns:authenticateRequest"/>
      </wsdl:message>
      <wsdl:message name="authResponse">
       <wsdl:part name="result" element="tns:authenticateResponse"/>
      </wsdl:message>
      <wsdl:message name="CustomFault">
       <wsdl:part name="CustomFault" element="tns:customFault"/>
      </wsdl:message>
      <wsdl:portType name="AuthenticateServiceInterface">
            <wsdl:operation name="authenticate">
        <wsdl:input message="wns:authRequest" />
            <wsdl:output message="wns:authResponse" />
        <wsdl:fault name="CustomFault" message="wns:CustomFault"/>
       </wsdl:operation>
      </wsdl:portType>
      <wsdl:binding name="AuthenticateServiceSoapBinding" type="wns:AuthenticateServiceInterface">
              <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
       <wsdl:operation name="authenticate">
        <soap:operation soapAction=""/>
        <wsdl:input>
         <soap:body use="literal"/>
        </wsdl:input>
            <wsdl:output>
                    <soap:body use="literal"/>
            </wsdl:output>
            <wsdl:fault name="CustomFault" >
                       <soap:fault name="CustomFault" use="literal" />
               </wsdl:fault>
       </wsdl:operation>
      </wsdl:binding>
      <wsdl:service name="AuthenticateServiceService">
       <wsdl:port name="AuthenticateService" binding="wns:AuthenticateServiceSoapBinding">
        <soap:address location="http://10.236.14.6:8080/axis/services/AuthenticateService"/>
       </wsdl:port>
      </wsdl:service>
    </wsdl:definitions>
    Axis generates the soap fault as below in detail tag as below
    <ns1:customFault xmlns:ns1="http://ws.examplenterprise.com">
    <ns1:customCd>123</ns1:customCd>
    <ns1:customMsg>Password is wrong</ns1:customMsg>
    <ns1:customExcp>CustomException</ns1:customExcp>
    </ns1:customFault>
    They are getting error like below while getting the fault message.
    <SAP:ApplicationFaultMessage namespace="http://ws.exampleenterprise.com">customFault<SAP:ApplicationFaultMessage>
    Question: Why it is throwing "ApplicationFaultMessage" for fault messages? is there any error in wsdl file in defining the elements? or style has to be different? or is it an namespace issue in the wsdl?
    Note: They are able to do it sucessfull for the response message.

    Hi,
    The answer is in your Question itself.
    XI Sequence
    1.First step is to identify the wsdl:Message element with the namespace http://ws.example.com/service
    2.The next step is to go to the part element in http://ws.exampleenterprise.com and map the fault message.
    To be simple in your case http://ws.example.com/service is the namespace of Fault Message and http://ws.exampleenterprise.com is the namespace of the fault message payload  (Fault XML Message).
    So even though the Fault XML Message has the namespace http://ws.exampleenterprise.com ,but if the fault namespace doesnot come with http://ws.example.com/service then Fault will not be triggered and processed in XI.
    I hope you get the difference between the two namespaces used and the implications of them.
    Fault is entirely different from respone.
    Its like exception in java. If you donot catch the correct exception, will the exception raised be caught? Similarly if your SOAP service doesnot invoke the fault message with correct namespace (http://ws.example.com/service ), you cannot invoke/catch the fault message in XI.
    Regards,
    Sudharshan N A

  • How to handle soap responses

    I am following this tutorial to handle SOAP responses but it does not work http://livedocs.adobe.com/flex/3/html/help.html?content=data_access_6.html
    using code blew I am trying to parse the following soap response.
        <?xml version="1.0" encoding="utf-8"?>
        <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                                         xmlns:s="library://ns.adobe.com/flex/spark"
                                         xmlns:mx="library://ns.adobe.com/flex/mx"
                                         xmlns:components="components.*"
                                         xmlns:hellos="services.hellos.*"
                                         height="957"  creationComplete="initApp()" >
                  <fx:Style source="Styles.css"/>
                  <fx:Script>
                            <![CDATA[
                                      import mx.controls.Alert;
                                      private namespace invesbot = "http://Services.com";
                                      use namespace invesbot;
                                      private namespace a = "http://schemas.xmlsoap.org/soap/envelope/";
                                      private namespace b = "http://www.w3.org/2001/XMLSchema";
                                      private namespace c = "http://www.w3.org/2001/XMLSchema-instance";
                                      use namespace a;
                                      use namespace b;
                                      use namespace c;
                                      [Bindable]
                                      var _result:*
                                      private function initApp():void
                                                myService.mycustomers();
                            ]]>
                  </fx:Script>
                  <fx:Declarations>
                            <mx:WebService id="myService" wsdl="http://localhost:8081/WebServiceTest/services/Hellos?wsdl"
                                                             showBusyCursor="true"
                                                             fault="Alert.show(event.fault.faultString), 'Error'">
                                      <mx:operation name="mycustomers" resultFormat="e4x">
                                                <mx:request>
                                                </mx:request>
                                      </mx:operation>
                            </mx:WebService>
                  </fx:Declarations>
        <mx:HBox>
                            <mx:Text
                                      text="{myService.mycustomers.lastResult.mycustomersReturn.name}"
                                      />
                  </mx:HBox>
        </s:Application>
    The SOAP response is as following
        <?xml version="1.0" encoding="UTF-8"?>
        <soapenv:Envelope
          xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
          xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          <soapenv:Body>
            <mycustomersResponse xmlns="http://Services.com">
              <mycustomersReturn>
                <age>28</age>
                <name>John</name>
              </mycustomersReturn>
              <mycustomersReturn>
                <age>29</age>
                <name>Alex</name>
              </mycustomersReturn>
              <mycustomersReturn>
                <age>30</age>
                <name>Jack</name>
              </mycustomersReturn>
            </mycustomersResponse>
          </soapenv:Body>
        </soapenv:Envelope>
    Using the above code the output will be
        <name xmlns="http://Services.com" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">John</name>
        <name xmlns="http://Services.com" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Alex</name>
        <name xmlns="http://Services.com" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Jack</name>
    but when I use the following code to put the result in dropdown box it gives the following error
        <s:FormItem label="Employee:">
                            <s:DropDownList id="dropDownList3"
                                                                    labelField="name"
                                                                    dataProvider ="{myService.mycustomers.lastResult.mycustomersReturn}"/>
                  </s:FormItem>
    TypeError: Error #1034: Type Coercion failed: cannot convert XMLList@106e9af1 to mx.collections.IList.

    Hi Ashish,
    You can use Catch All error handler within scope of InvokeService action. By specifying SOAP Fault variable name there, response soap fault will be populated in variable.
    In 11g(As per observation), split joins are strict towards definition of input and output message based on WSDL of target service which causes exception for invalidMessage in InvokeService action.
    Hope this helps.

  • 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

Maybe you are looking for

  • How do I adjust the print size of a photo?

    I created a collage in PSE 10 and took the photo to Ritz to have printed out in an 18" x 24" poster.  When the file was read into their computer for printing, the sizing came up as 18'1/2" x 24".  Printing the photo as is will cut 1/2" off of the col

  • Content Search Web Part - Result Preview Says "Invalid Request"

    This behavior seems to be occurring in both our test and production farms. ULS logs indicate the following entry: Exception occured in scope Microsoft.Office.Server.Search.Query.SearchExecutor.ExecuteQueries. Exception=Microsoft.SharePoint.Client.Inv

  • Macbook cracking

    hello everybody... i read a month or two ago about the macbook and it's problem with the cracking of the outside case, as well as the keyboard 'lifting' to make gaps between the top surface of the keyboard to the more 'whiter' chunk of the bottom.. (

  • Macbook pro late 2012 raid0

    hi, i've see that the mbp support the raid 0. i want mount 2 ssd kingston 240 GB (1 in the old hd place and 1 in the optical drive), but the question is....how this affect the battery life?

  • My Dock appears to have crashed and doesn't automatically re-launch...

    My Dock appears to have crashed and whereas I would normally expect it to re-launch itself and re-appear, it's not doing anything... It's just not there. Moving my mouse to the bottom of the screen does nothing. Attempting to toggle the "automaticall