If an error occurs with a Web method, a SOAP Fault is returned. The SOAP Fault is the standard means of returning exception information for Web services.
The Fault message contains standardized <Message> and <Code> elements, however, the <Detail> element is the most informative. The <Detail> element contains <errorID> and <Message> elements. The <Message> contains an English string that describes errors. The <Message> elements are more suitable for developers and more appropriate messages should display for users.
Example
The following illustrates a SOAP Fault when bad parameters are supplied to LogIn() method:
<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <soapenv:Fault> <faultcode>soapenv:Server.userException</faultcode> <faultstring>com.ejbtech.processmanager.services.PMServiceException: Malformed URL</faultstring> <detail> <com.ejbtech.processmanager.services.PMServiceException xsi:type="ns1:PMServiceException" xmlns:ns1="urn:services.processmanager.ejbtech.com"> <errorID xsi:type="xsd:string" xsi:nil="true"/> <message xsi:type="xsd:string">Malformed URL</message> </com.ejbtech.processmanager.services.PMServiceException> </detail> </soapenv:Fault> </soapenv:Body> </soapenv:Envelope>
| Copyright © 2010 CA. All rights reserved. | Tell Technical Publications how we can improve this information |