cancel
Showing results for 
Search instead for 
Did you mean: 

Proxy to SOAP Sync. Scenario - Fault Handling Issue

former_member211899
Participant
0 Kudos

Hi Experts,

I am facing an issue in capturing the fault from the Webservice and sending it back to the ECC system, in a Proxy to SOAP synchronous scenario.

I have gone through blogs with similar issues and have tried the steps as directed but still unable to reach a solution.

1. I have checked the "Do Not Use SOAP Envelope" in the SOAP Receiver Channel

2. I have used the following module configuration.

3. I have also used a Fault Message Mapping with the Error Message in the WSDL provided by the third party.

4. The fault message looks like below:

When the SOAP request is missing the country code, the Webservice returns the above fault response but it is not sent back to the ECC system. Instead it is visible in the PI message monitor as a Log Version and the outbound message has the status "Cancelled"

5. In the aforesaid scenario, the error shown in the "Cancelled" message points to the Response Mapping and not the Fault Mapping.

Transmitting the message using connection AFW failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error encountered while executing mapping: com.sap.aii.af.service.mapping.MappingException: Mapping failed in runtimeRuntime Exception when executing application mapping program com/sap/xi/tf/_MM_Res_; Details: com.sap.aii.utilxi.misc.api.BaseRuntimeException; The markup in the document following the root element must be well-formed.

6.The happy path is working perfectly and we are using XSLT mapping for removing the SOAP envelope from the response before feeding it to the Response Mapping.

Requesting your valuable help in resolving this issue.

Accepted Solutions (1)

Accepted Solutions (1)

former_member190293
Active Contributor

Hi Krishna!

The point is that in case of System Fault you should use response mapping, not the Fault mapping. Fault mapping is intended to be used to catch Application faults.

You should check your response message in mapping: if element "soapenv:Fault" exists - you've got System fault response, otherwise - it's normal response.

Regards, Evgeniy.

former_member211899
Participant
0 Kudos

Thanks Evgeniy.

Following your lead, I created a Combined Envelope XSD and used it as the Response Message Type

The source of this looks as follows:

However, the Fault Response sent by the Webservice (mentioned in my original question), does not have any namespace prefix for the nodes faultcode, faultstring and detail. Hence when i copy paste that xml into the above source text box, the subnodes of the Fault are shown in RED and hence, the mapping is not successful. Can you kindly suggest a solution to this ?

former_member190293
Active Contributor
0 Kudos

Hi Krishna!

I would strongly suggest using XSL transformation for response mapping. When using it you don't need to define the complex response message structure in ESR (you may use standard response structure) since no schema validation is performed when you use XSL transformation.

Regards, Evgeniy.

former_member211899
Participant
0 Kudos

Thanks Evegeniy,

The XSL transformation idea actually worked.

What we did was to add an XSLT mapping before the original response mapping to add the <soapenv: prefix to the three nodes faultcode, faultstring and detail.

Both the fault and successful responses are working perfectly now. Thanks a lot for your suggestions 🙂

Regards,

Krish

Answers (1)

Answers (1)

diego_a
Participant
0 Kudos

Hello how are you ?

they have the complete example because I am with the same error and I can not solve it, could they send captures? to see how they configured it. the scenario that I have is PROXY TO SOAP, the channel receiver that returns the fault.

regards,