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. Advertisements

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,927
    milfar
    Nov 14, 2008
  2. Chris Bedford
    Replies:
    0
    Views:
    765
    Chris Bedford
    Aug 21, 2003
  3. Craig
    Replies:
    0
    Views:
    605
    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:
    463
    Stephen Edgecombe
    Aug 13, 2003
  5. RH
    Replies:
    1
    Views:
    563
    Dino Chiesa [Microsoft]
    May 27, 2004
  6. mrnu

    wsdl.exe fails with WebMethods generated wsdl file

    mrnu, Jun 7, 2004, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    443
  7. Generate verbose WSDL from WSDL with imports

    , Apr 26, 2006, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    374
  8. Lyes Amazouz
    Replies:
    2
    Views:
    437
    Lyes Amazouz
    Aug 20, 2008
Loading...