Change WSDL

H

huohaodian

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top