how to add input field to WSDL?

pillmill
pillmill used Ask the Experts™
on
How do I add an input field to a WSDL?

The attached WSDL references the method - finduser.

I now want getuser to have a single, integer argument.

How do I modify this WSDL?
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" 

xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" 

xmlns:tns="http://tempuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" 

xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" 

targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <wsdl:types>
    <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
      <s:element name="finduser">
        <s:complexType />
      </s:element>
      <s:element name="finduserResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="finduserResult" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
    </s:schema>
  </wsdl:types>
  <wsdl:message name="finduserSoapIn">
    <wsdl:part name="parameters" element="tns:finduser" />
  </wsdl:message>
  <wsdl:message name="finduserSoapOut">
    <wsdl:part name="parameters" element="tns:finduserResponse" />
  </wsdl:message>
  <wsdl:portType name="ServiceSoap">
    <wsdl:operation name="finduser">
      <wsdl:input message="tns:finduserSoapIn" />
      <wsdl:output message="tns:finduserSoapOut" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="ServiceSoap" type="tns:ServiceSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="finduser">
      <soap:operation soapAction="http://tempuri.org/finduser" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:binding name="ServiceSoap12" type="tns:ServiceSoap">
    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="finduser">
      <soap12:operation soapAction="http://tempuri.org/finduser" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="Service">
    <wsdl:port name="ServiceSoap" binding="tns:ServiceSoap">
      <soap:address location="http://company.site.com/soapservice/MyHandler.py" />
    </wsdl:port>
    <wsdl:port name="ServiceSoap12" binding="tns:ServiceSoap12">
      <soap12:address location="http://company.site.com/soapservice/MyHandler.py" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Chief Technology Officer
Most Valuable Expert 2011
Commented:
pillmill:

Hello!

You should be able to change as follows:

<s:element name="finduser">
        <s:complexType />
      </s:element>

Would be modified to:

<s:element name="finduser">
        <s:complexType>
        <s:sequence>
 <s:element minOccurs="1" maxOccurs="1" name="UserID" type="s:int" />
  </s:sequence>
      </s:element>

Name the parameter whatever you would like.

--isa

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial