Mapping of type string in WSDL

Discussion in 'ASP .Net Web Services' started by oliver.wulff@zurich.ch, May 6, 2004.

  1. Guest

    Hi

    I've got the following webmethod:

    [WebMethod]
    public string Hello( string name)
    {
    return "Hello " + name;
    }

    This webmethod is mapped to the following element definition:
    <s:element name="Hello">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="name" type="s:string"
    />
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="HelloResponse">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="HelloResult"
    type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>

    I've got a problem with the minOccurs and maxOccurs. That looks like an
    array with one element.

    How can I influence the WSDL generation to have the following element
    definition:
    <s:element name="Hello">
    <s:complexType>
    <s:sequence>
    <s:element name="name" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="HelloResponse">
    <s:complexType>
    <s:sequence>
    <s:element name="HelloResult" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>

    I hope that this is possible. Thanks for any help!

    Oliver
     
    , May 6, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dark
    Replies:
    1
    Views:
    4,632
    milfar
    Nov 14, 2008
  2. Chris Bedford
    Replies:
    0
    Views:
    586
    Chris Bedford
    Aug 21, 2003
  3. Craig
    Replies:
    0
    Views:
    444
    Craig
    Feb 9, 2004
  4. Stephen Edgecombe

    WSDL.EXE: WSDL Import Directive

    Stephen Edgecombe, Aug 13, 2003, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    240
    Stephen Edgecombe
    Aug 13, 2003
  5. Lyes Amazouz
    Replies:
    2
    Views:
    286
    Lyes Amazouz
    Aug 20, 2008
Loading...

Share This Page