wcf方法soap消息格式

时间:2013-02-18 01:39:25

标签: wcf 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方法,参数和肥皂使用之间的关系是什么?

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

1 个答案:

答案 0 :(得分:2)

虽然您可以通过向后工作来构建与此特定示例匹配的数据协定,但通常不是一个好主意。该示例可能无法代表可传递的数据。相反,通过获取描述合同的官方WSDL文档或一组XSD,您将会更好。

如果您对原始SOAP表单中特定WCF消息的外观感到好奇,最简单的方法是启用WCF跟踪并查看跟踪。

相关问题