2

我使用 wsdl.exe 创建了一个代理类。它正在发送一个如下所列的肥皂信封,该信封不起作用,因为路由器的另一端期望其中包含一组不同的命名空间

<?xml version="1.0" encoding="utf-16"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<sayHelloWorld xmlns="http://example.com/hro/benefits/helloworld/xsd/">
  <brokerHeader>
    <brokerUserId xmlns="http://my.com/hro/benefits/cm/xsd/v2_0">test</brokerUserId>
    <clientId xmlns="http://my.com/hro/benefits/cm/xsd/v2_0">010666</clientId>
    <callerRefId xmlns="http://my.com/hro/benefits/cm/xsd/v2_0">01066633934717</callerRefId>
  </brokerHeader>
  <greeting>Hello</greeting>
  <sleep>0</sleep>
</sayHelloWorld>
</soap:Body>
</soap:Envelope>

这不起作用,因为只有当我在肥皂信封中有以下值时,路由器才能工作

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
  xmlns:v2="http://my.com/hro/benefits/cm/xsd/v2_0" 
  xmlns:xsd="http://my.com/hro/benefits/helloworld/xsd/">

问题是如何更改代理类以发送所需的信封。

4

0 回答 0