相关疑难解决方法(0)

Delphi SOAP Envelope和WCF

我正在开发一个提供soap接口的系统.其中一个将要使用该接口的系统在Delphi 7中编码.Web服务是使用WCF,基本的http绑定,SOAP 1.1开发的.

如果我使用SOAP UI(JAVA),该服务正常工作.但德尔福似乎在这里做了特别的事情;)

这是SOAP UI中消息的样子:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://services.xxx.de/xxx">
   <soapenv:Header/>
   <soapenv:Body>
      <ser:GetCustomer>
         <!--Optional:-->
         <ser:GetCustomerRequest> <!-- this is a data contract -->
            <ser:Id>?</ser:Id>
         </ser:GetCustomerRequest>
      </ser:GetCustomer>
   </soapenv:Body>
</soapenv:Envelope>
Run Code Online (Sandbox Code Playgroud)

我不是delphi开发人员,但我开发了一个简单的测试客户端,看看出了什么问题.这就是Delphi作为SOAP信封发送的内容.

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
  <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:NS2="http://services.xxx.de/xxx">
    <NS1:GetCustomer xmlns:NS1="http://services.xxx.de/xxx">
      <GetCustomerRequest href="#1"/>
    </NS1:GetCustomer>
    <NS2:GetCustomerRequest id="1" xsi:type="NS2:GetCustomerRequest">
      <Id xsi:type="xsd:int">253</Id>
    </NS2:GetCustomerRequest>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Run Code Online (Sandbox Code Playgroud)

WCF抛出一个德语错误...;)

Es wurde das Endelement"Body"aus命名空间" http://schemas.xmlsoap.org/soap/envelope/"erwartet.Gefunden wurde"Element"NS2:GetCustomerRequest"aus Namespace" http://services.xxx.de/xxx "".Zeile 1,职位599.

意味着什么

身体是预期的.但是找到了元素"NS2:GetCustomerReques".

现在我的问题是:我可以以某种方式改变Delphi创建信封的方式吗?或者是使WCF使用这种消息格式的方法?任何帮助是极大的赞赏!

.net c# delphi wcf soap

12
推荐指数
1
解决办法
9102
查看次数

标签 统计

.net ×1

c# ×1

delphi ×1

soap ×1

wcf ×1