我们正在向.Net 3.5 ASMX Web服务发送以下请求。ASMX WebServices问题
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<Login xmlns="http://tempuri.org/" id="o0" SOAP-ENC:root="1">
<password xsi:type="xsd:string">1234</password>
<userName xsi:type="xsd:string">Developer</userName>
</Login>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
在调试,web服务,我们发现,可用于网络方法(登录和方法)的parametr值为空。 但是,如果我们从密码和用户名中删除xsi:type =“xsd:string”属性,则一切正常。
命名空间xsd指向http://www.w3.org/2001/XMLSchema,它是有效的。
为什么不能.Net反序列化响应?为什么它不抛出异常? BTW:我们的服务定义别名http://www.w3.org/2001/XMLSchema为“s”。这可能是一个问题吗?
亲切的问候,
是为在Stack Overflow上的可读性添加的
标记,还是它们是你信封的一部分? – RuudKok 2009-03-05 10:07:08
为了便于阅读,增加:) – 2009-03-05 10:52:04