cancel
Showing results for 
Search instead for 
Did you mean: 

How to send back the soap fault message without details tag to the sender

Former Member
0 Kudos

Hello Expert,

Is it possible to send the soap fault message(fault String element value) without details tag as shown below to the sender in synchrounous scenario.


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
	<soapenv:Body>
		<soapenv:Fault>
			<faultcode>soapenv:Client</faultcode>
			<faultstring>autorizarComprobanteRequest.comprobanteCAERequest.arrayOtrosTributos.otroTributo(1).codigo - El Código de Tributo es obligatorio.</faultstring>
			<detail></detail>
		</soapenv:Fault>
	</soapenv:Body>
</soapenv:Envelope>

I have to send the faultstring element value in one of the element in response message back to sender? Is it possible using BPM?The above fault response does not have a fault payload (no detail element) and would result in a system error message.So how to handle this?

If yes .Please tell me the BPM design

faultstring value will be dynamic.

Thanks in advance

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

hello Yzanagi,

I have seen the FAQ of axis adapter which u have mentioned but i am not able to find the answer to the questions.(specifically How is the SOAP fault message mapped to the XI error message? for the receiver adapter)

when I opened folder com.sap.aii.adapter.axis.sample.web.war contains in the zip file attached to the note ,I could find the files developers-guide.htm,archeture-guide.htm..and other but they dont contain the required information.

Could u please point me to right file which i have to refer for the above question to use receiver soap adapter transport protocol:HTTP(Axis) and Message Protocol:Axis. or what setting in the receiver soap adapter required for converting the soap fault system error to application error so that I can map using the fault message mapping and sent it to the sender rfc.

also as my scenario is RFC--PISOAP.When webservice provider send the soap fault to PI ,it is converted to SAP error


<?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:P1> 
  <SAP:P2></SAP:P2> 
  <SAP:P3></SAP:P3> 
  <SAP:P4></SAP:P4> 
  <SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: - Elemento inválido: por favor verifique el nombre y/o ubicación del elemento authRequest</SAP:AdditionalText> 
  <SAP:Stack></SAP:Stack> 
  <SAP:Retry>M</SAP:Retry> 
  </SAP:Error>

when I am handling the SYSTEM_FAILURE = 1 MESSAGE msg exception in report program while calling the RFC in sender sap system and displaying the msg variable set by system when ever system error occur in PI,I am just getting part of the error messaeg not complete.Is there limit to the no of character set by system as even after declaring msg variable with more length it is just displaying part of it?

Former Member
0 Kudos

Hi Kubra,

I have seen the FAQ of axis adapter which u have mentioned but i am not able to find the answer to the questions.(specifically How is the SOAP fault message mapped to the XI error message? for the receiver adapter)

when I opened folder com.sap.aii.adapter.axis.sample.web.war contains in the zip file attached to the note ,I could find the files developers-guide.htm,archeture-guide.htm..and other but they dont contain the required information.

You just have to open the index.htm file which is the root document.

In addition to the answer to your question, there are other answers you find useful in configuring a plain Axis receiver channel.

And you won't be needing more than that.

Regards, yza

Former Member
0 Kudos

Thanks Yzanagi,

I have gone through the index.htm file.

In my scenario that is RFC -PI-soap(using http(Axis) protocol).when the webservice provider is sending the soap fault as.


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
	<soapenv:Body>
		<soapenv:Fault>
			<faultcode>soapenv:Client</faultcode>
			<faultstring>autorizarComprobanteRequest.comprobanteCAERequest.numeroComprobante - El Número de Comprobante debe ser mayor o igual a 1</faultstring>
			<detail></detail>
		</soapenv:Fault>
	</soapenv:Body>
</soapenv:Envelope>

In PI sxmb_moni it is converting to the error (system not application error)as shown below when using receiver soap adapter with https(Axis) transport protocol and Message protocol:Axis.


<?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:P1> 
  <SAP:P2></SAP:P2> 
  <SAP:P3></SAP:P3> 
  <SAP:P4></SAP:P4> 
  <SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: autorizarComprobanteRequest.comprobanteCAERequest.numeroComprobante - El Número de Comprobante debe ser mayor o igual a 1.</SAP:AdditionalText> 
  <SAP:Stack></SAP:Stack> 
  <SAP:Retry>M</SAP:Retry> 
  </SAP:Error>

As my requirement was (I have mentioned in my first question) that I want to pass

SAP:AdditionalText tag

value back to sender in one of the elements of response message payload or handle using fault message mapping if this error could be converted to application error and map to the RFC exception but unfortunately which is not possible even using AXIS adapter.

so other option to inform the sender RFC is mentioned here http://help.sap.com/saphelp_nw70/helpdata/en/22/0425e0488911d189490000e829fbbd/content.htm

but while handling the SYSTEM_FAILURE exception from PI at sender in report program and displaying the msg variable ,I am not getting complete error message..It is getting truncated.Is there a limit to the no of character the msg variable contains which is set by system.Even if we declare msg variable with more length(for example char length 500) it is just displaying part of the error message from PI.

Any Idea to read complete system error message from PI in report program at RFC sender..

Kind Regards,

Kubra fatima

former_member679189
Discoverer
0 Kudos

Hi Fatima,

Did you solve this issue??? I have the same problem. My scenario is RFC to SOAP, and i want to send back the AdditionalText to the sender system (in this case R3), but we have the same problem as you with the lenght of the message retrieved from the RFC exception. Please let me know how did you solve the problem. Thanks in advance. Nancy.

JaySchwendemann
Active Contributor
0 Kudos

Hi Kubra,

I know it's a long time (and a long shot) but did you happen to solve your problem and if so, mind sharing the solution?

I'm kinda in the same situation (except proxy instead of RFC).

Thanks / Cheers

Jens

Former Member
0 Kudos

Thanks yzanagi for your valuable reply

I appreciate if you can point me to any blog where usage of axis adapter is explained or steps to be followed to achieve this requirement and Is there any other way to handle this?

If I have to go for BPM where I can handle the system error with a static value how should I design the BPM.Please tell me the steps to be followed.

Thanks in advance

Kind Regards,

Kubra Fatima

Former Member
0 Kudos

Hi Kubra,

Just look into the FAQ note which I cited. This note explains how each property of the SOAP fault is mapped into the XI Error properties. You simply have to configure a receiver channel without any special setting. For that, you can find enough information in the online documentation and the FAQ note.

If you need a challenge, you can go for BPM or some custom mapping approach to get the SOAP fault string. But do you really need a challenge for just getting the fault string?

Regards, Yza

nabendu_sen
Active Contributor
0 Kudos

Hi Kubra,

For this your Source system should have a structure which will be returned. Then only you can map this in the Fault tab of OM. You have to create one Fault structure for SOAP (xsd) like below:

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://*****" targetNamespace="http://*******" elementFormDefault="qualified">

<xsd:element name="error" type="error" />

<xsd:complexType name="error">

<xsd:sequence>

<xsd:element name="text" type="xsd:string" />

</xsd:sequence>

</xsd:complexType>

</xsd:schema>

Former Member
0 Kudos

Hi,

In that case, you can just use the axis adapter. The soap fault string is simply extracted into the AdditionalText field of the XI Error. Basically, you can read each field of the soap fault into the XI Error.

The details are explained in the Axis Adapter FAQ note 1039369.

Regards, Yza

Former Member
0 Kudos

According to this thread and the Stephen Omond reply it is not possible using BPM too to catch soap-faults separately in BPM if the fault message is of type System Error and read the faultString value and send back to sender.

Please share your valuable inputs on the same and appreciate if any one can eloborate on the Guest reply in the same mentioned thread

Regards,

Kubra Fatima