on 07-24-2008 6:09 PM
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
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/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.