Change WSDL

Discussion in 'ASP .Net Web Services' started by huohaodian@gmail.com, Jul 26, 2008.

  1. Guest

    Hi,

    I have a sample web method return a custom UserInfo object something
    like

    [WebMethod]

    public UserInfo GetUsers()

    { }

    The UserInfo is a class like

    public class UserInfo
    {
    private int mID = 0;
    private string mLName = string.Empty;

    public int ID
    {
    get { return mID; }
    set { mID = value; }
    }

    public string LastName
    {
    get { return mLName; }
    set
    { mLName = value; }
    }

    }

    When I run the web service the asp.net automatically create wsdl
    file with types for UserInfo has something like
    - <s:complexType name="UserInfo">
    - <s:sequence>
    <s:element minOccurs="1" maxOccurs="1" name="ID" type="s:int" /

    <s:element minOccurs="0" maxOccurs="1" name="LastName"
    type="s:string" />
    </s:sequence>
    </s:complexType>

    Is it possible to configure or to set element minOccurs ="1" for the
    last name also with some other restrictions, fg max length = 12 etc ?

    Any ways to setting up and use a manually created WSDL file for
    a asp.net web service?

    Thanks in advance.
     
    , Jul 26, 2008
    #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,634
    milfar
    Nov 14, 2008
  2. Chris Bedford
    Replies:
    0
    Views:
    587
    Chris Bedford
    Aug 21, 2003
  3. 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
  4. RH
    Replies:
    1
    Views:
    265
    Dino Chiesa [Microsoft]
    May 27, 2004
  5. mrnu

    wsdl.exe fails with WebMethods generated wsdl file

    mrnu, Jun 7, 2004, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    210
Loading...

Share This Page