HOME | J2ME | Struts | AJAX | SOAP | SOA MEDIA STREAMING AXIS |
SOAP Tutorial
Introduction
Building Blocks
Fault Element
SOAP Header
SOAP Attachments

 

 

SOAP Fault Element

Back | Tutorial Home | Next

The last section's unsuccessful login SOAP message can also be packaged as a Fault element as described below

<soap:Envelope
xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/
soap:encodingStyle=" http://schemas.xmlsoap.org/soap/encoding/" >
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>Login Error</faultstring>
<faultactor>Web Site User</faultactor>
<detail>
<lg:SiteError xmlns:lg="urn:MyServer">
<errormessage>Wrong User Name Entered</errormessage>
</lg:SiteError>
</detail>
</soap:Body>
</soap:Envelope>

Lets dissect the above SOAP message

  • faultcode – Code to classify the fault. This element can have following values

  • Client: This code indicates the improper data format has been sent and format needs to be changed and sent
    Server: This code indicates that this error is not due to improper data format and error is due by the server after request processing.
    VersionMismatch: Invalid version of SOAP envelop namespace
    MustUnderstand: An immediate child element of the SOAP Header has attribute “MustUnderstand” set as 1 is not understood by the request receiver. We will have a better look at this attribute in next section.
  • faultstring – fault message that can be easily understandable
  • faultactor – the actor in the system who is the cause of this error
  • detail – detailed error parameters

Back | Tutorial Home | Next

site comments powered by Disqus
Download our free toolbar

toolbar powered by Conduit

| Copyright © 2009. All rights reserved | Terms and Conditions | About | Contact | Feed Back |