我试图用ASP构建一个web服务,它将被赋予三个参数:一个字符串,一个日期/时间和另一个字符串。制作方法后,WSDL包含此:没有复杂类型的ASP.NET WebService
<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>
黑盒呼叫我的web服务的抱怨存在的参数的数量不匹配。我假设这是因为我的webmethod技术上采取1参数,复杂类型,而不是3。
这是问题吗?如果是这样,我能做些什么来克服它?
编辑:在这种情况下,消费者是黑匣子,我必须建模我的web服务以匹配调用者。 添加
[SoapDocumentMethod(ParameterStyle = SoapParameterStyle.Bare)]
我的方法签名提供了以下错误:
' 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/ '.
您在测试容器中有任何问题? – Perpetualcoder 2009-01-27 22:29:48