Skip to Content
avatar image
Former Member

Fault message in SOAP outbound Sync when response is in HTML

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

http://www.w3.org/2001/XMLSchema">;

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Jul 25, 2017 at 01:27 PM

    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/

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

  • Jul 25, 2017 at 07:16 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 26, 2017 at 12:50 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 26, 2017 at 07:09 AM

    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

    Add comment
    10|10000 characters needed characters exceeded