You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ch...@apache.org on 2007/01/27 18:31:01 UTC
svn commit: r500568 - in /incubator/servicemix/site: client-api.html
documentation.html features.html users-guide.html
Author: chirino
Date: Sat Jan 27 09:31:00 2007
New Revision: 500568
URL: http://svn.apache.org/viewvc?view=rev&rev=500568
Log:
Latest export from confluence
Modified:
incubator/servicemix/site/client-api.html
incubator/servicemix/site/documentation.html
incubator/servicemix/site/features.html
incubator/servicemix/site/users-guide.html
Modified: incubator/servicemix/site/client-api.html
URL: http://svn.apache.org/viewvc/incubator/servicemix/site/client-api.html?view=diff&rev=500568&r1=500567&r2=500568
==============================================================================
--- incubator/servicemix/site/client-api.html (original)
+++ incubator/servicemix/site/client-api.html Sat Jan 27 09:31:00 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">"service:http:<SPAN class="code-comment">//servicemix.org/cheese/receiver"</SPAN>);
+</SPAN>InOnly exchange = destination.createInOnlyExchange();
+
+NormalizedMessage message = exchange.getInMessage();
+message.setProperty(<SPAN class="code-quote">"name"</SPAN>, <SPAN class="code-quote">"James"</SPAN>);
+message.setContent(<SPAN class="code-keyword">new</SPAN> StreamSource(<SPAN class="code-keyword">new</SPAN> StringReader(<SPAN class="code-quote">"<hello>world</hello>"</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">"service:http:<SPAN class="code-comment">//servicemix.org/cheese/myService"</SPAN>);
+</SPAN>InOut exchange = destination.createInOutExchange();
+NormalizedMessage request = exchange.getInMessage();
+request.setProperty(<SPAN class="code-quote">"name"</SPAN>, <SPAN class="code-quote">"James"</SPAN>);
+request.setContent(<SPAN class="code-keyword">new</SPAN> StreamSource(<SPAN class="code-keyword">new</SPAN> StringReader(<SPAN class="code-quote">"<hello>world</hello>"</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">"service:http:<SPAN class="code-comment">//servicemix.org/cheese/receiver"</SPAN>);
+</SPAN>Message message = destination.createInOnlyMessage();
+message.setProperty(<SPAN class="code-quote">"name"</SPAN>, <SPAN class="code-quote">"James"</SPAN>);
+message.setBody(<SPAN class="code-quote">"<hello>world</hello>"</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's an example of using a basic client...</P>
-
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-xml"><SPAN class="code-tag"><bean id=<SPAN class="code-quote">"client"</SPAN> class=<SPAN class="code-quote">"org.apache.servicemix.client.DefaultServiceMixClient"</SPAN>></SPAN>
+ <SPAN class="code-tag"><constructor-arg ref=<SPAN class="code-quote">"jbi"</SPAN> /></SPAN>
+<SPAN class="code-tag"></bean></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"><bean id=<SPAN class="code-quote">"clientWithRouting"</SPAN> class=<SPAN class="code-quote">"org.apache.servicemix.client.DefaultServiceMixClient"</SPAN>></SPAN>
+ <SPAN class="code-tag"><constructor-arg ref=<SPAN class="code-quote">"jbi"</SPAN> /></SPAN>
+ <SPAN class="code-tag"><constructor-arg></SPAN>
+ <SPAN class="code-tag"><sm:activationSpec destinationService=<SPAN class="code-quote">"foo:receiver"</SPAN>/></SPAN>
+ <SPAN class="code-tag"></constructor-arg></SPAN>
+<SPAN class="code-tag"></bean></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
- (<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
+ (<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=500568&r1=500567&r2=500568
==============================================================================
--- incubator/servicemix/site/documentation.html (original)
+++ incubator/servicemix/site/documentation.html Sat Jan 27 09:31:00 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=500568&r1=500567&r2=500568
==============================================================================
--- incubator/servicemix/site/features.html (original)
+++ incubator/servicemix/site/features.html Sat Jan 27 09:31:00 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()">
Modified: incubator/servicemix/site/users-guide.html
URL: http://svn.apache.org/viewvc/incubator/servicemix/site/users-guide.html?view=diff&rev=500568&r1=500567&r2=500568
==============================================================================
--- incubator/servicemix/site/users-guide.html (original)
+++ incubator/servicemix/site/users-guide.html Sat Jan 27 09:31:00 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>
-User's Guide
+Apache ServiceMix, the Agile Open Source ESB -- User's Guide
</TITLE>
<META http-equiv="Content-Type" content="text/html;charset=UTF-8"></HEAD>
<BODY onload="init()">
@@ -267,7 +269,7 @@
<LI><A href="pojo-support.html" title="POJO support">POJO support</A></LI>
<LI><SPAN class="nobr"><A href="http://goopen.org/confluence/pages/createpage.action?spaceKey=SM&title=Flows&linkCreation=true&fromPageId=13484" title="Create Page: Flows" class="createlink">Flows<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/plus.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
<LI><SPAN class="nobr"><A href="http://goopen.org/confluence/pages/createpage.action?spaceKey=SM&title=Quality%20of%20Service&linkCreation=true&fromPageId=13484" title="Create Page: Quality of Service" class="createlink">Quality of Service<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/plus.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
- <LI><SPAN class="nobr"><A href="http://goopen.org/confluence/pages/createpage.action?spaceKey=SM&title=Security&linkCreation=true&fromPageId=13484" title="Create Page: Security" class="createlink">Security<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/plus.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+ <LI><A href="security.html" title="Security">Security</A></LI>
</UL>
</LI>
</UL>
@@ -337,7 +339,10 @@
<a href="javascript:hideChildren()">Hide Children</a></span>
</div>
<div class="greybox" id="children" style="display: none;">
- <a href="http://goopen.org/confluence/display/SM/5.+JBI" title="5. JBI">5. JBI</a>
+ <a href="http://goopen.org/confluence/display/SM/Security" title="Security">Security</a>
+ <span class="smalltext">(ServiceMix)</span>
+ <br>
+ <a href="http://goopen.org/confluence/display/SM/5.+JBI" title="5. JBI">5. JBI</a>
<span class="smalltext">(ServiceMix)</span>
<br>
<a href="http://goopen.org/confluence/display/SM/6.+Configuring+ServiceMix" title="6. Configuring ServiceMix">6. Configuring ServiceMix</a>