Introduction to Oracle Beehive SOAP Web Services

Oracle Beehive SOAP Web Services are APIs that enable you to develop Web applications.

MTOM/XOP Message Support

Oracle Beehive SOAP Web Services supports Message Transfer Optimization Mechanism (MTOM) and XML-binary Optimized Packaging (XOP) over SOAP 1.1 as defined by W3C. For detailed information, refer to SOAP 1.1 Binding for MTOM 1.0.

To take advantage of MTOM/XOP support, the client must send a multipart/related MIME message of type application/xop+xml. This MIME message consists of at least the SOAP message envelope as a first (root) part plus additional optional binary "attachment" parts. The first part is always an envelope and has Content-Type of text/xml. Its Content-ID is referred to by the start parameter of the MTOM message. The order of related binary content type is arbitrary. Content parts are referred from the SOAP envelop using xop:Include element. For more information about the cid: URI scheme, refer to "XOP Infoset Constructs" in XML-binary Optimized Packaging and RFC 2392: Content-ID and Message-ID Uniform Resource Locators.

Content parts of the MTOM message must have one of the following Content-Transfer-Encoding types: 7bit, 8bit, and binary. Any other encoding is not supported because it defeats the purpose of having MTOM/XOP optimization in the first place. Refer to RFC 1521: MIME (Multipurpose Internet Mail Extensions) Part One: Mechanisms for Specifying and Describing the Format of Internet Message Bodies, Section 5 for more details on transfer encodings.

The following is an example for MTOM request to create a document:

POST /ws/soap/ContentManagementService HTTP/1.1
MIME-Version: 1.0
Content-Type: multipart/related;type="application/xop+xml";
start="<http://tempuri.org/0>";boundary="boundary1";start-info="text/xml"
Host: <yourhost>
Content-Length: <length>


--boundary1
Content-ID: <http://tempuri.org/0>
Content-Transfer-Encoding: 8bit
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xop="http://www.w3.org/2004/08/xop/include">
<ws:createDocument xmlns:ws="http://www.oracle.com/beehive/2010/01/ws" xmlns="http://www.oracle.com/beehive">
<ws:creator>
<conflictResolutionMode>OVERWRITE</conflictResolutionMode>
<name>TestFile405519005.txt</name>
<parent>
<id>2BB7:08EF:afrh:7E280464847B2073E040E50A50920F1F000000049CEC</id>
<resourceType>afrh</resourceType>
</parent>
<updater>
<contentUpdater xsi:type="identifiableSimpleContentUpdater">
<contentStream>
<xop:Include href="cid:http%3A%2F%2Ftempuri.org%2F1%2F634008889032812500" />
</contentStream>
</contentUpdater>
</updater>
</ws:creator>
<ws:projection value="EMPTY"/>
</ws:createDocument>
</s:Body>
</s:Envelope>
--boundary1
Content-ID: <http://tempuri.org/1/634008889032812500>
Content-Transfer-Encoding: binary
Content-Type: application/octet-stream

Test body. Test body. Test body. Test body. Test body. Test body.
--boundary--

Note that client is not required to represent any binary content as separate MIME part referenced through xop:Include. For short MIME parts, leave them as inline base64 binary content to prevent message bloating.

Using Oracle IDEs to Build Web Services

The following Oracle IDE tools are available to build Web services:



Oracle Logo
Copyright © 2008, 2012, Oracle and/or its affiliates. All rights reserved.
Legal Notices
  Top