加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c# – SOAP Web服务,更改命名空间而不编辑代码?

发布时间:2020-12-15 21:19:07 所属栏目:百科 来源:网络整理
导读:我是否能够在不编辑代码的情况下更改所有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-instan
我是否能够在不编辑代码的情况下更改所有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>

解决方法

据我所知,你不能改变命名空间,它是在类和方法的上下文中设置的.即使你以某种方式将它从另一个包裹起来,它仍然会覆盖.你唯一的选择是代理消费者.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读