cancel
Showing results for 
Search instead for 
Did you mean: 

Fault message in SOAP outbound Sync when response is in HTML

Former Member
0 Kudos
1,261

Hi Guys,

My Scenario is Synchronous outbound. We are sending request from ECC and getting response. We are getting authorization error for the users who dont have access. I have only 1 xsd which I have used for request and response. I dont have any error structure from Third party. So I made a below Fault message and imported it as a external definition.

The HTML response which I get in SOAP UI

<html>
<body>
<h3>[HTPRP0102]Authorisation failed!
<br>dcx.eva.advanced.urlcall.exception.AuthorisationFailedException occurred!
</h3>
<br>Command is /process_claim
</body>
</html>

The XSD Which I have made for fault message which I use in External definition is

<?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">; <xsd:element name="html"> <xsd:complexType> <xsd:sequence> <xsd:element name="body" type="xsd:string" minOccurs="0" /> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema>

The system error which I get in PI is

Transmitting the message using connection SOAP_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: SOAP: Response message contains an errorXIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 402 [HTPRP0102]Authorisation failed

My motive is to send the authorization error in Payload in ECC. I am not sure how to proceed here.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Guys,

I understand that I have to use XSLT/Java but I want to know when I have to use it.

There are few options.

1. Use the XSD as external definition, then use it in SI and MM and OM.

2. There is one option of using Java class/XSLT in OM but I don't know how it will work since I have to use something in SI then If i am using JAVA/XSLT in OM then what will I use in SI ?

3. As suggested by Vibu- Try using XSLT mapping to convert HTML to XML, -- where do i need to put xslt for changing HTML to XML ?

MY HTML format I have given already in my question. I am pasting my XSD as well .


Please suggest.

Thanks,

Sherwin

Former Member
0 Kudos

Try using XSLT mapping to convert HTML to xml and mapping it to the fault XSD that you have created and added to your interface.

Best,

Vibhu

manoj_khavatkopp
Active Contributor
0 Kudos

Hey Sherwin,

The authorizatiom error is system error and not application error message so i dont think u can handle it via soap fault if you are getting this html auth error in normal response then you may use some java to convert that html response to your sender response and post it back.

Br,

Manoj

Former Member
0 Kudos

in order to receive the fault error, you need to put the module configuration in the receiver soap channel. by default, soap adapter will return response only success case. when any failure and fault error returned, module confi needs to be carried out.

https://blogs.sap.com/2015/07/29/soap-faults-and-webservice-faults-from-3rd-party-webservices/

Former Member
0 Kudos

HI,

Thanks for the reply. The issue is what I am getting HTML as an error response in case of failure. When its successful then there is no issue but when it is in error it sends HTML. DO I need to use MessageTransformBean ?


Thanks,

Sherwin

Former Member
0 Kudos

yes. you need to use MessageTransformBean to capture the fault error.

Your mapping should be producing same response output.

try to add 0.1 occurrence field in the response and populate it when error occurs.

Former Member
0 Kudos

Thanks for the reply.

I am trying to use XSLT/java approach Then I Belive I dont have to use MessageTransformBean. Can you check my below reply and suggest ?


Thanks,

Sherwin