none
WCF MTOM 编码问题 RRS feed

  • 问题

  • 请教一个问题如何使用WCF中的Message构建一下类似于下面的消息(使用MTOM编码):

    POST /axis2/services/repository HTTP/1.1
    Content-Type: multipart/related; boundary=MIMEBoundaryurn_uuid_76A2C3D9BCD3AECFF31217932910180; type="application/xop+xml"; start="<0.urn:uuid76A2C3D9BCD3AECFF31217932910181@apache.org>"; start-info="application/soap+xml"; action="urn:ihe:iti:2007:ProvideAndRegisterDocumentSet-b"
    User-Agent: Axis2
    Host: localhost:4040
    Content-Length: 4567
    --MIMEBoundaryurn_uuid_76A2C3D9BCD3AECFF31217932910180
    Content-Type: application/xop+xml; charset=UTF-8; type="application/soap+xml"
    Content-Transfer-Encoding: binary
    Content-ID: <0.urn:uuid:76A2C3D9BCD3AECFF31217932910181@apache.org>
    <?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:4040/axis2/services/test11966a</wsa:To>
    <wsa:MessageID>urn:uuid:76A2C3D9BCD3AECFF31217932910053</wsa:MessageID>
    <wsa:Action soapenv:mustUnderstand="1">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">
    <!-- Registry Metadata goes here -->
    </rim:RegistryObjectList>
    </lcm:SubmitObjectsRequest>
    <xdsb:Document id="Document01">
    <xop:Include href="cid:1.urn:uuid:76A2C3D9BCD3AECFF3121793290229@apache.org"
    xmlns:xop="http://www.w3.org/2004/08/xop/include"/>
    </xdsb:Document>
    </xdsb:ProvideAndRegisterDocumentSetRequest>
    </soapenv:Body>
    </soapenv:Envelope>
    --MIMEBoundaryurn_uuid_76A2C3D9BCD3AECFF31217932910180
    Content-Type: text/plain
    Content-Transfer-Encoding: binary
    Content-ID: <1.urn:uuid:76A2C3D9BCD3AECFF31217932910229@apache.org>
    This is my document.
    It is great!
    --MIMEBoundaryurn_uuid_76A2C3D9BCD3AECFF31217932910180--

    2013年8月15日 6:08

答案

全部回复