0

我收到了一个示例肥皂消息:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/ xmlns:web="http://com.theirdomain/webservice">
   <soapenv:Header/>
   <soapenv:Body>
      <web:Transaction>
         <web:ID>123</web:ID>
         <web:order>221x</web:order>
         <web:trans>112-ax-21</web:trans>
         <web:date>2013-01-01</web:date>
         <web:title>Example title</web:title>
         <web:amount>
            <web:value>10.05</web:value>
            <web:currency>USD</web:currency>
         </web:amount>
         <web:status>status</web:status>
         <web:customer>
            <web:address>Berlin</web:address>
            <web:account>12345678901234567890123456</web:account>
         </web:cusweb:customeromerData>
         <web:docHash>HASHMD5</web:docHash>
      </web:Transaction>
   </soapenv:Body>
</soapenv:Envelope>

我需要一个工具或方法来快速创建一个经典的 ASP.NET XML WebService,方法是 NewTransaction,它接受一个 Transaction 对象。我想知道是否有一种方法可以快速创建反映给定肥皂的类(或类)。结果,我的 web 服务地址将提供给其他公司,他们将从那里生成 WSDL,并且他们希望使用在 WSDL 中定义的 Transaction 对象调用 NewTransaction 方法。

4

1 回答 1

0

您可以生成 WSDL,然后从该 WSDL 生成服务和数据契约

在新的 WCF 服务项目中键入几个属性和单个方法并启动它似乎更容易。这是 SOAP 1.1,所以使用basicHttpBinding.

于 2013-11-12T13:02:43.287 回答