The WS-I organization publishes non-proprietary Web services specifications to promote the interoperability of Web services across platforms. This enumeration is used by the ConformsTo property of the WebServiceBindingAttribute attribute to indicate the WSI specification to which the Web service claims to conform.
If web service code aren't compliant to WS-I, it still don't generate compilation error, but it will generate error while client add or update web reference .
You can do a test, WS-I specification don't allow overload method, you can try it. I tried a sample :
The WS-I organization publishes non-proprietary Web services specifications to promote the interoperability of Web services across platforms. This enumeration is used by the ConformsTo property of the WebServiceBindingAttribute attribute to indicate the WSI specification to which the Web service claims to conform.
ReplyDeleteIf web service code aren't compliant to WS-I, it still don't generate compilation error, but it will generate error while client add or update web reference .
You can do a test, WS-I specification don't allow overload method, you can try it. I tried a sample :
[WebServiceBinding(ConformsTo=WsiProfiles.BasicProfile1_1)]
public class Service : System.Web.Services.WebService
{
public Service () {
//Uncomment the following line if using designed components
//InitializeComponent();
}
[WebMethod]
public string HelloWorld() {
return "Hello World";
}
[WebMethod(MessageName="my")]
public Person GetPerson()
{
Person p = new Person();
p.Old = 22;
// p.MyHuman = DBNull(null);
return p;
}
[WebMethod(MessageName="you")]
public Person GetPerson(int i)
{
Person p = new Person();
p.Old = 22;
// p.MyHuman = DBNull(null);
return p;
}
}
Above web service will compile successfully, but can't add web reference successfully.
All WebMethods Must be Unique ..
ReplyDelete