cancel
Showing results for 
Search instead for 
Did you mean: 

How to catch a SOAP fault

Former Member
0 Kudos

Hi All,

I have a ISU to web service, PROXY to SOAP sync interface. I am getting following as response.

How can I get this into Fault message mapping?

I have followed these blogs:



  <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> 
- <!--  Inbound Message 
  --> 
- <SAP:Error SOAP:mustUnderstand="1" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
  <SAP:Category>XIAdapterFramework</SAP:Category> 
  <SAP:Code area="MESSAGE">GENERAL</SAP:Code> 
  <SAP:P1 /> 
  <SAP:P2 /> 
  <SAP:P3 /> 
  <SAP:P4 /> 
  <SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: SOAP: response message contains an error XIAdapter/PARSING/ADAPTER.SOAP_EXCEPTION - soap fault: Validation constraint violation: data type mismatch in element 'extraOverhead'</SAP:AdditionalText> 
  <SAP:Stack /> 
  <SAP:Retry>M</SAP:Retry> 
  </SAP:Error>

Thanks,

Aravind

Accepted Solutions (1)

Accepted Solutions (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>How can I get this into Fault message mapping?

You are doing interface between ISU and webservice. Here webservice hosting system is the provider. If the provider supports fault message then you do this. THat means open the wsdl you consume and see whether it has fault message. If so, use that fault message as webservice response and you create your custom fault message on the sender side i.e ISU side . And map the webservice fault response mesg to ISU (your fault created) mesg structure. If the webservice host team does not provide fault message, then you cannot create fault message.

Former Member
0 Kudos

Hi,

The WSDL does not contain a fault message neither the webservice has a well defined fault message structure.

So, a fault message is not possible here.

Thanks,

Aravind

Answers (2)

Answers (2)

former_member192851
Active Participant
0 Kudos

Check this threads

Former Member
0 Kudos

Hi,

The SOAP fault message can only be set by the web service provider.

So you have to do the validation in the application instead of using the XML Validation in Adapter Engine.

for you reference go through below thread,

regards,

ganesh.

Former Member
0 Kudos

Hi Ganesh,

I am not doing any XML Validation in Adapter Engine explicitly.

Thanks,

Aravind

PriyankaAnagani
Active Contributor
0 Kudos

Hi,

Can you please elaborate exactly what you are trying to achieve.....are you trying to display this error message to the user of client proxy...If so, You can catch the exceptions in client proxy using the two standard exception classes.

CATCH cx_ai_system_fault .

CATCH cx_ai_application_fault .

and in the catch block you can receive the error message and display it. The code will look like this

DATA : sys_fault TYPE REF TO cx_ai_system_fault,

text TYPE string.

CREATE OBJECT sys_fault.

CALL METHOD sys_fault->get_text

RECEIVING

result = text.

WRITE : /10 'System Fault ', 30 text.

Regards,

Priyanka

Former Member
0 Kudos

Hi Priyanka,

I am getting the above message as response in the sxmb_moni and is in error state. I want to send this error to the ISU.

Thanks,

Aravind