cancel
Showing results for 
Search instead for 
Did you mean: 

Scenario SOAP <-> PI <-> PROXY - Exception handling

Former Member
0 Kudos

Hi all,

I have the following scenario:

Scenario SOAP(.NET) <-> PI <-> PROXY

When I raise an exception at the proxy side, PI will be informed with an exception text that an exception has occured.

In the .NET receiver I only get an application exception (but not the real exception) - no exception text

How can I get the exception text at .NET side?

There is a datatype of type "XXXXException".

But I can't use this class in the catch block because it is not inherited from class exception.

regards

Accepted Solutions (0)

Answers (1)

Answers (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>>>How can I get the exception text at .NET side?

Answer: Happy flow request and response are fine and no problem. when it comes to exception message, we need meaningful lnformation. It's even hard to diagnose. So use Fault message in the target side and map that to the webservice exception message on the sender side. In the proxy coding side , when you raise exception, populate the error message detals to the fault message class.

create request, response and fault message . You have to specify that in the sender and receive interface.

That is the sugguestion

/people/shabarish.vijayakumar/blog/2006/11/02/fault-message-types--a-demo-part-1

/people/jin.shin/blog/2007/05/21/handling-web-service-soap-fault-responses-in-sap-netweaver-xi

Former Member
0 Kudos

Hi,

thanks for your answer.

But how to handle the exception in my C# client:

I have created the .NET classes out of the WSDL

There is a class ZQM_SVC_QMEL_GETException generated, but I don't know how to use it.

try

{

res.ES_SVC_QMEL = client.MI_OSRBG_QM_MASTERDATA_AUDIT_QMEL_GET_SYNC_OUT("123");

}

catch (ZQM_SVC_QMEL_GETException ex1)

{

This coding is not working because the class ZQM_SVC_QMEL_GETException is not inherited from the class exception.

This class has an attribute Nodes and several methods getSchema, ReadXML, WriteXML.

But I don't know how to use it.

Any idea?

regards

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>> But I don't know how to use it

Yo dont need to code for this. If you find exception message XSD on the wsdl for your scenario, use that fault message and map the proxy fault message to it. Client who is using webservice will get backend proxy exception message as soap response message.