【问题标题】:wcf methods soap message formatwcf方法soap消息格式
【发布时间】:2013-02-18 01:39:24
【问题描述】:

我知道定义的soap消息格式。

<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"
xmlns:wsa="http://www.w3.org/2005/08/addressing">
<soapenv:Header>
    <wsa:To>http://localhost:5000/axis2/services/xdsrepositoryb</wsa:To>
    <wsa:MessageID>urn:uuid:AFBE87CB65FD88AC4B1220879854302</wsa:MessageID>
    <wsa:Action>urn:ihe:iti:2007:ProvideAndRegisterDocumentSet-b</wsa:Action>
</soapenv:Header>
<soapenv:Body>
    <xdsb:ProvideAndRegisterDocumentSetRequest xmlns:xdsb="urn:ihe:iti:xds-b:2007">
        <lcm:SubmitObjectsRequest xmlns:lcm="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0">
            <rim:RegistryObjectList xmlns:rim="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0">
                <rim:ExtrinsicObject id="Document01" mimeType="text/plain"/>
            </rim:RegistryObjectList>
        </lcm:SubmitObjectsRequest>
        <xdsb:Document id="Document01">base64 content goes here</xdsb:Document>
    </xdsb:ProvideAndRegisterDocumentSetRequest>
</soapenv:Body>

我想编写一个 wcf 服务来公开一个可以使用这种肥皂消息的方法。

我只是不知道soap消息和wcf方法之间的关系。再具体点,wcf方法、参数和soap消息是什么关系?

如何编写符合上述肥皂消息的 wcf 方法?

【问题讨论】:

    标签: wcf soap


    【解决方案1】:

    虽然您可以通过逆向工作来构建与此特定示例匹配的数据合约,但这通常不是一个好主意。样本可能不能代表可以通过的数据。相反,通过获取官方 WSDL 文档或一组描述合同的 XSD,您会得到更好的结果。

    如果您好奇特定 WCF 消息在原始 SOAP 形式中的外观,最简单的查看方法可能是启用 WCF 跟踪并查看跟踪。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-05-04
      • 2016-07-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-05-25
      相关资源
      最近更新 更多