Execute Fault Message in Java Proxy

Hello,
I Call my Java Inbound Proxy and catch an exception.
How can i send now a Faul Message back to XI ?
} catch (Exception ex4) {
               ExchangeFaultData_Type faultData = new ExchangeFaultData_Type();
               faultData.setFaultText(ex4.getMessage());
               ErrorReturn_Type errorReturn = new ErrorReturn_Type();
               errorReturn.setStandard(faultData);
What should i do ?
Regards,
Robin

Hi Robin:
Without knowing your complete code, I think what your are missing is "gluining" everything together, something like this:
Somewhere in your code, define some variables:
      ExchangeFaultData_Type      faultData                   = null;
      FmJpAviso_Type              fmJpAviso_Type              = null;
      FmJpAviso_Message           fmJpAviso_Message           = null;
      FmJpAviso_Message_Exception fmJpAviso_Message_Exception = null;
      catch( HibernateException ehibernate )
       mensajeError = new StringBuffer();
       mensajeError.append(DataComercial.PED_XI_BDI_DMS_DC_001).append("\n\n")
                            .append(ehibernate.toString());
       catAPPL.fatalT(logger,mensajeError.toString());
          // Default Integration Scenario ExchangeFault Message
       faultData = new ExchangeFaultData_Type();
       faultData.setFaultText(mensajeError.toString());
           // My Fault Message Type for the inbound Message Interface
       fmJpAviso_Type = new FmJpAviso_Type();
       fmJpAviso_Type.setStandard(faultData);
           // My Fault Message
       fmJpAviso_Message = new FmJpAviso_Message();
       fmJpAviso_Message.setFmJpAviso(fmJpAviso_Type);
          // My Fault Message Exception
       fmJpAviso_Message_Exception = new FmJpAviso_Message_Exception();
       fmJpAviso_Message_Exception.setFmJpAviso_Message(fmJpAviso_Message);
       ehibernate = null;     
       mensajeError = null;           
          // Inform XI about this situation in the Java Proxy
       throw fmJpAviso_Message_Exception;
Hope this helps,
Regards, Pedro

Similar Messages

  • Exception using fault message in java server proxy.

    Hi All,
    I am trying to use Fault message inside my server proxy code in Asynchronous java server proxy. I am referring the below mentioned link :
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d06315a6-e66e-2910-039c-ba8bbbd23702?quicklink=index&overridelayout=true
    I successfully deployed my SDA file but while running the scenario(http-XI-ftp in PI7.11) i am getting the folowing exception under MDT:
    com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing inbound message. Exception: Cannot locate proxy bean ServerProxyFTTest3.
    I am using the following library refernces under application-j2ee-engine.xml file:  com.sap.aii.af.sdk.lib, com.sap.aii.proxy.svc, com.sap.xi.util.misc,com.sap.guid,com.sap.exception all of type "weak".
    I have checked almost all the forums related to fault messages in asynchronous java server proxy but couldn't find much help.
    Request you all to help me.
    Thanks
    Amit

    Hi Rajesh,
    I am deploying my SDA file on Non Central Adapter Engine.
    I have also registered my interface using:
    http://ISVSAPPISB:51000/ProxyServer/register?ns=http://infosys.com/poc&interface=SI_Proxy_IA&bean=localejbs/ServerProxyFTTest3&method=sIProxyIA
    But still i ma getting the same exception.
    Hi Gabriel,
    I implemented my scenario using the same. But in addittion to the librarry referneces mentioned over there i have added one more refrence in it "com.sap.exception"  of type "weak". My structure is like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <application-j2ee-engine xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="application-j2ee-engine.xsd">
    <reference reference-type="weak">
      <reference-target provider-name="sap.com" target-type="library">com.sap.aii.af.sdk.lib</reference-target>
      </reference>
    <reference reference-type="weak">
      <reference-target provider-name="sap.com" target-type="service"> com.sap.aii.proxy.svc</reference-target>
      </reference>
    <reference reference-type="weak">
      <reference-target provider-name="sap.com" target-type="library">com.sap.xi.util.misc</reference-target>
      </reference>
    <reference reference-type="weak">
      <reference-target provider-name="sap.com" target-type="library">com.sap.guid</reference-target>
      </reference>
        <reference reference-type="weak">
      <reference-target provider-name="sap.com" target-type="library">com.sap.exception</reference-target>
      </reference>
        </application-j2ee-engine>
    Please help.
    Thanks
    Amit

  • Fault Message Mapping for SOAP Scenario

    Hi ,
    I have configured a Proxy to SOAP synchronous scenario. The scenario is working fine. Now I need to map the fault message and display the message in SAP in case of any errors. I have used the standard Fault message. But I dont have any message from the WSDL which I can map to the standard fault message. Is it that we need to tell the wenservice team to modify the WSDL to include the fault message or is there any other way out to acheive the same.
    Thanks
    Amit

    >>> Is it that we need to tell the wenservice team to modify the WSDL to include the fault message or is there any other way out to acheive the same?
    Fault message is to provide meaningful message to the other end if there is a validation error or business exceptions or so...
    a) You are importing WSDL of the third party and using it in soap receiver target side.
    b) Normally it is best practice to create a WSDL which contains request, response and fault message. if your wsdl has fault message type declared then you can map the wsdl fault message with your proxy side fault message(which you can create). Please note you rely on the third party wsdl. Third party WSDL must have application logic coded to support fault message in case of application error occurs. Example if there is a validation that does not go through then their application logic must populate data in the fault message of wsdl. Then only if we map the wsdl fault msg to our proxy fault msg, we get meaningful fault details.
    If your target WSDL does not support fault mesg, it is not going to be helpful at all.

  • Interface-Mapping with a Fault Message Type

    Hi,
    we have an abap-proxy and some messages generated errors. The errors can be displayed via sxmb_moni. The proxy raises an "Application Error (Restart possible)".
    Now I wanna transform the generated fault message (of the proxy) with a message mapping and send the output to a file.
    My problem is, that it is not possible to define an interface mapping with the fault message as well as it is not possible to define a receiver determination.
    Any ideas?
    Thanks a lot
    Regards
    Wolfgang Hummel

    Hello
    As far as I know you can propogate the application error back to the calling application only in case of a Synch Interface? Are you making a Synch call where the proxy triggers a fault message,  if yes then all you need to do is to make the change in XI to have the fault message for both the outbound and inbound message interfaces and then a corresponding fault message mapping and select this in the Interface Mapping and then the fault message will be sent to the source / calling application.
    In the case of Asynch calls I don't think this is possible until you use a BPM. Have not tried this myself though.
    Regards,
    Bhavesh

  • Synchronous-Asynchronous Interface with Java Proxy

    Hi Gurus!!
    I have an Interface which begins on SAP with a call to an asynchronous ABAP Proxy . Xi sends the message to Java Proxy Server. This Java Proxy Server calls to a Java Proxy Client that sends the response to SAP through XI. This response is taken on SAP on ABAP Proxy Inbound.
    These arquitechture is a requirement, because the time between the request and the response could be 30 minutes and the user shouldn't be waiting the response synchronously.
    Is there any way to the user could manage the response in the same "thread" that he opened in the request?
    I hope have been clear enough.
    Thanks and regards,
    Manuel Míguez.

    The only possibility I could think of is using correlation. There also you have the limitation of java proxy as it does not support adapter modules. Could you use SOAP for your scenario?
    JMS receiver could use inherent properties to define correlations. But as your case is non-JMS, you have to define it manually. Say, if your receiver system is X, then the request from XI to system X should carry its message ID information. While X created the response message, it should use this message ID as the correlation ID for the response message. This could be achieved using an adapter module.
    I guess you were not looking for such a complex solution.
    Regards,
    Prateek

  • Java proxy client with HTTP sender

    I have SP15. I have sender agreement with HTTP adapter for system A and Java Proxy Cleint that send message as system A.
    When I send message through Java proxy I see error:
    <i>SOAPFault received from Integration Server. ErrorCode/Category: XIServer/IN_BIND_WRONG_ADPT; Params: HTTP; AdditionalText:  ; ApplicationFaultMessage:  ; ErrorStack: Server agreement found belongs to adapter HTTP; current adapter is 'XI' </i>
    When I deleted sender agreement it worked.
    Could you explain this strange behavior? Is it a bug. Sender agrement for HTTP is necessary since SP16

    I have the same problem with SOAP and file adapter. I've posted this here already.
    XIServer/IN_BIND_WRONG_ADPT
    I have deleted the sender agreement for my soap adapter scenarios, because a sender agreement is not necessary (created by the wizard). After that the soap adapter scenarios work fine. But at scenarios with a sender file adapter you need a sender agreement.
    We had the following situation:
    XI Test, XI SP17, Basis SP16 --> IN_BIND_WRONG_ADPT problem
    XI QA, XI SP17, Basis SP14 --> okay
    XI Prod, XI SP15, Basis SP 16 --> okay
    We patched our XI QA to
    XI QA, XI SP17, Basis SP16
    After that we have the IN_BIND_WRONG_ADPT problem at our XI  QA system too.
    I started a SAPP OSS call two weeks ago but got no solution till now. They checked our systems some times but with no result.
    Our central SLD is on the XI Prod System. Perhaps there is a connection. But I don't want to patch my XI Prod system to SP 17, because it's the only system that works without errors.
    Message was edited by: Gil Ritter

  • Java Proxy Fault Message

    Hello,
    I have a async Java Inbound Proxy.
    When i send a message to this Interface i call a java class how connect to a jdbc database.
    When the Database is not online i catch an exception.
    This exception i want to send with a fault message to XI.
    What i have to do ?
    At the moment i do the following but it doesn't work:
    } catch (SQLException e) {
    ExchangeFaultData_Type faultData = new ExchangeFaultData_Type();
    faultData.setFaultText(e.getMessage());
    ErrorReturn_Type errorReturn = new ErrorReturn_Type();
    errorReturn.setStandard(faultData);
    throw new ErrorReturn_Message_Exception();
    Any Idea?

    Hi Robin:
    Without knowing your complete code, I think what your are missing is "gluining" everything together, something like this:
    Somewhere in your code, define some variables:
          ExchangeFaultData_Type      faultData                   = null;
          FmJpAviso_Type              fmJpAviso_Type              = null;
          FmJpAviso_Message           fmJpAviso_Message           = null;
          FmJpAviso_Message_Exception fmJpAviso_Message_Exception = null;
          catch( HibernateException ehibernate )
           mensajeError = new StringBuffer();
           mensajeError.append(DataComercial.PED_XI_BDI_DMS_DC_001).append("\n\n")
                                .append(ehibernate.toString());
           catAPPL.fatalT(logger,mensajeError.toString());
              // Default Integration Scenario ExchangeFault Message
           faultData = new ExchangeFaultData_Type();
           faultData.setFaultText(mensajeError.toString());
               // My Fault Message Type for the inbound Message Interface
           fmJpAviso_Type = new FmJpAviso_Type();
           fmJpAviso_Type.setStandard(faultData);
               // My Fault Message
           fmJpAviso_Message = new FmJpAviso_Message();
           fmJpAviso_Message.setFmJpAviso(fmJpAviso_Type);
              // My Fault Message Exception
           fmJpAviso_Message_Exception = new FmJpAviso_Message_Exception();
           fmJpAviso_Message_Exception.setFmJpAviso_Message(fmJpAviso_Message);
           ehibernate = null;     
           mensajeError = null;           
              // Inform XI about this situation in the Java Proxy
           throw fmJpAviso_Message_Exception;
    Hope this helps,
    Regards, Pedro

  • Application ERROR - Fault message Error in Inbound ABAP Proxy !!

    Hi Folks,
    I have got application error while doing in Inbound proxy scenario. This inbound message is ProductActivityNotification, this message has got fault message. This message is triggering for faults. How to control this fault message or how to divert this error as an alert to RWB. Please give me your ideas step by step. Error as follows:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!-- Call Inbound Proxy
    -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
    <SAP:Category>Application</SAP:Category>
    <SAP:Code area="ABAP">APPLICATION_ERROR</SAP:Code>
    <SAP:P1 />
    <SAP:P2 />
    <SAP:P3 />
    <SAP:P4 />
    <SAP:AdditionalText />
    <SAP:ApplicationFaultMessage namespace="http://sap.com/xi/SAPGlobal20/Global">ProductActivityNotificationFault</SAP:ApplicationFaultMessage>
    <SAP:Stack>Application has thrown an exception</SAP:Stack>
    <SAP:Retry>M</SAP:Retry>
    </SAP:Error>
    Please find the fault message has got following values
    <?xml version="1.0" encoding="utf-8" ?>
    - <n0:ProductActivityNotificationFault xmlns:n0="http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn:sap.com:proxy:RAS:/1SAI/TAS653D9A9CCD9A8EF3AF9B:701:2009/02/10">
    - <standard>
    <faultText>Proxy Class (Generated)</faultText>
    - <faultDetail>
    <severity>information</severity>
    <text>Start of inbound processing: ProductActivityNotification (ID )</text>
    <id>000(/SCA/BIF_PROACT)</id>
    </faultDetail>
    - <faultDetail>
    <severity>error</severity>
    <text>Message ID is missing</text>
    <id>032(/SCA/BIF_MI)</id>
    </faultDetail>
    </standard>
    </n0:ProductActivityNotificationFault>
    Will you please focus bit light on this error message please?
    Regards
    San

    Hi,
    Check your Source data is correct or not..beofr executing your scenario execute your inboud Proxy with valid data ,
    check below blog...
    /people/stefan.grube/blog/2006/07/28/xi-debug-your-inbound-abap-proxy-implementation
    Regards,
    Raj

  • Fault Message generated in ABAP Inboud Async Proxy not visible XI Moni

    Hi
        I developed a ABAP Inbound AsyncProxy, which raises an exception using a fault message type. The SMB_MONI in the Business System is displaying the message as Application Error. But the XI Monitor is showing it as sucesfully processed.
        How do I monitor application errors from XI Monitor when I am sending Asynchronous Messages using ABAP Proxies?
        The business system in context is R/3 Enterprise System which is has got the APINT patch on it.
    Thanks in advance...
    Regards
    KP

    I'm developing a Java Proxy and I'm experiencing the same problem. The exception is raised by my Java Proxy and it can be checked in RWB Message Monitoring of my central adapter engine. It can alse be checked in the MessagingSystem.
    Unfortunately, no message is returned to SAP XI, at least, I cannot see anything in SXI_MONITOR (SXMB_MONI).
    The point is: does ir make sense to generate a fault message in xml just to be checked in an html monitor? The xml tags don't appear correctly in html format and I had to debug my application in order to find out that the exception was correctly returned.
    If anyone here have advanced in this issue, please let me know.
    Best regards,
    Ricardo Bochner.

  • Error handling using fault message type in outbound synchronous ABAP proxy

    Hi,
    We've a scenario, outbound synchronous ABAP proxy to synchronous SOAP receiver. The requirement is to send multiple records in a single rquest and get response for all the records sent (in the same response message).
    Say if I send 10 records from ECC, I should get 10 records as response from SOAP to ECC. But the problem here is, there could be some invalid requests, for which an invalid error status code should be sent as part of response.
    Source Structure
    Req_Proxy
        req (0..unbounded, string)
    Response Structure
    Resp_SOAP
      Resp (0..Unbounded)
           respString (0..1, String) (carries the actaul response message)
          status code (0..1, String) (carries the status of the response, for ex, 001 (successful), 002 (error))
    And now we are planning to make use of Fault Message Type, to track the errors from SOAP (status code 002). But, we are not sure on how to track this for all the requested records. Is it possible to track the errors for all the requested records in a singe call using fault message type? For eg if 8 records are successful and 2 are invalid, then we should get 10 records in response 8 for valid and 2 for invalid accordingly.
    Please calrify.
    Thanks.
    Rohit

    For eg if 8 records are successful and 2 are invalid, then we should get 10 records in response 8
    for valid and 2 for invalid accordingly.
    Check if you can modify the WSDL structure to include an error node that would get populated incase of invalid entries....this would mean that you get the success and failure details in the single message....also at the proxy-end make the necessary change in your DT.....may be then you do not need to use the fault message...
    Regards,
    Abhishek.

  • SOAP fault message : java.lang.NullPointerException

    Hi,
    After calling the Webservice from XI, got error message as
    java.lang.NullPointerException
    What might be the problem.
    Thanks in Advance!
    Regards,
    Sreenivas.

    Hi,
    In RWB, am getting SOAP resopnse error
    and in SXMB_MONI, getting inbound message as
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Inbound Message
      -->
    - <INVALID_INPUT>
      <description>java.lang.NullPointerException</description>
      </INVALID_INPUT>
    <?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>
    Regards,
    Sreenivas.

  • Fault message in asynchronous ABAP Proxy

    Hi,
    I have a question about fault messages in asynchronous ABAP proxy server.
    The configured scenario is SOAP – XI – ABAP Proxy. Between XI and the ABAP Proxy I have configured an inbound asynchronous interface with a fault message, and then I have generated all the classes and implemented some code for exception handling in the ABAP Proxy side successfully.
    When I tested negative cases, the exception raises and it is visible in the SXMB_MONI transaction in the R/3 side, but this exception is not displayed in the SXMB_MONI of XI it just displays a successful delivery to the ABAP Proxy message.
    According the XI documentation it says “<i>In the asynchronous case, you can see a fault message in the monitoring of the Exchange Infrastructure.</i>” But this is not working.
    Am I missing something?

    Hi,
    This parameters are form group RUNTIME.
    Please check it:
    http://help.sap.com/saphelp_nw04/helpdata/en/d6/49543b1e49bc1fe10000000a114084/content.htm
    Regards,
    Wojciech

  • Fault message handling in syn proxy

    Hi Experts,
    I have implemented Proxy to Web service synchronization scenario and implemented request response and fault message mapping.
    But when the scenario is getting the Application error the fault message is visible in sxmb_moni but not visible in the proxy or not being forward to proxy ?
    Can you help if there is any more config or  any other follow up is required, all the mapping and other part of fault message is as per PI standard only including the proxy ABAP code?
    regards,.

    Hi,
    But when the scenario is getting the Application error the fault message is visible in sxmb_moni but not visible in the proxy or not being forward to proxy ? - In your R/3 system by transaction SXMB_ADM, then integration engine configuration - specific configuration - in RUNTIME add parameter for logging and tracing and set it to maximum level...........also LOGGING_SYNC parameter should be enabled................
    then re-run your scenario..........then for a application fault msg in SXMB_MONI of XI, you should see a fault msg in SXMB_MONI of your r/3 system.
    Regards,
    Rajeev Gupta

  • Fault message handling in abap client proxy

    Hi experts,
    i have scenario like this SAPECC---XI---WEBservice
    i was decided to using the ABAP CLIENT proxy in sender side and soap adapter communication in receiver side
    i will be get the wsdl file form client
    problem is i am in bit of confusion like  am i need to create fault message for this asychronous scenario?
      how can i create the fault message for this scenario(that WSDL) and how the abaperwill  handle those error
    thanks in advance

    Hi.
    You can use fault message but it won´t return a error to your ABAP Proxy because your interface is ASSYNC. The fault message generated will stop in Adapter Engine.
    If you need a return of the error, you have to change your interface to Sync mode.
    To get more information, follow the link below:
    Fault Message Type
    http://help.sap.com/saphelp_nwpi711/helpdata/en/dd/b7623c6369f454e10000000a114084/frameset.htm
    Best Regards.
    Bruno

  • Propagate fault message from ABAP server proxy to XI

    Hello
    My scenario is asynch HTTP -> async ABAP server proxy.
    I have searched a forum but I didn't find the ansver on my question:
    Is it possible to propagate a fault message from SAP system to XI in case of asyncronous ABAP Proxy in order to see in SXMB_MONI of XI?
    I see errors only on SAP side but this solution doesn't satisfied me I want to see all errors in one place.

    Hi,
    Have u used commit work at the end of the code.
    Can you please tell me what all configuration u have done.
    U have referred the ABAP Proxy configuration:
    /people/vijaya.kumari2/blog/2006/01/26/how-do-you-activate-abap-proxies
    Refer the below log for Client Proxy -
    /people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy
    Chirag

Maybe you are looking for

  • Java and abap proxy ganeration

    hi all, i am new to proxies,i need the complete scenarios for java proxy generation and abap proxy generation. regards, AVR

  • Cin excise duty entry

    hi, need the advice. please help. 1) for manufacturing, when purchase, the input tax will debit cenvat account, say 100inr. when sales, output tax will credit cenvat account, say (120)inr. may i know if 100inr is excise duty paid and 20inr (120-100)

  • Default ejb JNDI name in websphere ear

    Hi, I am using ejb2.0-2.1 in websphere 6.0 WAS. I have a local entity ejb. I wish to define a service locator for this as a singleton class that caches the entity bean's home after doing a JNDI lookup. I am interested in two things. 1) Since my servi

  • How to publish only changed pages

    I am using Dreamweaver CS3...When I publish to my Apache/Linux server it appears to re-publish all pages that have already been published. I only want to publish CHANGED pages. Is there a setting in Dreamweaver CS3 that will cause only CHANGED pages

  • Layout for multiple lnaguages with PLD

    Hi all, lets say I need layouts prepared for two languages, say French and English. So I have two layouts per document, one for each language. My question is how can I set it so when I print a document, the proper layout will be selected according to