F
Felix_WafyTech
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 wsdlortType is disallowed by the Profile. A wsdlortType
in a DESCRIPTION MUST have operations with distinct values for their name
attributes. Note that this requirement applies only to the wsdlperations
within a given wsdlortType. A wsdlortType may have wsdlperations with
names that are the same as those found in other wsdlortTypes. - 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
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 wsdlortType is disallowed by the Profile. A wsdlortType
in a DESCRIPTION MUST have operations with distinct values for their name
attributes. Note that this requirement applies only to the wsdlperations
within a given wsdlortType. A wsdlortType may have wsdlperations with
names that are the same as those found in other wsdlortTypes. - 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