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

Similar Messages

  • BPM + PROXY + Fault Message

    Hello
    My scenario is JDBC -> BPM <-> Proxy
    I developed a BPM has a step-type <SENDER> that is synchronous.
    Information on the above step:
      . The message interface used an output, an input message and also a Fault Message.
    . I'm calling a proxy in the ECC and runs an exception if an error occurs in the application (inside the proxy).
      . This exception is returned to the BPM and I run a <block> to handle the exception.
    My need is to capture the contents of the exception in the BPM and send this text to another application.
    How do I recover the contents of the exception returned by Proxy in BPM?
    Thank you,
      Aroldo

    Hi, it is not supported in the meaning that the payload of the fault message is not returned to the integration process, so that's right Baskar. The only thing possible is to trigger exceptions for fault messages, see [Sending Messages from Integration Processes Synchronously -> Procedure -> Specify Exceptions|http://help.sap.com/saphelp_nw73/helpdata/en/43/6211331c895f6ce10000000a1553f6/content.htm].
    Possible solutions:
    If it is a custom proxy you could change the behavior so that no fault messages are triggered. Instead you return the error message in the payload structure of the response.
    If it isn't a custom proxy you could create a custom proxy wrapper with a separate structure for exceptions in the response. Call the implementation of your desired proxy in the wrapper implementation, handle the exception and return the exception contents in the separate structure of the response.
    Or you could try to create a data type enhancement for exception contents for the response message, create a proxy from the enhancement, and implement the OUTBOUND_PROCESSING method where you copy the exception messages to the structure of the data type enhancement.
    Regards, Martin

  • Can't transfer date type from java proxy to XI

    I 'm using Java proxy send message to XI&#12290;
    but some element for Date type didn't transfered to XI.
    XI 3.0
    I have tried  notes:719010.

    I have the same exact problem after more than year with no problem... Please help meI didn't install new firmware since I have the player I have the .40 version?thanks

  • Java Proxy Generation not working - Support for Parallel Processing

    Hi Everyone,
    As per SAP Note 1230721 - Java Proxy Generation - Support for Parallel Processing, when we generate a java proxy from an interface we are supposed to get 2 archives (one for serial processing and another suffixed with "PARALLEL" for parallel processing of jaav proxies in JPR).
    https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1230721
    We are on the correct patch level as per the Note, however when we generate java proxy from the IR for an outbound interface, it genrates only 1 zip archive (whose name we ourselves provide in the craete new archive section). This does not enable the parallel processsing of the messages in JPR.
    Could you please help me in this issue, and guide as to how archives can be generated for parallel processing.
    Thanks & Regards,
    Rosie Sasidharan.

    Hi,
    Thanks a lot for your reply, Prateek.
    I have already checked SAP Note 1142580 - "Java Proxy is not processing messages in parallel" where they ask to modify the ejb-jar.xml. However, on performing the change in ejb-jar.xml and while building the EAR, I get the following error:
    Error! The state of the source cache is INCONSISTENT for at least one of the request DCs. The build might produce incorrect results.
    Then, on going through the SAP Note 1142580 again, I realised that the SAP Note 1230721 also should be looked onto which will be needed for generating the Java proxy from Message Interfaces in IR for parallel processing.
    Kindly help me if any of you have worked on such a scenario.
    Thanks in advance,
    Regards,
    Rosie Sasidharan.

  • Sync Java Proxy Server response in XML

    Hi !
    We've this scenario: File1 <-> XI <-> Java Proxy <-> File2
    Using a BPM, we made a Async/Sync workflow. It works ok. It uses a SYNC Java Proxy Server.
    The problem is that inside the java proxy, we query an http source that returns already XML formated data. We need this data to be mapped from the java proxy response message type to the File2 message type.
    We know that we can parse the XML data inside the java proxy and fill the response message type structures (creating items, and array items for nested records), or directly   code the mapping here.
    But, is there any alternative to pass the received XML from the HTTP directly to XI, and map that XML structure with the File2 message type using graphical mapping ? instead of programming the xml parsing and creating the response structure?
    If we create a message type for the response of the java proxy, as 1 field that contains the whole XML code, then we would not map it....Is there any way to complete or to add  something to the received XML code, to convert it to the XI message format..so XI could interpret it as a true XI message and map it transparently via graphical mapping?
    Thanks,
    Matias

    Hi Akshay !
    That's exactly what I don't know how to do it.
    Inside the java proxy function I have a string variable, let's call it xmlResponse, that contains:
    <customer>
    <name>Matias</name>
    <country>China</country>
    </customer>
    I also have a message type created in XI (let's call it MT_Response), that has the same fields as the above message structure. And my java proxy function is declared something like this:
    public MT_Response.Type myFunction(MT_Request.Type myRequest) {
    String xmlResponse="";
    // http connection code goes here..
    xmlResponse = httpConnection.getResponse();
    return ??????? what ????
    I don't want to parse the xmlResponse variable in order to fill the MT_Response structure. I need a more direct way, because the content of xmlResponse is already XML !
    Thanks.

  • 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

  • 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

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

  • 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

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

  • 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

  • Fault Message for inbound asynch ABAP proxy

    Hi All,
    I've got scenario File -> XI -> ABAP proxy all asynchronous.
    Inside a proxy I'm throwing an exception using fault message.
    I don't see application error in SXMB_MONI on XI, I can see that only in SXMB_MONI on receiving system.
    Is it possible to have flag Application Error on XI monitor as well ?
    Best Regards,
    Tomasz

    Jai,
    I've checked that many times.
    I'll describe my scenario in more details.
    1. From the file I'm receiving a lot of items and trying to process as much as possible in one proxy call.
    2. Those ones which are causing errors are sent out to XI (outbound proxy) one by one. XI sends them to the same interface which is used in 1. step where I have condition which checks for single item and when it's wrong then exception is thrown.
    One SCM box is sender and receiver which my cause that problem.
    Tomasz

Maybe you are looking for