4

Why WSDL introduces wsdl:message? And message parts?

What the advantage they could bring over the direct using of the XSD in the operations parameters (input, output, fault)?

How they (wsdl messages with wsdl message parts) can be more abstract then XSD?

Why it is not organized for example that way:

<operation name="GetEndorsingBoarder"> 
  <input type="xsd:string"/> 
  <output type="xsd:string, xsd:int, xsd:boolean"/> 
  <fault "type="xsd:string""/> 
</operation>
Roman Pokrovskij
  • 9,449
  • 21
  • 87
  • 142
  • Dear Voodoo, your answer is a good example of answers that I will never accept as answers, ok, may be you are answering but not on my question. – Roman Pokrovskij Nov 27 '10 at 04:20
  • If you get many answers which you consider off topic then I would suggest that you should be discrete in your questions and look at the questions you ask and make sure they are understandable (maybe use English translators if you need to). For example this question is almost missing some limbs...and I tried to do the best I could, which seems to have upset you. So just ignore it or downvote it! – VoodooChild Nov 27 '10 at 04:47

2 Answers2

1

I got it:

Messages not just specify operation's parameters.

Messages and theirs parts are referred in the bindings. It should be possible to bind different parts differently:

<message name="m1">
    <part name="body" element="tns:GetCompanyInfo"/>
</message>

<message name="m2">
    <part name="body" element="tns:GetCompanyInfoResult"/>
    <part name="docs" type="xsd:string"/>
    <part name="logo" type="tns:ArrayOfBinary"/>
</message>

<portType name="pt1">
    <operation name="GetCompanyInfo">
       <input message="m1"/>
       <output message="m2"/>
    </operation>
</portType>

 <binding name="b1" type="tns:pt1">
        <operation name="GetCompanyInfo">
           <soap:operation soapAction="http://example.com/GetCompanyInfo"/>
           <input>
               <soap:body use="literal"/>
           </input>
           <output>
               <mime:multipartRelated>
                   <mime:part>
                       <soap:body parts="body" use="literal"/>
                   </mime:part>
                   <mime:part>
                       <mime:content part="docs" type="text/html"/>
                   </mime:part>
                   <mime:part>
                       <mime:content part="logo" type="image/gif"/>
                       <mime:content part="logo" type="image/jpeg"/>
                   </mime:part>
               </mime:multipartRelated>
           </output>
        </operation>
    </binding>

I have missed this since "non SOAP 'literal'" bindings are so uncommon.

Roman Pokrovskij
  • 9,449
  • 21
  • 87
  • 142
0

A XSD describes the DATA aspects, for example data aspects of webservice call whereas the WSDL describes the purpose of the web services (method calls). You cannot typically figure out the method calls from your data alone.

Check out Cheeso and Marc answers on Generating a WSDL from an XSD file

EDIT: source

The message describes the data being exchanged between the web services' provider and consumer and each web service has two messages: 1) input: parameters of the web service 2) output: return data from the web service

Each message has zero or more part parameters (one for each parameter of the web service's function) Each part parameter associates with a concrete type defined in the types container element.

   <message name="SayHelloRequest">
      <part name="firstName" type="xsd:string"/>
   </message>
   <message name="SayHelloResponse">
      <part name="greeting" type="xsd:string"/>
   </message>

Here, two message elements are defined. The first represents a request message SayHelloRequest, and the second represents a response message SayHelloResponse.

Each of these messages contains a single part element. For the request, the part specifies the function parameters; in this case, we specify a single firstName parameter. For the response, the part specifies the function return values; in this case, we specify a single greeting return value.

Community
  • 1
  • 1
VoodooChild
  • 9,776
  • 8
  • 66
  • 99