title: How to use the same WSDL message defenitions in multiple functions?
body: <p>I had some errors about invalid definitions coming from Visual Studio 2010 when trying to call a WSDL defined function. The problem was that you cannot use the same message definition in two seperate functions. So I have to create multiple message definitions while they do the same.</p>
  
  <p>For instance:</p>
  
  <pre><code>&lt;message name="Hi"&gt;
    &lt;part name="input" type="xsd:string"&gt;
  &lt;/message&gt;
  &lt;message name="Say_hi_back"&gt;
    &lt;part name="return" type="xsd:string"&gt;
  &lt;/message&gt;
  &lt;message name="I_hate_you"&gt;
    &lt;part name="return" type="xsd:string"&gt;
  &lt;/message&gt;
  
  &lt;portType name="DataPort"&gt;
     &lt;operation name="sayHello"&gt;
        &lt;input message="tns:Hi"/&gt;
        &lt;output message="tns:Say_hi_back"/&gt;
     &lt;/operation&gt;
     &lt;operation name="sayIHateYou"&gt;
        &lt;input message="tns:Hi"/&gt;
        &lt;output message="tns:I_hate_you"/&gt;
     &lt;/operation&gt;
  &lt;/portType&gt;
  </code></pre>
  
  <p>Now calling either one of the functions will give you an error. Unless I add a Hi2 with exactly the same parts and change one of the input messages in the operation definitions to tns:Hi2.</p>
  
  <p>Why is this? It makes no sense. I'm building up a service where I'm going to have to add the customerID to all the functions I'm going to build. One function for getting the appointments, one for the payments, one for all. This means I'm going to have to copy the message definition like 10 times and name them getCustomerID*N*. </p>
  
  <p>Also a lot of times I'm going to have to have multiple input parameters. Say for instance someone wants to have all appointments between date x and date y. (And this goes for all the information that is stored like payments etc.) While I only need one message with an int, a date and a date. I'm going to have to write a huge document.</p>
  
  <p>So my question is if there is any other way to do this. I've only been working with WSDL for two days and those were two days full of problems and deceiving 'victories'. Where you solve one problem only to find out that opened the gate to the next.</p>
  
  <p>Thanks. :)</p>