SOAP Web服务,无需编辑代码即可更改名称空间?

问题描述

| 是否可以在所有SOAP Web服务方法中更改名称空间,而无需编辑代码? 这条线...
<ConfirmIdentity xmlns=\"http://www.domain.com\"> ?
这可能吗?
<?xml version=\"1.0\" encoding=\"utf-8\"?>
<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">
  <soap:Body>
    <ConfirmIdentity xmlns=\"http://www.domain.com\">
      <ConfirmIdentityRequest>
        <ApplicationCrediential>
          <API_Username>string</API_Username>
          <API_Password>string</API_Password>
        </ApplicationCrediential>
        <SessionId>string</SessionId>
      </ConfirmIdentityRequest>
    </ConfirmIdentity>
  </soap:Body>
</soap:Envelope>
    

解决方法

        据我所知,您不能更改名称空间,它是在类和方法的上下文中设置的。即使您以某种方式将其从另一个包装,它仍然会覆盖。您唯一的选择是代理使用者。