Hi,
I have a web service with the attribute specified below:
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
In the web service, I have two functions with the same name but with
different parameters (overloaded). Like the example provided below:
[WebMethod(MessageName = "GetAllRecords", Description = "Retrieves all
records.")]
public List<Record> GetAllRecords()
{
return bl.GetAllRecords();
}
[WebMethod(MessageName = "GetAllRecordsSorted", Description = "Retrieves
records sorted by the specified parameter.")]
public List<Record> GetAllRecords(string sortExpression)
{
return bl.GetAllRecords(sortExpression);
}
The problem is: I'm unable to open the web service in a browser as it
generates the error message specified below. However, when I remove the
attribute "[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]" it
works as expected.
Service 'WebService' does not conform to WS-I Basic Profile v1.1. Please
examine each of the normative statement violations below. To turn off
conformance check set the ConformanceClaims property on corresponding
WebServiceBinding attribute to WsiClaims.None. R2304: Operation name
overloading in a wsdl:portType is disallowed by the Profile. A wsdl:portType
in a DESCRIPTION MUST have operations with distinct values for their name
attributes. Note that this requirement applies only to the wsdl:operations
within a given wsdl:portType. A wsdl:portType may have wsdl:operations with
names that are the same as those found in other wsdl:portTypes. - Operation
'GetAllRecords' on portType 'WebServiceSoap' from namespace
'http://tempuri.org/'. To make service conformant please make sure that all
web methods belonging to the same binding have unique names.
My question is:
1. What does the "[WebServiceBinding(ConformsTo =
WsiProfiles.BasicProfile1_1)]" attribute specify and why is it needed?
2. What are the consequences of removing it from the web service?
Any help is very much appreciated.
Thanks,
Felix.J
Josh Twist - 03 Mar 2006 08:29 GMT
Hi Felix,
In short, the consequences are potential interoperability. The Basic
Profile 1.1 is an industry standard, it maybe that web service clients
written in other languages (maybe java for example) couldn't
communicate with your web service because it is non standard.
I personally try and stick with the basic profile after all you only
have to change the method name.
Josh
http://www.thejoyofcode.com/
Rodrigo García - 03 Mar 2006 13:00 GMT
Hi,
Check the http://www.ws-i.org website, there you have the tools to check for
interoperability issues.
Regards, Rodrigo.
> Hi,
>
[quoted text clipped - 46 lines]
> Thanks,
> Felix.J
Josh Twist - 03 Mar 2006 13:24 GMT
Maybe I'm being dumb but I can't find the tools? Do you have to be a
member? Can you link to the page?
Thanks
Josh
http://www.thejoyofcode.com/
Rodrigo García - 06 Mar 2006 07:43 GMT
Here is the link, sorry for the delay
http://www.ws-i.org/deliverables/workinggroup.aspx?wg=testingtools
> Maybe I'm being dumb but I can't find the tools? Do you have to be a
> member? Can you link to the page?
[quoted text clipped - 3 lines]
> Josh
> http://www.thejoyofcode.com/