WSDL: Difference between revisions

1,359 bytes added ,  2 December 2007
Adding...
(adding)
(Adding...)
Line 64: Line 64:
There will then be '''<input>''' and '''<output>''' elements, each of which will contain a ''message'' attribute, pointing to (the ''name'' attribute of) a '''message''' element (see below) which will hold the definition of that input or output message. Such message elements will usually appear within the same WSDL document and thus will commonly have the "tns" prefix.
There will then be '''<input>''' and '''<output>''' elements, each of which will contain a ''message'' attribute, pointing to (the ''name'' attribute of) a '''message''' element (see below) which will hold the definition of that input or output message. Such message elements will usually appear within the same WSDL document and thus will commonly have the "tns" prefix.


===The "''message''" elememt===
===The "''message''" element===
The '''message''' elements define the structure of the data which will be passed as the contents to and from the service.
 
Each message element has a ''name'' attribute (which is what the ''message'' attributes of the portType input/output message elements was pointing to).
 
Typically the message element will then contain '''<part>''' element(s). In the case of [[Document Style SOAP|document-style]] services there will only be one of these, as in document-style all the data tends to be sent (or received) as a single XML ''document'' (hence the name), however for [[RPC Style SOAP|RPC-style]] services there may be any number, with each corresponding to a parameter passed to, or returned from, the implementing function or procedure. Each part element will have a ''name'' attribute - in Document-style this is usually always "parameters", while in RPC-style it will be the name of the argument to the function. Finally there will <u>either</u> be a ''type'' attribute (RPC only) or an ''element'' attribute (RPC or Document). If a ''type'' attribute is used then it will define the primitive XML data type of the parameter. If an ''element'' attribute is used then it will refer to a data type (complex or otherwise) defined elsewhere - typically in the '''<types>''' element (see below) of the same WSDL document and hence will have the "tns" prefix.


===The "''types''" element===
===The "''types''" element===