我有一个WCF Web服务,这必须接受来自其他非.net客户端的请求,我的问题是WCF正在考虑像这样的肥皂:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<myMethod xmlns="http://webservices.myServices/">
<param1>ABC</param1>
<param2>123</param2>
</myMethod>
</soapenv:Body>
</soapenv:Envelope>
但客户端正在发送
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:q0="http://webservices.myServices/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<q0:myMethod>
<param1>ABC</param1>
<param2>123</param2>
</q0:myMethod>
</soapenv:Body>
</soapenv:Envelope>
唯一的区别是xmlnamespace在Envelope标签内,但由于某种原因,WCF不理解它。