servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r499819 - in /incubator/servicemix/site: client-api.html documentation.html features.html
Date Thu, 25 Jan 2007 15:32:12 GMT
Author: chirino
Date: Thu Jan 25 07:32:08 2007
New Revision: 499819

URL: http://svn.apache.org/viewvc?view=rev&rev=499819
Log:
Latest export from confluence

Modified:
    incubator/servicemix/site/client-api.html
    incubator/servicemix/site/documentation.html
    incubator/servicemix/site/features.html

Modified: incubator/servicemix/site/client-api.html
URL: http://svn.apache.org/viewvc/incubator/servicemix/site/client-api.html?view=diff&rev=499819&r1=499818&r2=499819
==============================================================================
--- incubator/servicemix/site/client-api.html (original)
+++ incubator/servicemix/site/client-api.html Thu Jan 25 07:32:08 2007
@@ -14,8 +14,10 @@
 _uacct = "UA-398545-1";
 urchinTracker();
     </SCRIPT>
+<META name="keywords" content="business integration, enterprise service bus, enterprise
application integration, ESB, EAI, SOA, Service Oriented Architecture, web services, SOAP,
JBI, JMS, WSDL, business-to-business, b2b, XML, EDI, Electronic Data Interchange, standards
support, integration standards, application integration, java message service, middleware,
message broker, software, solutions, services, ActiveMQ, ServiceMix, open source, MQ, message
queue, message bus">
+<META name="description" content="">
     <TITLE>
-Client API
+Apache ServiceMix, the Agile Open Source ESB -- Client API
     </TITLE>
   <META http-equiv="Content-Type" content="text/html;charset=UTF-8"></HEAD>
   <BODY onload="init()">
@@ -195,15 +197,42 @@
 <P>ServiceMix has integrated support for <A href="uris.html" title="URIs">URIs</A>
to simplify the accessing of endpoints within the <A href="nmr.html" title="NMR">NMR</A>.
The ServiceMixClient (from 3.0-M3 or later) allows you to work with URIs easily via a Destination
interface. This interface acts as a factory of MessageExchange objects which are pre-wired
to specific endpoints specified via a URI.</P>
 
 <P>The following shows how to work with InOnly for one way messaging</P>
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">Destination destination = client.createDestination(<SPAN
class="code-quote">&quot;service:http:<SPAN class="code-comment">//servicemix.org/cheese/receiver&quot;</SPAN>);
+</SPAN>InOnly exchange = destination.createInOnlyExchange();
+
+NormalizedMessage message = exchange.getInMessage();
+message.setProperty(<SPAN class="code-quote">&quot;name&quot;</SPAN>,
<SPAN class="code-quote">&quot;James&quot;</SPAN>);
+message.setContent(<SPAN class="code-keyword">new</SPAN> StreamSource(<SPAN
class="code-keyword">new</SPAN> StringReader(<SPAN class="code-quote">&quot;&lt;hello&gt;world&lt;/hello&gt;&quot;</SPAN>)));
 
+client.send(exchange);</PRE>
+</DIV></DIV>
 <P>Or using InOut for request-response</P>
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">Destination destination = client.createDestination(<SPAN
class="code-quote">&quot;service:http:<SPAN class="code-comment">//servicemix.org/cheese/myService&quot;</SPAN>);
+</SPAN>InOut exchange = destination.createInOutExchange();
 
+NormalizedMessage request = exchange.getInMessage();
+request.setProperty(<SPAN class="code-quote">&quot;name&quot;</SPAN>,
<SPAN class="code-quote">&quot;James&quot;</SPAN>);
+request.setContent(<SPAN class="code-keyword">new</SPAN> StreamSource(<SPAN
class="code-keyword">new</SPAN> StringReader(<SPAN class="code-quote">&quot;&lt;hello&gt;world&lt;/hello&gt;&quot;</SPAN>)));
+
+client.sendSync(exchange);
+
+NormalizedMessage response = exchange.getOutMessage();</PRE>
+</DIV></DIV>
 
 <H3><A name="ClientAPI-SimpleronewaymessagingwithDestinations"></A>Simpler
one-way messaging with Destinations</H3>
 
 <P>For one-way messaging its sometimes simpler to just work with a Message instance
(you can always refer to the MessageExchange via the getExchange() method if need be). For
example</P>
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">Destination destination = client.createDestination(<SPAN
class="code-quote">&quot;service:http:<SPAN class="code-comment">//servicemix.org/cheese/receiver&quot;</SPAN>);
+</SPAN>Message message = destination.createInOnlyMessage();
+message.setProperty(<SPAN class="code-quote">&quot;name&quot;</SPAN>,
<SPAN class="code-quote">&quot;James&quot;</SPAN>);
+message.setBody(<SPAN class="code-quote">&quot;&lt;hello&gt;world&lt;/hello&gt;&quot;</SPAN>);
 
-<P>For more detail see the <SPAN class="nobr"><A href="http://svn.apache.org/repos/asf/incubator/servicemix/trunk/servicemix-core/src/test/java/org/apache/servicemix/client/ClientDestinationTest.java"
title="Visit page outside Confluence" rel="nofollow">unit test case<SUP><IMG class="rendericon"
src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle"
alt="" border="0"></SUP></A></SPAN></P>
+client.send(message);</PRE>
+</DIV></DIV>
+<P>For more detail see the <SPAN class="nobr"><A href="http://svn.apache.org/repos/asf/incubator/servicemix/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/client/ClientDestinationTest.java"
title="Visit page outside Confluence" rel="nofollow">unit test case<SUP><IMG class="rendericon"
src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle"
alt="" border="0"></SUP></A></SPAN></P>
 
 <H2><A name="ClientAPI-UsingthePOJOmethods"></A>Using the POJO methods</H2>
 
@@ -246,11 +275,22 @@
 <P>We use the Spring XML configuration files to configure the client. You can then
use dependency injection to inject the client into your POJOs.</P>
 
 <P>Here&apos;s an example of using a basic client...</P>
-
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-xml"><SPAN class="code-tag">&lt;bean id=<SPAN class="code-quote">&quot;client&quot;</SPAN>
class=<SPAN class="code-quote">&quot;org.apache.servicemix.client.DefaultServiceMixClient&quot;</SPAN>&gt;</SPAN>
+  <SPAN class="code-tag">&lt;constructor-arg ref=<SPAN class="code-quote">&quot;jbi&quot;</SPAN>
/&gt;</SPAN>
+<SPAN class="code-tag">&lt;/bean&gt;</SPAN></PRE>
+</DIV></DIV>
 <P>Note that the jbi bean reference is the ServiceMix JBI container.</P>
 
 <P>This example creates a client which is hard-wired to default to a specific service
when an invocation is performed.</P>
-
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-xml"><SPAN class="code-tag">&lt;bean id=<SPAN class="code-quote">&quot;clientWithRouting&quot;</SPAN>
class=<SPAN class="code-quote">&quot;org.apache.servicemix.client.DefaultServiceMixClient&quot;</SPAN>&gt;</SPAN>
+  <SPAN class="code-tag">&lt;constructor-arg ref=<SPAN class="code-quote">&quot;jbi&quot;</SPAN>
/&gt;</SPAN>
+  <SPAN class="code-tag">&lt;constructor-arg&gt;</SPAN>
+    <SPAN class="code-tag">&lt;sm:activationSpec destinationService=<SPAN class="code-quote">&quot;foo:receiver&quot;</SPAN>/&gt;</SPAN>
+  <SPAN class="code-tag">&lt;/constructor-arg&gt;</SPAN>
+<SPAN class="code-tag">&lt;/bean&gt;</SPAN></PRE>
+</DIV></DIV>
 
 <H3><A name="ClientAPI-IfyouhaveaccesstoaComponentContext"></A>If you have
access to a ComponentContext</H3>
 
@@ -280,8 +320,8 @@
     </DIV>
     <DIV id="site-footer">
           Added by     <A href="http://goopen.org/confluence/users/viewuserprofile.action?username=jstrachan">James
Strachan</A>,
-    last edited by     <A href="http://goopen.org/confluence/users/viewuserprofile.action?username=gnodet">Guillaume
Nodet</A> on Aug 08, 2006
-                  &nbsp;(<A href="http://goopen.org/confluence/pages/diffpages.action?pageId=1957&originalId=9596">view
change</A>)
+    last edited by     <A href="http://goopen.org/confluence/users/viewuserprofile.action?username=gnodet">Guillaume
Nodet</A> on Jan 25, 2007
+                  &nbsp;(<A href="http://goopen.org/confluence/pages/diffpages.action?pageId=1957&originalId=15343">view
change</A>)
               
       (<A href="http://goopen.org/confluence/pages/editpage.action?pageId=1957">edit
page</A>)
     </DIV>

Modified: incubator/servicemix/site/documentation.html
URL: http://svn.apache.org/viewvc/incubator/servicemix/site/documentation.html?view=diff&rev=499819&r1=499818&r2=499819
==============================================================================
--- incubator/servicemix/site/documentation.html (original)
+++ incubator/servicemix/site/documentation.html Thu Jan 25 07:32:08 2007
@@ -14,8 +14,10 @@
 _uacct = "UA-398545-1";
 urchinTracker();
     </SCRIPT>
+<META name="keywords" content="business integration, enterprise service bus, enterprise
application integration, ESB, EAI, SOA, Service Oriented Architecture, web services, SOAP,
JBI, JMS, WSDL, business-to-business, b2b, XML, EDI, Electronic Data Interchange, standards
support, integration standards, application integration, java message service, middleware,
message broker, software, solutions, services, ActiveMQ, ServiceMix, open source, MQ, message
queue, message bus">
+<META name="description" content="">
     <TITLE>
-Documentation
+Apache ServiceMix, the Agile Open Source ESB -- Documentation
     </TITLE>
   <META http-equiv="Content-Type" content="text/html;charset=UTF-8"></HEAD>
   <BODY onload="init()">

Modified: incubator/servicemix/site/features.html
URL: http://svn.apache.org/viewvc/incubator/servicemix/site/features.html?view=diff&rev=499819&r1=499818&r2=499819
==============================================================================
--- incubator/servicemix/site/features.html (original)
+++ incubator/servicemix/site/features.html Thu Jan 25 07:32:08 2007
@@ -14,8 +14,10 @@
 _uacct = "UA-398545-1";
 urchinTracker();
     </SCRIPT>
+<META name="keywords" content="business integration, enterprise service bus, enterprise
application integration, ESB, EAI, SOA, Service Oriented Architecture, web services, SOAP,
JBI, JMS, WSDL, business-to-business, b2b, XML, EDI, Electronic Data Interchange, standards
support, integration standards, application integration, java message service, middleware,
message broker, software, solutions, services, ActiveMQ, ServiceMix, open source, MQ, message
queue, message bus">
+<META name="description" content="">
     <TITLE>
-Features
+Apache ServiceMix, the Agile Open Source ESB -- Features
     </TITLE>
   <META http-equiv="Content-Type" content="text/html;charset=UTF-8"></HEAD>
   <BODY onload="init()">



Mime
View raw message