cancel
Showing results for 
Search instead for 
Did you mean: 

How to access SOAP fault in webservice dynpro model

Former Member
0 Kudos

Hi

I have a webservice which throws at certain circumstances a soap fault. I have created an adaptive webservice model for this webservice but I am unable to get the soap fault.

Until now I have tried these approaches:

1) Creating a complete request model and bind it to the controller context before calling the webservice over request.execute()

2) Catching the SOAPFaultException before catching the WDWSModelExecuteException. It never goes inside the SOAPFaultException, the only exception gets thrown by request.execute() is the WDWSModelExecuteException.

3) Get a SOAPFaultException over the WDWSModelExecuteException ex, ex.getSOAPFault(). Unfortunately the returned object (from type SOAPFault) is always null

At the moment I do not have any further approach to get the soap fault. Can someone explain me the right way to get the fault information?

Thanks a lot

Thierry

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

See the following blog post for more information about handling soap faults:

http://www.addon-software.de/2008/03/how-to-handle-a-standard-soapfault-in-adaptive-web-services/

Former Member
0 Kudos

Hi,

try to create your own exception class which extends SoapException. Then throw new YourException in the relevant catch clause.

Then on model import you will be able to select the string message of YourException... Nevertheless, I think their must be a different/better approach!

Regards,

Martin

Former Member
0 Kudos

Hi

Thanks for your answer. Well the request.execuite() only throws the WDWS... exception and there is no soap fault attached to this exception. Or did I understood you wrong? Even if i throw my own exception in the catch clause, i do still not have access to the soap fault data.

Kind regards,

Thierry

Former Member
0 Kudos

Hi,

sry... Are you consuming the webservice only or do you program the webservice by your own? Didn´t get it

Regards,

Martin

Former Member
0 Kudos

Hi

No problem. I consume it only in webdynpro.

Thierry

Former Member
0 Kudos

Nobody ever handled soap faults in WebDynpro for Java?