blob: 3463299bd0dbfb97f6ef703a89971a36763f6d67 [file] [log] [blame]
<!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>AbstractJSONMessageFormatter (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="AbstractJSONMessageFormatter (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/AbstractJSONMessageFormatter.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/json/AbstractJSONDataSource.html" title="class in org.apache.axis2.json"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/axis2/json/AbstractJSONOMBuilder.html" title="class in org.apache.axis2.json"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/axis2/json/AbstractJSONMessageFormatter.html" target="_top">Frames</a></li>
<li><a href="AbstractJSONMessageFormatter.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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</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.json</div>
<h2 title="Class AbstractJSONMessageFormatter" class="title">Class AbstractJSONMessageFormatter</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.axis2.json.AbstractJSONMessageFormatter</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="../../../../org/apache/axis2/transport/MessageFormatter.html" title="interface in org.apache.axis2.transport">MessageFormatter</a></dd>
</dl>
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><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></dd>
</dl>
<hr>
<br>
<pre>public abstract class <span class="strong">AbstractJSONMessageFormatter</span>
extends <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
implements <a href="../../../../org/apache/axis2/transport/MessageFormatter.html" title="interface in org.apache.axis2.transport">MessageFormatter</a></pre>
<div class="block">Base class for JSON message formatters.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../org/apache/axis2/json/AbstractJSONMessageFormatter.html#AbstractJSONMessageFormatter(java.lang.Class)">AbstractJSONMessageFormatter</a></strong>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;? extends <a href="../../../../org/apache/axis2/json/AbstractJSONDataSource.html" title="class in org.apache.axis2.json">AbstractJSONDataSource</a>&gt;&nbsp;dataSourceClass)</code>
<div class="block">Constructor.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== 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">&nbsp;</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="https://docs.oracle.com/javase/7/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/json/AbstractJSONMessageFormatter.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>&nbsp;msgCtxt,
<a href="http://ws.apache.org/axiom/apidocs/org/apache/axiom/om/OMOutputFormat.html?is-external=true" title="class or interface in org.apache.axiom.om">OMOutputFormat</a>&nbsp;format,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;soapActionString)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>byte[]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/axis2/json/AbstractJSONMessageFormatter.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>&nbsp;msgCtxt,
<a href="http://ws.apache.org/axiom/apidocs/org/apache/axiom/om/OMOutputFormat.html?is-external=true" title="class or interface in org.apache.axiom.om">OMOutputFormat</a>&nbsp;format)</code>
<div class="block">Gives the JSON message as an array of bytes.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/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/json/AbstractJSONMessageFormatter.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>&nbsp;msgCtxt,
<a href="http://ws.apache.org/axiom/apidocs/org/apache/axiom/om/OMOutputFormat.html?is-external=true" title="class or interface in org.apache.axiom.om">OMOutputFormat</a>&nbsp;format,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;soapActionString)</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>protected abstract <a href="https://docs.oracle.com/javase/7/docs/api/javax/xml/stream/XMLStreamWriter.html?is-external=true" title="class or interface in javax.xml.stream">XMLStreamWriter</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/axis2/json/AbstractJSONMessageFormatter.html#getJSONWriter(java.io.Writer, org.apache.axis2.context.MessageContext)">getJSONWriter</a></strong>(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer,
<a href="../../../../org/apache/axis2/context/MessageContext.html" title="class in org.apache.axis2.context">MessageContext</a>&nbsp;messageContext)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/7/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/json/AbstractJSONMessageFormatter.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>&nbsp;msgCtxt,
<a href="http://ws.apache.org/axiom/apidocs/org/apache/axiom/om/OMOutputFormat.html?is-external=true" title="class or interface in org.apache.axiom.om">OMOutputFormat</a>&nbsp;format,
<a href="https://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;targetURL)</code>
<div class="block">Some message formats may want to alter the target url.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/axis2/json/AbstractJSONMessageFormatter.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>&nbsp;msgCtxt,
<a href="http://ws.apache.org/axiom/apidocs/org/apache/axiom/om/OMOutputFormat.html?is-external=true" title="class or interface in org.apache.axiom.om">OMOutputFormat</a>&nbsp;format,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;out,
boolean&nbsp;preserve)</code>
<div class="block">Writes the JSON message to the output stream with the correct convention.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="AbstractJSONMessageFormatter(java.lang.Class)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>AbstractJSONMessageFormatter</h4>
<pre>public&nbsp;AbstractJSONMessageFormatter(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;? extends <a href="../../../../org/apache/axis2/json/AbstractJSONDataSource.html" title="class in org.apache.axis2.json">AbstractJSONDataSource</a>&gt;&nbsp;dataSourceClass)</pre>
<div class="block">Constructor.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dataSourceClass</code> - the <a href="http://ws.apache.org/axiom/apidocs/org/apache/axiom/om/OMDataSource.html?is-external=true" title="class or interface in org.apache.axiom.om"><code>OMDataSource</code></a> class corresponding to the JSON format used by this
message formatter; this information is used for optimization (pass through)</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<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>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getContentType(<a href="../../../../org/apache/axis2/context/MessageContext.html" title="class in org.apache.axis2.context">MessageContext</a>&nbsp;msgCtxt,
<a href="http://ws.apache.org/axiom/apidocs/org/apache/axiom/om/OMOutputFormat.html?is-external=true" title="class or interface in org.apache.axiom.om">OMOutputFormat</a>&nbsp;format,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;soapActionString)</pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../../org/apache/axis2/transport/MessageFormatter.html#getContentType(org.apache.axis2.context.MessageContext, org.apache.axiom.om.OMOutputFormat, java.lang.String)">MessageFormatter</a></code></strong></div>
<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><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/axis2/transport/MessageFormatter.html#getContentType(org.apache.axis2.context.MessageContext, org.apache.axiom.om.OMOutputFormat, java.lang.String)">getContentType</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/axis2/transport/MessageFormatter.html" title="interface in org.apache.axis2.transport">MessageFormatter</a></code></dd>
</dl>
</li>
</ul>
<a name="getBytes(org.apache.axis2.context.MessageContext, org.apache.axiom.om.OMOutputFormat)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBytes</h4>
<pre>public&nbsp;byte[]&nbsp;getBytes(<a href="../../../../org/apache/axis2/context/MessageContext.html" title="class in org.apache.axis2.context">MessageContext</a>&nbsp;msgCtxt,
<a href="http://ws.apache.org/axiom/apidocs/org/apache/axiom/om/OMOutputFormat.html?is-external=true" title="class or interface in org.apache.axiom.om">OMOutputFormat</a>&nbsp;format)
throws <a href="../../../../org/apache/axis2/AxisFault.html" title="class in org.apache.axis2">AxisFault</a></pre>
<div class="block">Gives the JSON message as an array of bytes. If the payload is an OMSourcedElement and
it contains a JSONDataSource with a correctly formatted JSON String, gets it directly from
the DataSource and returns as a byte array. If not, the OM tree is expanded and it is
serialized into the output stream and byte array is returned.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/axis2/transport/MessageFormatter.html#getBytes(org.apache.axis2.context.MessageContext, org.apache.axiom.om.OMOutputFormat)">getBytes</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/axis2/transport/MessageFormatter.html" title="interface in org.apache.axis2.transport">MessageFormatter</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>msgCtxt</code> - Message context which contains the soap envelope to be written</dd><dd><code>format</code> - format of the message, this is ignored</dd>
<dt><span class="strong">Returns:</span></dt><dd>the payload as a byte array</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> - if there is an error in writing the message using StAX writer or IF THE
USER TRIES TO SEND A JSON MESSAGE WITH NAMESPACES USING THE "MAPPED"
CONVENTION.</dd></dl>
</li>
</ul>
<a name="formatSOAPAction(org.apache.axis2.context.MessageContext, org.apache.axiom.om.OMOutputFormat, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>formatSOAPAction</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;formatSOAPAction(<a href="../../../../org/apache/axis2/context/MessageContext.html" title="class in org.apache.axis2.context">MessageContext</a>&nbsp;msgCtxt,
<a href="http://ws.apache.org/axiom/apidocs/org/apache/axiom/om/OMOutputFormat.html?is-external=true" title="class or interface in org.apache.axiom.om">OMOutputFormat</a>&nbsp;format,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;soapActionString)</pre>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/axis2/transport/MessageFormatter.html#formatSOAPAction(org.apache.axis2.context.MessageContext, org.apache.axiom.om.OMOutputFormat, java.lang.String)">formatSOAPAction</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/axis2/transport/MessageFormatter.html" title="interface in org.apache.axis2.transport">MessageFormatter</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>this only if you want set a transport header for SOAP Action</dd></dl>
</li>
</ul>
<a name="getJSONWriter(java.io.Writer, org.apache.axis2.context.MessageContext)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getJSONWriter</h4>
<pre>protected abstract&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/javax/xml/stream/XMLStreamWriter.html?is-external=true" title="class or interface in javax.xml.stream">XMLStreamWriter</a>&nbsp;getJSONWriter(<a href="https://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;writer,
<a href="../../../../org/apache/axis2/context/MessageContext.html" title="class in org.apache.axis2.context">MessageContext</a>&nbsp;messageContext)
throws <a href="https://docs.oracle.com/javase/7/docs/api/javax/xml/stream/XMLStreamException.html?is-external=true" title="class or interface in javax.xml.stream">XMLStreamException</a></pre>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/javax/xml/stream/XMLStreamException.html?is-external=true" title="class or interface in javax.xml.stream">XMLStreamException</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>public&nbsp;void&nbsp;writeTo(<a href="../../../../org/apache/axis2/context/MessageContext.html" title="class in org.apache.axis2.context">MessageContext</a>&nbsp;msgCtxt,
<a href="http://ws.apache.org/axiom/apidocs/org/apache/axiom/om/OMOutputFormat.html?is-external=true" title="class or interface in org.apache.axiom.om">OMOutputFormat</a>&nbsp;format,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;out,
boolean&nbsp;preserve)
throws <a href="../../../../org/apache/axis2/AxisFault.html" title="class in org.apache.axis2">AxisFault</a></pre>
<div class="block">Writes the JSON message to the output stream with the correct convention. If the payload is
an OMSourcedElement and it contains a JSONDataSource with a correctly formatted JSON
String, gets it directly from the DataSource and writes to the output stream. If not, the OM
tree is expanded and it is serialized into the output stream. *</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><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></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/axis2/transport/MessageFormatter.html" title="interface in org.apache.axis2.transport">MessageFormatter</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>msgCtxt</code> - Message context which contains the soap envelope to be written</dd><dd><code>format</code> - format of the message, this is ignored</dd><dd><code>out</code> - output stream to be written in to</dd><dd><code>preserve</code> - ignored</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> - if there is an error in writing the message using StAX writer or IF THE
USER TRIES TO SEND A JSON MESSAGE WITH NAMESPACES USING THE "MAPPED"
CONVENTION.</dd></dl>
</li>
</ul>
<a name="getTargetAddress(org.apache.axis2.context.MessageContext, org.apache.axiom.om.OMOutputFormat, java.net.URL)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getTargetAddress</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;getTargetAddress(<a href="../../../../org/apache/axis2/context/MessageContext.html" title="class in org.apache.axis2.context">MessageContext</a>&nbsp;msgCtxt,
<a href="http://ws.apache.org/axiom/apidocs/org/apache/axiom/om/OMOutputFormat.html?is-external=true" title="class or interface in org.apache.axiom.om">OMOutputFormat</a>&nbsp;format,
<a href="https://docs.oracle.com/javase/7/docs/api/java/net/URL.html?is-external=true" title="class or interface in java.net">URL</a>&nbsp;targetURL)
throws <a href="../../../../org/apache/axis2/AxisFault.html" title="class in org.apache.axis2">AxisFault</a></pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../../org/apache/axis2/transport/MessageFormatter.html#getTargetAddress(org.apache.axis2.context.MessageContext, org.apache.axiom.om.OMOutputFormat, java.net.URL)">MessageFormatter</a></code></strong></div>
<div class="block">Some message formats may want to alter the target url.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/axis2/transport/MessageFormatter.html#getTargetAddress(org.apache.axis2.context.MessageContext, org.apache.axiom.om.OMOutputFormat, java.net.URL)">getTargetAddress</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/axis2/transport/MessageFormatter.html" title="interface in org.apache.axis2.transport">MessageFormatter</a></code></dd>
<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>
</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/AbstractJSONMessageFormatter.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/json/AbstractJSONDataSource.html" title="class in org.apache.axis2.json"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/axis2/json/AbstractJSONOMBuilder.html" title="class in org.apache.axis2.json"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/axis2/json/AbstractJSONMessageFormatter.html" target="_top">Frames</a></li>
<li><a href="AbstractJSONMessageFormatter.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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</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 &copy; <a href="https://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</small></p>
</body>
</html>