You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by bu...@apache.org on 2014/03/04 17:19:24 UTC

svn commit: r900001 [3/3] - in /websites/production/camel/content: book-dataformat-appendix.html book-in-one-page.html cache/main.pageCache xmlrpc.html xstream.html

Modified: websites/production/camel/content/xmlrpc.html
==============================================================================
--- websites/production/camel/content/xmlrpc.html (original)
+++ websites/production/camel/content/xmlrpc.html Tue Mar  4 16:19:23 2014
@@ -86,33 +86,16 @@
 	<tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2 id="XmlRpc-XmlRpcComponent">XmlRpc Component</h2>
-<p><strong>Available as of Camel 2.11</strong></p>
-
-<p>This component provides a dataformat for xml, which allows serialization and deserialization of request messages and response message using Apache XmlRpc's bindary dataformat. You can also invoke the XMLRPC Service through the camel-xmlrpc producer.</p>
-
-<p>Maven users will need to add the following dependency to their <code>pom.xml</code> for this component:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;dependency&gt;
+<div class="wiki-content maincontent"><h2 id="XmlRpc-XmlRpcComponent">XmlRpc Component</h2><p><strong>Available as of Camel 2.11</strong></p><p>This component provides a dataformat for xml, which allows serialization and deserialization of request messages and response message using Apache XmlRpc's binary dataformat. You can also invoke the XMLRPC Service through the camel-xmlrpc producer.</p><p>Maven users will need to add the following dependency to their <code>pom.xml</code> for this component:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
     &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
     &lt;artifactId&gt;camel-xmlrpc&lt;/artifactId&gt;
     &lt;version&gt;x.x.x&lt;/version&gt;
     &lt;!-- use the same version as your Camel core version --&gt;
 &lt;/dependency&gt;
 ]]></script>
-</div></div>
-
-<h3 id="XmlRpc-XmlRpcOverview">XmlRpc Overview</h3>
-
-<p>It's a <a shape="rect" class="external-link" href="http://xmlrpc.scripting.com/spec" rel="nofollow">spec</a> and a set of implementations that allow software running on disparate operating systems, running in different environments to make procedure calls over the Internet. </p>
-
-<p>It's remote procedure calling using HTTP as the transport and XML as the encoding. XML-RPC is designed to be as simple as possible, while allowing complex data structures to be transmitted, processed and returned.</p>
-
-<p>An example of a typical XML-RPC request would be:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;?xml version=&quot;1.0&quot;?&gt;
+</div></div><h3 id="XmlRpc-XmlRpcOverview">XmlRpc Overview</h3><p>It's a <a shape="rect" class="external-link" href="http://xmlrpc.scripting.com/spec" rel="nofollow">spec</a> and a set of implementations that allow software running on disparate operating systems, running in different environments to make procedure calls over the Internet.</p><p>It's remote procedure calling using HTTP as the transport and XML as the encoding. XML-RPC is designed to be as simple as possible, while allowing complex data structures to be transmitted, processed and returned.</p><p>An example of a typical XML-RPC request would be:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;?xml version=&quot;1.0&quot;?&gt;
 &lt;methodCall&gt;
   &lt;methodName&gt;examples.getStateName&lt;/methodName&gt;
   &lt;params&gt;
@@ -122,12 +105,8 @@
   &lt;/params&gt;
 &lt;/methodCall&gt;
 ]]></script>
-</div></div>
-
-<p>An example of a typical XML-RPC response would be:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;?xml version=&quot;1.0&quot;?&gt;
+</div></div><p>An example of a typical XML-RPC response would be:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;?xml version=&quot;1.0&quot;?&gt;
 &lt;methodResponse&gt;
   &lt;params&gt;
     &lt;param&gt;
@@ -136,12 +115,8 @@
   &lt;/params&gt;
 &lt;/methodResponse&gt;
 ]]></script>
-</div></div>
-
-<p>A typical XML-RPC fault would be:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;?xml version=&quot;1.0&quot;?&gt;
+</div></div><p>A typical XML-RPC fault would be:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;?xml version=&quot;1.0&quot;?&gt;
 &lt;methodResponse&gt;
   &lt;fault&gt;
     &lt;value&gt;
@@ -159,32 +134,15 @@
   &lt;/fault&gt;
 &lt;/methodResponse&gt;
 ]]></script>
-</div></div>
-
-<h3 id="XmlRpc-URIformat">URI format</h3>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-xmlrpc://serverUri[?options]
+</div></div><h3 id="XmlRpc-URIformat">URI format</h3><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[xmlrpc://serverUri[?options]
 ]]></script>
-</div></div>
-
-<h3 id="XmlRpc-Options">Options</h3>
-<div class="confluenceTableSmall">
+</div></div><h3 id="XmlRpc-Options">Options</h3><div class="confluenceTableSmall">
 <table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Property </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Default </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>basicEncoding</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Sets the encoding for basic authentication, null means UTF-8 is chosen. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>basicUserName</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The user name for basic authentication. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>basicPassword</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><
 p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The password for basic authentication. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>clientConfigurer</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The reference id of the XmlRpcClient configurer which implement the interface of XmlRpcClientConfigurer to setup the XmlRpcClient as user wants. The value should be start with "#" such as "#myConfigurer"</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>connectionTimeout</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>0</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Set the connection timeout in milliseconds, 0 is to disable it</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>contentLengthOptional</code> </p></td><td colspan
 ="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> whether a "Content-Length" header may be omitted. The XML-RPC specification demands, that such a header be present. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>enabledForExceptions</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> whether the response should contain a "faultCause" element in case of errors. The "faultCause" is an exception, which the server has trapped and written into a byte stream as a serializable object. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>enabledForExtensions</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> whether extensions are enabled. By default, the client or server 
 is strictly compliant to the XML-RPC specification and extensions are disabled.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>encoding</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Sets the requests encoding, null means UTF-8 is chosen. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>gzipCompressing</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Whether gzip compression is being used for transmitting the request. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>gzipRequesting</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Whether gzip compression is being used for transmitting the request. </p>
 </td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>replyTimeout</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>0</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Set the reply timeout in milliseconds, 0 is to disable it. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>userAgent</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The http user agent header to set when doing xmlrpc requests </p></td></tr></tbody></table>
 
-</div>
-
-<h3 id="XmlRpc-MessageHeaders">Message Headers</h3>
-<p>Camel XmlRpc uses these headers.</p>
-<div class="confluenceTableSmall">
+</div><h3 id="XmlRpc-MessageHeaders">Message Headers</h3><p>Camel XmlRpc uses these headers.</p><div class="confluenceTableSmall">
 <table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Header </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CamelXmlRpcMethodName</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The XmlRpc method name which will be use for invoking the XmlRpc server. </p></td></tr></tbody></table>
-</div>
-
-<h3 id="XmlRpc-UsingtheXmlRpcdataformat">Using the XmlRpc data format</h3>
-<p>As the XmlRpc message could be request or response, when you use the XmlRpcDataFormat, you need to specify the dataformat is for request or not.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div><h3 id="XmlRpc-UsingtheXmlRpcdataformat">Using the XmlRpc data format</h3><p>As the XmlRpc message could be request or response, when you use the XmlRpcDataFormat, you need to specify the dataformat is for request or not.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 &lt;camelContext id=&quot;camel&quot; xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
 
@@ -213,21 +171,10 @@ xmlrpc://serverUri[?options]
     &lt;/route&gt;
 &lt;/camelContext&gt;
 ]]></script>
-</div></div>
-
-<h3 id="XmlRpc-InvokeXmlRpcServicefromClient">Invoke XmlRpc Service from Client</h3>
-<p>To invoke the XmlRpc service, you need to specify the methodName on the message header and put the parameters into the message body like below code, then you can get the result message as you want. If the fault message is return, you should get an exception which cause if XmlRpcException.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-   String response = template.requestBodyAndHeader(xmlRpcServiceAddress, new Object[]{&quot;me&quot;}, XmlRpcConstants.METHOD_NAME, &quot;hello&quot;, String.class);
+</div></div><h3 id="XmlRpc-InvokeXmlRpcServicefromClient">Invoke XmlRpc Service from Client</h3><p>To invoke the XmlRpc service, you need to specify the methodName on the message header and put the parameters into the message body like below code, then you can get the result message as you want. If the fault message is return, you should get an exception which cause if XmlRpcException.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[   String response = template.requestBodyAndHeader(xmlRpcServiceAddress, new Object[]{&quot;me&quot;}, XmlRpcConstants.METHOD_NAME, &quot;hello&quot;, String.class);
 ]]></script>
-</div></div>
-
-<h3 id="XmlRpc-HowtoconfiguretheXmlRpcClientwithJavacode">How to configure the XmlRpcClient with Java code</h3>
-<p>camel-xmlrpc provides a pluggable strategy for configuring the XmlRpcClient used by the component, user just to implement the <strong>XmlRpcClientConfigurer</strong> interface and can configure the XmlRpcClient as he wants. The clientConfigure instance reference can be set through the uri option clientConfigure.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="XmlRpc-HowtoconfiguretheXmlRpcClientwithJavacode">How to configure the XmlRpcClient with Java code</h3><p>camel-xmlrpc provides a pluggable strategy for configuring the XmlRpcClient used by the component, user just to implement the <strong>XmlRpcClientConfigurer</strong> interface and can configure the XmlRpcClient as he wants. The clientConfigure instance reference can be set through the uri option clientConfigure.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
 import org.apache.xmlrpc.client.XmlRpcClient;
 import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;
@@ -246,8 +193,7 @@ public class MyClientConfigurer implemen
 
 }
 ]]></script>
-</div></div>
-</div>
+</div></div></div>
         </td>
         <td valign="top">
           <div class="navigation">

Modified: websites/production/camel/content/xstream.html
==============================================================================
--- websites/production/camel/content/xstream.html (original)
+++ websites/production/camel/content/xstream.html Tue Mar  4 16:19:23 2014
@@ -86,39 +86,26 @@
 	<tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2 id="XStream-XStream">XStream</h2>
-
-<p>XStream is a <a shape="rect" href="data-format.html">Data Format</a> which uses the <a shape="rect" class="external-link" href="http://xstream.codehaus.org/" rel="nofollow">XStream library</a> to marshal and unmarshal Java objects to and from XML.</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-// lets turn Object messages into XML then send to MQSeries
+<div class="wiki-content maincontent"><h2 id="XStream-XStream">XStream</h2><p>XStream is a <a shape="rect" href="data-format.html">Data Format</a> which uses the <a shape="rect" class="external-link" href="http://xstream.codehaus.org/" rel="nofollow">XStream library</a> to marshal and unmarshal Java objects to and from XML.</p><p>To use XStream in your camel routes you need to add the a dependency on&#160;<strong>camel-xstream</strong>&#160;which implements this data format.</p><p>Maven users will need to add the following dependency to their <code>pom.xml</code>&#160;for this component:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
+  &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
+  &lt;artifactId&gt;camel-xstream&lt;/artifactId&gt;
+  &lt;version&gt;x.x.x&lt;/version&gt;
+  &lt;!-- use the same version as your Camel core version --&gt;
+&lt;/dependency&gt;
+]]></script>
+</div></div><h3 id="XStream-UsingtheJavaDSL">Using the Java DSL</h3><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[// lets turn Object messages into XML then send to MQSeries
 from(&quot;activemq:My.Queue&quot;).
   marshal().xstream().
   to(&quot;mqseries:Another.Queue&quot;);
 ]]></script>
-</div></div>
-
-<h3 id="XStream-XMLInputFactoryandXMLOutputFactory">XMLInputFactory and XMLOutputFactory </h3>
-<p><a shape="rect" class="external-link" href="http://xstream.codehaus.org/" rel="nofollow">The XStream library</a> uses the <code>javax.xml.stream.XMLInputFactory</code> and <code>javax.xml.stream.XMLOutputFactory</code>,  you can control which implementation of this factory should be used.</p>
-
-<p>The Factory is discovered using this algorithm:<br clear="none">
-1. Use the <code>javax.xml.stream.XMLInputFactory</code> , <code>javax.xml.stream.XMLOutputFactory</code> system property.<br clear="none">
-2. Use the <code>lib/xml.stream.properties</code> file in the <code>JRE_HOME</code> directory.<br clear="none">
-3. Use the Services API, if available, to determine the classname by looking in the <code>META-INF/services/javax.xml.stream.XMLInputFactory</code>, <code>META-INF/services/javax.xml.stream.XMLOutputFactory</code>  files in jars available to the JRE.<br clear="none">
-4. Use the platform default XMLInputFactory,XMLOutputFactory instance.</p>
-
-<h3 id="XStream-HowtosettheXMLencodinginXstreamDataFormat?">How to set the XML encoding in Xstream DataFormat?</h3>
-<p>From Camel 2.2.0, you can set the encoding of XML in Xstream DataFormat by setting the Exchange's property with the key <code>Exchange.CHARSET_NAME</code>, or setting the encoding property on Xstream from DSL or Spring config.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-from(&quot;activemq:My.Queue&quot;).
+</div></div><h3 id="XStream-XMLInputFactoryandXMLOutputFactory">XMLInputFactory and XMLOutputFactory</h3><p><a shape="rect" class="external-link" href="http://xstream.codehaus.org/" rel="nofollow">The XStream library</a> uses the <code>javax.xml.stream.XMLInputFactory</code> and <code>javax.xml.stream.XMLOutputFactory</code>, you can control which implementation of this factory should be used.</p><p>The Factory is discovered using this algorithm:<br clear="none"> 1. Use the <code>javax.xml.stream.XMLInputFactory</code> , <code>javax.xml.stream.XMLOutputFactory</code> system property.<br clear="none"> 2. Use the <code>lib/xml.stream.properties</code> file in the <code>JRE_HOME</code> directory.<br clear="none"> 3. Use the Services API, if available, to determine the classname by looking in the <code>META-INF/services/javax.xml.stream.XMLInputFactory</code>, <code>META-INF/services/javax.xml.stream.XMLOutputFactory</code> files in jars available to the JRE.<br clear="none"> 4. Use the
  platform default XMLInputFactory,XMLOutputFactory instance.</p><h3 id="XStream-HowtosettheXMLencodinginXstreamDataFormat?">How to set the XML encoding in Xstream DataFormat?</h3><p>From Camel 2.2.0, you can set the encoding of XML in Xstream DataFormat by setting the Exchange's property with the key <code>Exchange.CHARSET_NAME</code>, or setting the encoding property on Xstream from DSL or Spring config.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[from(&quot;activemq:My.Queue&quot;).
   marshal().xstream(&quot;UTF-8&quot;).
   to(&quot;mqseries:Another.Queue&quot;);
 ]]></script>
-</div></div>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[
 &lt;camelContext id=&quot;camel&quot; xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
     
@@ -142,22 +129,6 @@ from(&quot;activemq:My.Queue&quot;).
 
 &lt;/camelContext&gt;
 ]]></script>
-</div></div>
-
-<h3 id="XStream-Dependencies">Dependencies</h3>
-
-<p>To use XStream in your camel routes you need to add the a dependency on <strong>camel-xstream</strong> which implements this data format. </p>
-
-<p>If you use maven you could just add the following to your pom.xml, substituting the version number for the latest &amp; greatest release (see <a shape="rect" href="download.html">the download page for the latest versions</a>).</p>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[
-&lt;dependency&gt;
-  &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
-  &lt;artifactId&gt;camel-xstream&lt;/artifactId&gt;
-  &lt;version&gt;x.x.x&lt;/version&gt;
-&lt;/dependency&gt;
-]]></script>
 </div></div></div>
         </td>
         <td valign="top">