| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> |
| <title>MessageFormatter (Apache Axis2)</title> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="MessageFormatter (Apache Axis2)"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar_top"> |
| <!-- --> |
| </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/MessageFormatter.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../org/apache/axis2/transport/Echo.html" title="class in org.apache.axis2.transport"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/axis2/transport/OutTransportInfo.html" title="interface in org.apache.axis2.transport"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/axis2/transport/MessageFormatter.html" target="_top">Frames</a></li> |
| <li><a href="MessageFormatter.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method_detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.axis2.transport</div> |
| <h2 title="Interface MessageFormatter" class="title">Interface MessageFormatter</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Known Subinterfaces:</dt> |
| <dd><a href="../../../../org/apache/axis2/format/MessageFormatterEx.html" title="interface in org.apache.axis2.format">MessageFormatterEx</a></dd> |
| </dl> |
| <dl> |
| <dt>All Known Implementing Classes:</dt> |
| <dd><a href="../../../../org/apache/axis2/json/AbstractJSONMessageFormatter.html" title="class in org.apache.axis2.json">AbstractJSONMessageFormatter</a>, <a href="../../../../org/apache/axis2/transport/http/ApplicationXMLFormatter.html" title="class in org.apache.axis2.transport.http">ApplicationXMLFormatter</a>, <a href="../../../../org/apache/axis2/format/BinaryFormatter.html" title="class in org.apache.axis2.format">BinaryFormatter</a>, <a href="../../../../org/apache/axis2/jaxws/utility/DataSourceFormatter.html" title="class in org.apache.axis2.jaxws.utility">DataSourceFormatter</a>, <a href="../../../../org/apache/axis2/fastinfoset/FastInfosetMessageFormatter.html" title="class in org.apache.axis2.fastinfoset">FastInfosetMessageFormatter</a>, <a href="../../../../org/apache/axis2/fastinfoset/FastInfosetPOXMessageFormatter.html" title="class in org.apache.axis2.fastinfoset">FastInfosetPOXMessageFormatter</a>, <a href="../../../../org/apache/axis2/json/JSONBadgerfishMessageFormatter.html" title="class in org.apache.axis2.json">JSONBadgerfishMessageFormatter</a>, <a href="../../../../org/apache/axis2/json/JSONMessageFormatter.html" title="class in org.apache.axis2.json">JSONMessageFormatter</a>, <a href="../../../../org/apache/axis2/format/MessageFormatterExAdapter.html" title="class in org.apache.axis2.format">MessageFormatterExAdapter</a>, <a href="../../../../org/apache/axis2/transport/http/MultipartFormDataFormatter.html" title="class in org.apache.axis2.transport.http">MultipartFormDataFormatter</a>, <a href="../../../../org/apache/axis2/format/PlainTextFormatter.html" title="class in org.apache.axis2.format">PlainTextFormatter</a>, <a href="../../../../org/apache/axis2/transport/http/SOAPMessageFormatter.html" title="class in org.apache.axis2.transport.http">SOAPMessageFormatter</a>, <a href="../../../../org/apache/axis2/transport/http/XFormURLEncodedFormatter.html" title="class in org.apache.axis2.transport.http">XFormURLEncodedFormatter</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public interface <span class="strong">MessageFormatter</span></pre> |
| <div class="block"><p/> |
| MessageFormatter implementations are used by Axis2 to support serialization |
| of messages to different message formats. (Eg: JSON). Users can register |
| MessageFormatter implementations against a message type using the axis2.xml. |
| Message type for a message can be specified by setting the "messageType" |
| property in the MessageContext. This can also be given as a parameter in the |
| service.xml/axis2.xml for a per service based/engine wide configuration. |
| </p> |
| <p/> |
| <messageFormatters> |
| <messageFormatter contentType="application/soap+xml" |
| class="org.apache.axis2.transport.http.SOAPMessageFormatter"/> |
| </messageFormatters> |
| </p></div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span>Methods</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/axis2/transport/MessageFormatter.html#formatSOAPAction(org.apache.axis2.context.MessageContext, org.apache.axiom.om.OMOutputFormat, java.lang.String)">formatSOAPAction</a></strong>(<a href="../../../../org/apache/axis2/context/MessageContext.html" title="class in org.apache.axis2.context">MessageContext</a> messageContext, |
| org.apache.axiom.om.OMOutputFormat format, |
| <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> soapAction)</code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>byte[]</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/axis2/transport/MessageFormatter.html#getBytes(org.apache.axis2.context.MessageContext, org.apache.axiom.om.OMOutputFormat)">getBytes</a></strong>(<a href="../../../../org/apache/axis2/context/MessageContext.html" title="class in org.apache.axis2.context">MessageContext</a> messageContext, |
| org.apache.axiom.om.OMOutputFormat format)</code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/axis2/transport/MessageFormatter.html#getContentType(org.apache.axis2.context.MessageContext, org.apache.axiom.om.OMOutputFormat, java.lang.String)">getContentType</a></strong>(<a href="../../../../org/apache/axis2/context/MessageContext.html" title="class in org.apache.axis2.context">MessageContext</a> messageContext, |
| org.apache.axiom.om.OMOutputFormat format, |
| <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> soapAction)</code> |
| <div class="block">Different message formats can set their own content types |
| Eg: JSONFormatter can set the content type as application/json</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/axis2/transport/MessageFormatter.html#getTargetAddress(org.apache.axis2.context.MessageContext, org.apache.axiom.om.OMOutputFormat, java.net.URL)">getTargetAddress</a></strong>(<a href="../../../../org/apache/axis2/context/MessageContext.html" title="class in org.apache.axis2.context">MessageContext</a> messageContext, |
| org.apache.axiom.om.OMOutputFormat format, |
| <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a> targetURL)</code> |
| <div class="block">Some message formats may want to alter the target url.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../org/apache/axis2/transport/MessageFormatter.html#writeTo(org.apache.axis2.context.MessageContext, org.apache.axiom.om.OMOutputFormat, java.io.OutputStream, boolean)">writeTo</a></strong>(<a href="../../../../org/apache/axis2/context/MessageContext.html" title="class in org.apache.axis2.context">MessageContext</a> messageContext, |
| org.apache.axiom.om.OMOutputFormat format, |
| <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> outputStream, |
| boolean preserve)</code> |
| <div class="block">To support deffered writing transports as in http chunking..</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method_detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="getBytes(org.apache.axis2.context.MessageContext, org.apache.axiom.om.OMOutputFormat)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getBytes</h4> |
| <pre>byte[] getBytes(<a href="../../../../org/apache/axis2/context/MessageContext.html" title="class in org.apache.axis2.context">MessageContext</a> messageContext, |
| org.apache.axiom.om.OMOutputFormat format) |
| throws <a href="../../../../org/apache/axis2/AxisFault.html" title="class in org.apache.axis2">AxisFault</a></pre> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>a byte array of the message formatted according to the given |
| message format.</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../org/apache/axis2/AxisFault.html" title="class in org.apache.axis2">AxisFault</a></code></dd></dl> |
| </li> |
| </ul> |
| <a name="writeTo(org.apache.axis2.context.MessageContext, org.apache.axiom.om.OMOutputFormat, java.io.OutputStream, boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>writeTo</h4> |
| <pre>void writeTo(<a href="../../../../org/apache/axis2/context/MessageContext.html" title="class in org.apache.axis2.context">MessageContext</a> messageContext, |
| org.apache.axiom.om.OMOutputFormat format, |
| <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> outputStream, |
| boolean preserve) |
| throws <a href="../../../../org/apache/axis2/AxisFault.html" title="class in org.apache.axis2">AxisFault</a></pre> |
| <div class="block">To support deffered writing transports as in http chunking.. Axis2 was |
| doing this for some time.. |
| <p/> |
| Preserve flag can be used to preserve the envelope for later use. This is |
| usefull when implementing authentication machnisms like NTLM.</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>outputStream</code> - </dd><dd><code>preserve</code> - : |
| do not consume the OM when this is set..</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../org/apache/axis2/AxisFault.html" title="class in org.apache.axis2">AxisFault</a></code></dd></dl> |
| </li> |
| </ul> |
| <a name="getContentType(org.apache.axis2.context.MessageContext, org.apache.axiom.om.OMOutputFormat, java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getContentType</h4> |
| <pre><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getContentType(<a href="../../../../org/apache/axis2/context/MessageContext.html" title="class in org.apache.axis2.context">MessageContext</a> messageContext, |
| org.apache.axiom.om.OMOutputFormat format, |
| <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> soapAction)</pre> |
| <div class="block">Different message formats can set their own content types |
| Eg: JSONFormatter can set the content type as application/json</div> |
| <dl><dt><span class="strong">Parameters:</span></dt><dd><code>messageContext</code> - </dd><dd><code>format</code> - </dd><dd><code>soapAction</code> - </dd></dl> |
| </li> |
| </ul> |
| <a name="getTargetAddress(org.apache.axis2.context.MessageContext, org.apache.axiom.om.OMOutputFormat, java.net.URL)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getTargetAddress</h4> |
| <pre><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a> getTargetAddress(<a href="../../../../org/apache/axis2/context/MessageContext.html" title="class in org.apache.axis2.context">MessageContext</a> messageContext, |
| org.apache.axiom.om.OMOutputFormat format, |
| <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a> targetURL) |
| throws <a href="../../../../org/apache/axis2/AxisFault.html" title="class in org.apache.axis2">AxisFault</a></pre> |
| <div class="block">Some message formats may want to alter the target url.</div> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>the target URL</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="../../../../org/apache/axis2/AxisFault.html" title="class in org.apache.axis2">AxisFault</a></code></dd></dl> |
| </li> |
| </ul> |
| <a name="formatSOAPAction(org.apache.axis2.context.MessageContext, org.apache.axiom.om.OMOutputFormat, java.lang.String)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>formatSOAPAction</h4> |
| <pre><a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> formatSOAPAction(<a href="../../../../org/apache/axis2/context/MessageContext.html" title="class in org.apache.axis2.context">MessageContext</a> messageContext, |
| org.apache.axiom.om.OMOutputFormat format, |
| <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> soapAction)</pre> |
| <dl><dt><span class="strong">Returns:</span></dt><dd>this only if you want set a transport header for SOAP Action</dd></dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar_bottom"> |
| <!-- --> |
| </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/MessageFormatter.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../org/apache/axis2/transport/Echo.html" title="class in org.apache.axis2.transport"><span class="strong">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/axis2/transport/OutTransportInfo.html" title="interface in org.apache.axis2.transport"><span class="strong">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/axis2/transport/MessageFormatter.html" target="_top">Frames</a></li> |
| <li><a href="MessageFormatter.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method_summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method_detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip-navbar_bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</small></p> |
| </body> |
| </html> |