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

Similar Messages

  • ModuleData.getPrincipalData returns null in the adapter module development

    Hi gurus,
    i am doing a test on the adapter module development following an article written by William Li:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0ac06cf-6ee2-2c10-df98-e17430ca5949?QuickLink=index&overridelayout=true
    my problem is after the EJB has been deployed, it seems that the return of inputModuleData.getPrincipalData() is always null which makes the program can not get the xml payload from the framework.
    the main process of the example has been simplified like this:
         public ModuleData process(ModuleContext moduleContext, ModuleData inputModuleData) throws ModuleException {
              Object           obj = null;
              try {
              obj = inputModuleData.getPrincipalData();
              Message     msg1 = (Message) obj;          
                    XMLPayload xmlpayload = msg1.getDocument();}          
              catch (Exception e) {
                   ModuleException me = new ModuleException(e);
                   throw me;
              return inputModuleData;
    after deployed, i get the following error in the adapter monitor of RWB: (my JNDI is testtest)
    17.02.2012 17:13:44.643 Information Send binary file  "test8.xml" from FTP server "10.18.48.150:/encrypt_test/", size 206 bytes with QoS EO
    17.02.2012 17:13:44.644 Information MP: processing local module localejbs/CallSapAdapter
    17.02.2012 17:13:44.644 Information Application attempting to send an XI message asynchronously using connection File_http://sap.com/xi/XI/System
    17.02.2012 17:13:44.645 Information Trying to put the message into the send queue
    17.02.2012 17:13:44.648 Information MP: processing local module localejbs/testtest
    17.02.2012 17:13:44.648 Error MP: exception caught with cause java.lang.NullPointerException: while trying to invoke the method com.sap.engine.interfaces.messaging.api.Message.getDocument() of an object loaded from local variable 'msg1'
    whereas if the code has been changed like this:
         public ModuleData process(ModuleContext moduleContext, ModuleData inputModuleData) throws ModuleException {
              Object           obj = null;
              try {
                   obj = inputModuleData.getPrincipalData();
                   Message     msg1 = (Message) obj;     
                   if (obj != null )
                        XMLPayload xmlpayload = msg1.getDocument();
              catch (Exception e) {
                   ModuleException me = new ModuleException(e);
                   throw me;
              return inputModuleData;
    the file can be read by the file adapter.
    i just quite confused that why the return of the getPrincipalData() is null? where is the problem? thanks
    Edited by: Stephen Xue on Feb 17, 2012 5:22 AM

    I'm gonna reply to myself here. I changed the processing sequence of the adapter modules in the  in the FileSender channel so that my module comes first then CallSapAdapter. Then getPrincipalData() contains the message.
    Hope this helps someone else.

  • Help required in File Adapter Module Development

    Hi All,
    I am working out a File to File scenario where my source file is in some different format. Please find the below sample:
    <Root>
    <ID>100</ID>
    <NAME>SAP</NAME>
    <END-Root>
    Before taking this into IS, I need to change the file to a proper XML format. I need to replace "END-" with "/".
    <?xml version="1.0" encoding="UTF-8" >
    <Root>
    <ID>100</ID>
    <NAME>SAP</NAME>
    </Root>
    I think I can achive this by developing Adapter Modules. I am new to Adapter Module development.
    Can you please tell me if there are any inbuilt Adapter Modules for this. If not please suggest me some relevant blogs to solve this issue. Thanks in Advance.

    Hi Phani Kumar
    There are more than one ways to do this. As per your timelines and skill set you can decide
    1. You can use the XMLAnonymizerBean this is an inbuilt module
    Check Stefen's blog
    Remove namespace prefix or change XML encoding with the XMLAnonymizerBean
    2. You can read this complete file in a single field and then you can create XSLT or Java mapping to parse it in a target XML you desire.
    Check these
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3823 [original link is broken] [original link is broken] [original link is broken](XSLT mapping)
    Java Mapping (Part I) (Java Mapping)
    The specified item was not found. (Java Mapping helper DOM)
    The specified item was not found. (XML Node into string)
    3. You can develop Adapter modules for this
    Refer
    Check Guides
    XI 3.0
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3bdc14e1-0901-0010-b5a9-a01e29d75a6a
    PI 7.0
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f013e82c-e56e-2910-c3ae-c602a67b918e
    PI 7.1
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00838345-708c-2a10-1199-9514c0b0a91c

  • Problem with SOAP FAULT messages

    Hi,
    I'm developing the flash interface for a .NET application.
    The client side (flash) communicate with server side (.NET) by web
    services. The problem is that when the server side send a Fault
    message flash breaks telling "Unable to connect to
    endpoint........". In this case I need to know the error message
    send by the server but the fault.faultstring is undefined.
    Here the server Fault message:
    HTTP/1.1 500 Internal Server Error.
    Date: Wed, 23 Aug 2006 09:07:10 GMT
    Server: Microsoft-IIS/6.0
    X-Powered-By: ASP.NET
    X-AspNet-Version: 1.1.4322
    Cache-Control: private
    Content-Type: text/xml; charset=utf-8
    Content-Length: 419
    <?xml version="1.0" encoding="utf-8"?>
    <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>SoapHeader</faultcode>
    <faultstring>The userid: xxxx is
    invalid</faultstring>
    <detail />
    </soap:Fault>
    </soap:Body>
    </soap:Envelope>
    And this the code that handle the fault case:
    pendingcall.onFault = function (fault:Object){
    rootObj.gbl_logger.log("WS Fault: "+ fault.faultstring ,
    10);
    As you can see the real faultstring is "The userid: xxxx is
    invalid" but in the faultstring property of the fault object I
    found "undefined".
    I've read many posts that report that the problem can be
    solved in the server side modifing the HTTP HEADER from 500 to 200.
    Unfortunately I can't access the server side code. Exists a way to
    resolve the problem in the client side? Seems it is a Flash bug as
    the SOAP 1.1 specs tells that all SOAP Fault messages must carry a
    HTTP 500 header. Exists some patch that solve the problem?
    Thanks.

    Hi ,
    Thanks for joining the Community.
    Please get in touch so we can resolve this issue for you.
    Click here for contact details.
    Thanks
    James

  • A sample web service to return SOAP fault message for application error

    Hi,
    I need to test behavior of XI, in case of application error (using <detail> tag in soap:fault) from web service in nosoap mode.
    If any one is aware of a free web service, which can raise application soap fault message, Kindly provide the details.
    Thanks in Advance,
    Rahul..

    Hi,
    What is the URL to which you are posting the SOAP message?
    Is it?
    http://<host>:<j2ee-port>/XISOAPAdapter/MessageServlet? channel=<party>:<service>:<channel>
    If yes, then like mentioned the QOS is picked from the Sender SOAP adapter.
    But, if the URL is ,
    http://<server>:<ABAP-port>/sap/xi/engine?type=entry&version=3.0&Sender.Service=<YourService>&Interface=<YourNamespace>%5E<YourInterface> 
    Then you need to give the QOS as <b>,&QualityOfService=ExactlyOnce</b> appended to the above URL.
    More, /people/stefan.grube/blog/2006/09/21/using-the-soap-inbound-channel-of-the-integration-engine
    Regards
    Bhavesh

  • ABAP Web Services Exception Valorization in SOAP Fault Message

    Hi,
    I created a Custom Function Module in ABAP with a custom exception ( "Exception1) in exception list (including a short text description of the exception ("This is the first exception!!!")).
    I exposed it as web services by means of 'Web service ABAP creation wizard".
    I hard coded the raising of the exception in order to see the valorization of SOAP Fault Message.
    The problem is that the field "Text" in SOAP fault message is empty instead of "This is the first exception!!!".
    Can you help me?
    Thanks in advance
    Giuseppe
    <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
         <soap-env:Body>
              <soap-env:Fault>
                   <faultcode>soap-env:Client</faultcode>
                   <faultstring xml:lang="it">Exception1</faultstring>
                   <detail>
                        <n0:Zprova.Exception xmlns:n0="urn:sap-com:document:sap:soap:functions:mc-style">
                             <Name>Exception1</Name>
                             <Text/>
                        </n0:Zprova.Exception>
                   </detail>
              </soap-env:Fault>
         </soap-env:Body>
    </soap-env:Envelope>

    Hi,
    in case you want some specific text,you can raise the exception  like this in your function module.
    MESSAGE I001(ZPLATINO)  RAISING EXCEPT1.
    message class: ZPLATINO
    exception        : EXCEPT1
    message no 001,
    message text : CHECK ERROR PUSHKAR1
    and your response will be like.:
    <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
         <soap-env:Body>
              <soap-env:Fault>
                   <faultcode>soap-env:Client</faultcode>
                   <faultstring xml:lang="en">EXCEPT1</faultstring>
                   <detail>
                        <n0:Zpl.Exception xmlns:n0="urn:sap-com:document:sap:soap:functions:mc-style">
                             <Name>EXCEPT1</Name>
                             <Text>CHECK ERROR PUSHKAR1</Text>
                             <Message>
                                  <ID>ZPLATINO</ID>
                                  <Number>001</Number>
                             </Message>
                        </n0:Zpl.Exception>
                   </detail>
              </soap-env:Fault>
         </soap-env:Body>
    </soap-env:Envelope>
    I think this solves your problem.
    points..points..:)
    Message was edited by:
            pushkar anand

  • How to send back the soap fault message without details tag to the sender

    Hello Expert,
    Is it possible to send the soap fault message(fault String element value) without details tag as shown below to the sender in synchrounous scenario.
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
         <soapenv:Body>
              <soapenv:Fault>
                   <faultcode>soapenv:Client</faultcode>
                   <faultstring>autorizarComprobanteRequest.comprobanteCAERequest.arrayOtrosTributos.otroTributo(1).codigo - El Código de Tributo es obligatorio.</faultstring>
                   <detail></detail>
              </soapenv:Fault>
         </soapenv:Body>
    </soapenv:Envelope>
    I have to send the faultstring element value in one of the element in response message back to sender? Is it possible using BPM?The above fault response does not have a fault payload (no detail element) and would result in a system error message.So how to handle this?
    If yes .Please tell me the BPM design
    faultstring value will be dynamic.
    Thanks in advance

    Thanks Yzanagi,
    I have gone through the index.htm file.
    In my scenario that is RFC -PI-soap(using http(Axis) protocol).when the webservice provider  is sending the soap fault as.
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
         <soapenv:Body>
              <soapenv:Fault>
                   <faultcode>soapenv:Client</faultcode>
                   <faultstring>autorizarComprobanteRequest.comprobanteCAERequest.numeroComprobante - El Número de Comprobante debe ser mayor o igual a 1</faultstring>
                   <detail></detail>
              </soapenv:Fault>
         </soapenv:Body>
    </soapenv:Envelope>
    In PI sxmb_moni it is converting to the error (system not application error)as shown below when using receiver soap adapter with  https(Axis) transport protocol and Message protocol:Axis.
    <?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:P1>
      <SAP:P2></SAP:P2>
      <SAP:P3></SAP:P3>
      <SAP:P4></SAP:P4>
      <SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: autorizarComprobanteRequest.comprobanteCAERequest.numeroComprobante - El Número de Comprobante debe ser mayor o igual a 1.</SAP:AdditionalText>
      <SAP:Stack></SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    As my requirement was (I have mentioned in my first question) that I want to pass
    SAP:AdditionalText tag
    value back to sender  in  one of the elements of  response message payload or handle using fault message mapping if this error could be converted to application error and map to the RFC exception  but unfortunately which is  not possible even using AXIS  adapter.
    so other  option to inform the sender RFC is mentioned here http://help.sap.com/saphelp_nw70/helpdata/en/22/0425e0488911d189490000e829fbbd/content.htm
    but while handling the SYSTEM_FAILURE  exception from PI at sender in report program and  displaying the msg variable ,I am not getting complete error message..It is getting truncated.Is there a limit to the no of character the msg variable contains which is set by system.Even if we declare msg variable with more length(for example char length 500) it is just displaying part of the error message from PI.
    Any Idea to read complete system error message from PI in report program at RFC sender..
    Kind Regards,
    Kubra fatima

  • BPM:  System_Error" SOAP fault message received

    Hi,
    We upgraded SAP system from 4.7 to ERP2004 on 09/17/05.
    We have XI-3.0 version from last 9 months and this BPM was working good so far. We have not changed anything in it except we upgraded the SAP system.
    We are using ABAP proxy from SAP to send "userid"
    message to XI-BPM and then it would make a Synchonous call to SAP system to get roles of those "usrid".
    In the first step when it is sending data to XI an exception is raised and in the second step when it tries to make synchronous call to SAP we are getting error:
    <Trace level="3" type="T">Deserializing message object...</Trace>
      <Trace level="3" type="System_Error">SOAP fault message received</Trac
      <Trace level="3" type="System_Error">SOAP fault code: Client</Trace>
      <Trace level="3" type="System_Error">SOAP fault string: Error during c
    I noticed that the XML name tag looks different now
    Before upgrade when message was successful.
    <?xml version="1.0" encoding="utf-8" ?>
    - <ns1:MT_ECA_USRID xmlns:ns1="http://bcm.edu/common"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <USRID>CLARKSON</USRID>
      <USRID>2_MA140016</USRID>
       </ns1:MT_ECA_USRID>
    After upgrade when message is failed
    <?xml version="1.0" encoding="utf-8" ?>
    - <nr1:MT_ECA_USRID xmlns:nr1="http://bcm.edu/common">
      <USRID>AABULIMI</USRID>
      <USRID>AB147899</USRID>
      <USRID>ACHALL</USRID>
       </nr1:MT_ECA_USRID>
    You would notice that
    " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    missing after upgrade.
    I would appreciate if anyone could help me.
    Mrudula

    Hi,
    Can you paste the full error message. Also take a look at the default trace log in Visual Admin. Set the logging for soap to debug.
    Naveen

  • 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

  • Adapter Module Development in PI 7.1

    Hi,
    I need to develop an adapter module and am using NetWeaver PI 7.1.
    1. Should I develop an EJB 2.1 or EJB 3.0 bean?
    2. Should I develop a bean that conforms to both standards, if so, how?
    Cheers,
    Earlence

    Hi ,
    These Links should be good enough for you.
    http://www.sdn.sap.com/irj/scn/index;jsessionid=(J2EE3414900)ID1219082550DB01455545497474264448End?rid=/library/uuid/3bdc14e1-0901-0010-b5a9-a01e29d75a6a&overridelayout=true
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3414900)ID1219082550DB01455545497474264448End?blog=/pub/wlg/10260
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3414900)ID1219082550DB01455545497474264448End?blog=/pub/wlg/10319
    Regards,
    Amith.

  • Adapter Module Development Hashtable entries

    Hi I am developing an adapter module, I need to capture the SourceDirectory and Source file Timestamp, I am not able to capture the directory and file time stamp. Is there any way we can Print out the Hashtable entries into the audit log ???
    I am using the below code 
    String fileName = (String) mp.get("FileName");
    String  Directory = (String) mp.get("SourceDirectory");
    String  SourceFileTimestamp =  (String) mp.get("SourceFileTimestamp");

    Hi,
    >>>String fileName = (String) mp.get("FileName");
    >>>String Directory = (String) mp.get("SourceDirectory");
    >>>String SourceFileTimestamp = (String) mp.get("SourceFileTimestamp");
    this approach works only for filename where did you read that it will work
    for SourceDirectory or anything else?
    you need to use adapter specific message arrtibutes to get that inside
    an adapter module
    that's the only way and it works for sure
    Regards,
    Michal Krawczyk

  • Passing JDBC adapter error message back to SOAP fault message

    I have a JDBC adapter that is returning an error in the response message:
      <?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: Error processing request in sax parser: Error when executing statement for table/stored proc. 'SAPINS' (structure 'StatementName1'): java.sql.SQLException: ORA-01843: not a valid month ORA-06512: at "SAP.SAPINS", line 129 ORA-06512: at line 1</SAP:AdditionalText>
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    I would like to pass the error message back to the fault section of a SOAP adapter.
    Is there an easy way to do this using fault messages, or is there some other way to do this?
    BR,
    Tony.

    HI,
    DId you install JDBC driver ?
    If not check this guide-https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3867a582-0401-0010-6cbf-9644e49f1a10
    Thread-
    Legacy_XI_MySQL
    Regards,
    Moorthy

  • Set a variable in Adapter Module and read it during message mapping

    Hi guys,
    is there any way, how I could set some variable and store its value during the adapter module processing and read back this value in message mapping and use it? Without using a database or files.. I mean, some j2ee storage or something like that..
    Thanks for your help,
    Olian

    Hi guys,
    thanks for your answers..  just a clarification, what the problem is.
    I need to validate a message in the adapter module, if it's digital signature is valid. If it is, I need to send back to the sender a return code (message) OK, otherwise ERROR. I can't modify the message (or dynamic configuration) as I'm using a WSS in the sender channel. The system doesn't allow me to change anything in the message, so I can't find out in the mapping what the validation result was. I then tried to do the validation directly in the message mapping, but I have some issues there with libraries or what, because the validation code, which works in the adapter module, doesn't work in the mapping java class. So my final thought was maybe I could validate the message in the adapter module and pass the result to the message mapping and then create an appropriate return message (in the mapping). However, I see no way of passing a value there. I'm stuck and have no Idea how to resolve the problem. Any hints guys?
    Thanks a lot for your help!
    Olian

  • RFC to SOAP fault message not catched

    Hi All
    I have a scenario where RFC is being send from ECC system I then call a web service, The webservice returns me a fault error messages when for example the order on the webservice system does not exist.
    I created a exception in the RFC and created the mapping for the fault message.
    When call ing the webservice I get error in comunication chanell:
    Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: SOAP: response message contains an error XIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 500 Internal Server Error
    I have tried adding:
    XMBWS.NoSOAPIgnoreStatusCode    =     true
    In the modules tab but still not getting soap fault.
    below is response from webservice if I use other soap client:
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
       <soap:Body>
          <soap:Fault>
             <faultcode>soap:Client</faultcode>
             <faultstring>Unmarshalling Error: cvc-minLength-valid: Value '' with length = '0' is not facet-valid with respect to minLength '1' for type 'nonEmptyExternalReference'.</faultstring>
          </soap:Fault>
       </soap:Body>
    </soap:Envelope>

    Hi,
    I don't think so you can catch 500 internal server errors using falut messages.
    Your target system has to capable of sending error messages in valid XML format then only you can catch them.coming too fault message concept we will implement in ABAP server proxies scenarios where we have a opportunity to catch errors in send as response. but i doubt in SOAP receiver scenarios.
    Regards,
    Raj

  • 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

Maybe you are looking for

  • Why can't I enable disk use on my Ipod touch?

    I wish to use my ipod touch as an external hard-drive. I have watched videos on how to go about it and they show that there is a greyed out check box that must be checked. This check box does not exist for me. Why not? and is it possible to enable di

  • Issue with Purchase Order  ZPRM & delivery ZPRE

    We are getting the same general error for 2 message types: 1.      PO 600127603 an automatic Output message was generated u201CZPRMu201D  returning the error u201CZPR_PO_MARCu201D a.     Transaction Details ME22N - MESSAGES 2.     Delivery 83036841 a

  • Page not appearing properly

    The bottom portion of pages is not loading properly. Ie: Cntrl+F or bottom of facebook chat windows are only slightly showing. So, help?

  • Initial Load Decentralized WM with HU active

    Hi, I want to know the procedure to make the initial data load in decentralized WM where both systems are SAP, and we have HU management active, and HU number assignation needs to be external. Thx

  • Can you preload items on iPad

    We are a small science company and want to send iPads with our units.  We would like to pre-load them with the tutorial videos, how-to files, etc... I know we can activate with iTunes and not sync, by using the "turn-on activation mode" but then how