I'm trying to build a webservice with ASP that will be given three parameters: a string, a date/time and another string. After making the method, the wsdl contains this:
<s:element name="TimesheetAudit"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="employeeNumber" type="s:string"/> <s:element minOccurs="1" maxOccurs="1" name="periodEndDate" type="s:dateTime"/> <s:element minOccurs="0" maxOccurs="1" name="timesheet" type="s:string"/> </s:sequence> </s:complexType> </s:element>
The black box calling my web service is complaining that there is a mismatch in the number of parameters. I am assuming this is because my webmethod is technically taking 1 parameter, a complex type, instead of three.
Is this the problem? If so, what can I do to overcome it?
Edit: The consumer is the black box in this case, I must mold my web service to match the caller. Adding
[SoapDocumentMethod(ParameterStyle = SoapParameterStyle.Bare)]
to my method signature gives the following error: ' 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.
R2204: A document-literal binding in a DESCRIPTION MUST refer, in each of its soapbind:body element(s), only to wsdl:part element(s) that have been defined using the element attribute.
- Part 'input' of message 'TimesheetAuditSoapIn' from service description with targetNamespace='http://www.netdes.com/'.
- Part 'TimesheetAuditResult' of message 'TimesheetAuditSoapOut' from service description with targetNamespace='http://www.netdes.com/'.