*
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes Defining a detail element for a fault in a WSDL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "Defining a detail element for a fault in a WSDL" Watch "Defining a detail element for a fault in a WSDL" New topic
Author

Defining a detail element for a fault in a WSDL

Allexicus Kernikus
Ranch Hand

Joined: Oct 07, 2009
Posts: 42
Hi guys!

Is my assumption correct that if i define a fault message in the portType.operation node, in the case of that fault, the fault.detail element will hold a node with the local name of the porType.operation.fault.name value?

If so - what happens if the porType.operation.fault.name is not given (that attribute is optional)?

Many thanks in advance!

Take care, Alex

Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Your assumption is not correct.
In an attempt to clarify, I'll give an example:
In the <wsdl:types> element in the WSDL of a web service, there is an element declaration:

In the WSDL, there is the following <wsdl:message>, <wsdl:portType> and <wsdl:binding> definitions:

Note that the <wsdl:fault> in the <wsdl:binding> element uses the name element to refer to the corresponding <wsdl:fault> element in the <wsdl:portType> element.

If the web service in question generates a fault, the SOAP message returned will look like this:


Note how the <detail> element contains the <addValuesFault> element, as defined in the <wsdl:types> section. The <addValuesFault> element, in turn, contains the three child elements <errorMsg>, <value1> and <value2> - again according to the definition of the <addValuesFault> element.
As far as I can tell, there is nothing specifying how to use the name attribute you ask about in the SOAP 1.1 or WSDL 1.1 specifications.
References:
http://www.w3.org/TR/wsdl
http://www.w3.org/TR/2000/NOTE-SOAP-20000508/
Best wishes!
Allexicus Kernikus
Ranch Hand

Joined: Oct 07, 2009
Posts: 42
Many thanks for the great help!
 
jQuery in Action, 2nd edition
 
subject: Defining a detail element for a fault in a WSDL
 
Similar Threads
Maven excluding dependencies from ear
Page 123
faultcode,faultstring is mandatory?
A BP question(R1030): what is end user in w
Diff between Element and node