cancel
Showing results for 
Search instead for 
Did you mean: 

sending back fault message from receiver to the sender

Former Member
0 Kudos

Hi,

Can somebody explain me, how to capture fault message generated by the receiver system back to the sender system?

I have a synchronous scenario, RFC -> XI -> Web Service.

When web service returns successful response, it gets mapped properly to an internal table of RFC. But, when web service returns fault message (as parameters passed to the web service are incorrect), RFC gives dump. Below message is shown in sxmb_moni.

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

- <!-- Call Adapter

-->

- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">

<SAP:Category>XIAdapter</SAP:Category>

<SAP:Code area="PARSING">ADAPTER.SOAP_EXCEPTION</SAP:Code>

<SAP:P1 />

<SAP:P2 />

<SAP:P3 />

<SAP:P4 />

<SAP:AdditionalText>soap fault: com.ucas.hei.link.exception.WSException: Data access error: Incorrect userId/password. at com.ucas.hei.link.xml.ReferenceData.getRefInstUcas(ReferenceData.java:2338)</SAP:AdditionalText>

<SAP:ApplicationFaultMessage namespace="" />

<SAP:Stack />

<SAP:Retry>M</SAP:Retry>

</SAP:Error>

Has anybody worked with this type of scenario? Please help me.

Thanks & Regards,

-Smita

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Smitha,

if you are calling a webserive from XI and the websevice call results in a soap exception, as of SP13 i am sure there is no way to capture this exception.

Work around approach would be to define exceptions for your sender RFC and hence when an exception is raised in XI, sender RFC will not dump instead you would have the defined exception caught.

CALL FUNCTION 'XYZ'

EXPORTING

IMPORTING

EXCEPTIONS

OTHERS = 1.

cheers,

Naveen

Former Member
0 Kudos

Hi Naveen,

I have already defined the exception for my RFC. But, there is no way to get back fault string in RFC to know due to what this error has occurred?

Thanks & Best Regards,

-Smita

Former Member
0 Kudos

Hi Smita,

I presume that you have your own Fault Data Message Type or the default ExchangeFaultData attached to the Synchronous Interface in XI.

The will have the error message from Web Service.

Now, are sure that the RFC function module in SAP has an IMPORTING parameter referring to the Fault Message Type? If not, the error data will not get into the RFC.

Hope this helps,

Bhanu