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 2006/11/20 17:52:57 UTC
svn commit: r477254 - /incubator/servicemix/site/main/servicemix-jsr181.html
Author: chirino
Date: Mon Nov 20 08:52:56 2006
New Revision: 477254
URL: http://svn.apache.org/viewvc?view=rev&rev=477254
Log:
Latest export from confluence
Modified:
incubator/servicemix/site/main/servicemix-jsr181.html
Modified: incubator/servicemix/site/main/servicemix-jsr181.html
URL: http://svn.apache.org/viewvc/incubator/servicemix/site/main/servicemix-jsr181.html?view=diff&rev=477254&r1=477253&r2=477254
==============================================================================
--- incubator/servicemix/site/main/servicemix-jsr181.html (original)
+++ incubator/servicemix/site/main/servicemix-jsr181.html Mon Nov 20 08:52:56 2006
@@ -36,7 +36,7 @@
<TR>
<TD align="left" valign="middle" nowrap="">
<DIV id="site-breadcrumbs">
-<A href="home.html" title="ServiceMix">ServiceMix</A> > <A href="home.html" title="Home">Home</A> > <A href="documentation.html" title="Documentation">Documentation</A> > <A href="components.html" title="Components">Components</A> > <A href="jbi-components.html" title="JBI Components">JBI Components</A> > <A href="" title="servicemix-jsr181">servicemix-jsr181</A>
+<A href="home.html" title="ServiceMix">ServiceMix</A> > <A href="home.html" title="Home">Home</A> > <A href="documentation.html" title="Documentation">Documentation</A> > <A href="components-list.html" title="Components list">Components list</A> > <A href="jbi-components.html" title="JBI Components">JBI Components</A> > <A href="" title="servicemix-jsr181">servicemix-jsr181</A>
</DIV>
</TD>
<TD align="right" valign="middle" nowrap="">
@@ -105,6 +105,27 @@
<LI><A href="resources.html" title="Resources">Resources</A></LI>
</UL>
+
+<H3><A name="Navigation-Components"></A>Components</H3>
+
+<UL class="alternate" type="square">
+ <LI><SPAN class="nobr"><A href="http://goopen.org/confluence/pages/createpage.action?spaceKey=SM&title=servicemix-beans&linkCreation=true&fromPageId=2021" title="Create Page: servicemix-beans" class="createlink">servicemix-beans<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="servicemix-bpe.html" title="servicemix-bpe">servicemix-bpe</A></LI>
+ <LI><A href="servicemix-drools.html" title="servicemix-drools">servicemix-drools</A></LI>
+ <LI><A href="servicemix-eip.html" title="servicemix-eip">servicemix-eip</A></LI>
+ <LI><A href="servicemix-file.html" title="servicemix-file">servicemix-file</A></LI>
+ <LI><A href="servicemix-ftp.html" title="servicemix-ftp">servicemix-ftp</A></LI>
+ <LI><A href="servicemix-http.html" title="servicemix-http">servicemix-http</A></LI>
+ <LI><A href="servicemix-jms.html" title="servicemix-jms">servicemix-jms</A></LI>
+ <LI><A href="" title="servicemix-jsr181">servicemix-jsr181</A></LI>
+ <LI><A href="servicemix-lwcontainer.html" title="servicemix-lwcontainer">servicemix-lwcontainer</A></LI>
+ <LI><A href="servicemix-saxon.html" title="servicemix-saxon">servicemix-saxon</A></LI>
+ <LI><SPAN class="nobr"><A href="http://goopen.org/confluence/pages/createpage.action?spaceKey=SM&title=servicemix-script&linkCreation=true&fromPageId=2021" title="Create Page: servicemix-script" class="createlink">servicemix-script<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="servicemix-wsn2005.html" title="servicemix-wsn2005">servicemix-wsn2005</A></LI>
+ <LI><A href="servicemix-xmpp.html" title="servicemix-xmpp">servicemix-xmpp</A></LI>
+</UL>
+
+
</DIV>
</TD>
<TD valign="top">
@@ -166,7 +187,7 @@
<P>You can deploy Service Units containing a file named xbean.xml for activating consumer and provider endpoints.</P>
<P>This xml file should respect the given syntax, though this is a spring based xml configuration file from where all beans of class <SPAN class="nobr"><A href="http://incubator.apache.org/servicemix/maven/servicemix-jsr181/apidocs/org/apache/servicemix/jsr181/Jsr181Endpoint.html" title="Visit page outside Confluence" rel="nofollow">Jsr181Endpoint<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> are retrieved.<BR>
-See a full example <SPAN class="nobr"><A href="http://svn.apache.org/repos/asf/incubator/servicemix/trunk/servicemix-jsr181/src/test/resources/good2/xbean.xml" title="Visit page outside Confluence" rel="nofollow">here<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>. Note that you have to define the http namespace with</P>
+See a full example <SPAN class="nobr"><A href="http://svn.apache.org/repos/asf/incubator/servicemix/trunk/deployables/serviceengines/servicemix-jsr181/src/test/resources/good2/xbean.xml" title="Visit page outside Confluence" rel="nofollow">here<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>. Note that you have to define the http namespace with</P>
<DIV class="code"><DIV class="codeContent">
<PRE class="code-xml"><SPAN class="code-tag"><beans <SPAN class="code-keyword">xmlns:jsr181</SPAN>=<SPAN class="code-quote">"http://servicemix.apache.org/jsr181/1.0"</SPAN>></SPAN>
...
@@ -192,9 +213,22 @@
<H2><A name="servicemix-jsr181-Endpoint"></A>Endpoint</H2>
<P>A few examples:</P>
-
-
-
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-xml"><jsr181:endpoint endpoint=<SPAN class="code-quote">"endpoint1"</SPAN>
+ typeMapping=<SPAN class="code-quote">"xmlbeans"</SPAN>>
+ <SPAN class="code-tag"><jsr181:pojo></SPAN>
+ <SPAN class="code-tag"><bean class=<SPAN class="code-quote">"test.EchoService"</SPAN> /></SPAN>
+ <SPAN class="code-tag"></jsr181:pojo></SPAN>
+<SPAN class="code-tag"></jsr181:endpoint></SPAN></PRE>
+</DIV></DIV>
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-xml"><SPAN class="code-tag"><bean id=<SPAN class="code-quote">"myPojo"</SPAN> class=<SPAN class="code-quote">"test.EchoService"</SPAN> /></SPAN>
+<SPAN class="code-tag"><jsr181:endpoint pojo=<SPAN class="code-quote">"#myPojo"</SPAN> /></SPAN></PRE>
+</DIV></DIV>
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-xml"><jsr181:endpoint pojoClass=<SPAN class="code-quote">"test.EchoService2"</SPAN>
+ annotations=<SPAN class="code-quote">"none"</SPAN> /></PRE>
+</DIV></DIV>
<TABLE cellpadding="5" width="85%" cellspacing="8px" class="infoMacro" border="0" align="center"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="http://goopen.org/confluence/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD><B class="strong">Endpoint attributes</B><BR>
<TABLE class="confluenceTable"><TBODY>
<TR>
@@ -284,7 +318,6 @@
<SPAN class="code-tag"></jsr181:pojo></SPAN>
<SPAN class="code-tag"></jsr181:endpoint></SPAN></PRE>
</DIV></DIV>
-
<P>If you want to send a request to another service from your POJO, you can add the following method on your POJO:</P>
<DIV class="code"><DIV class="codeContent">
<PRE class="code-java"><SPAN class="code-keyword">private</SPAN> javax.jbi.component.ComponentContext context;
@@ -311,7 +344,19 @@
<P>The servicemix-jsr181 component can also be configured in a spring/xbean configuration file, for use in an embedded ServiceMix.<BR>
Here is an example of such a configuration:</P>
-
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-xml"><SPAN class="code-tag"><sm:activationSpec></SPAN>
+ <SPAN class="code-tag"><sm:component></SPAN>
+ <SPAN class="code-tag"><jsr181:component></SPAN>
+ <SPAN class="code-tag"><jsr181:endpoints></SPAN>
+ <jsr181:endpoint pojoClass=<SPAN class="code-quote">"test.EchoService2"</SPAN>
+ serviceInterface=<SPAN class="code-quote">"test.Echo"</SPAN>
+ annotations=<SPAN class="code-quote">"none"</SPAN> />
+ <SPAN class="code-tag"></jsr181:endpoints></SPAN>
+ <SPAN class="code-tag"></jsr181:component></SPAN>
+ <SPAN class="code-tag"></sm:component></SPAN>
+<SPAN class="code-tag"></sm:activationSpec></SPAN></PRE>
+</DIV></DIV>
<TABLE cellpadding="5" width="85%" cellspacing="8px" class="warningMacro" border="0" align="center"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="http://goopen.org/confluence/images/icons/emoticons/forbidden.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD><B class="strong">Classpath issues when embedding servicemix-jsr181 component</B><BR>
<P>When using the servicemix.xml configuration file to create jsr181 endpoints, you must include the servicemix-jsr181-xxx.jar in your classpath.<BR>
You will find this file inside the component installer (./components/servicemix-jsr181-xxx.zip).<BR>
@@ -324,13 +369,26 @@
<P>You can create java proxies for JBI endpoints, provided that they expose a WSDL.</P>
<P>The basic configuration is the following:</P>
-
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-xml"><jsr181:proxy id=<SPAN class="code-quote">"proxy"</SPAN>
+ container=<SPAN class="code-quote">"#jbi"</SPAN>
+ interfaceName=<SPAN class="code-quote">"test:EchoPortType"</SPAN>
+ type=<SPAN class="code-quote">"test.Echo"</SPAN> /></PRE>
+</DIV></DIV>
<P>You can use it from one of you client bean, or from inside another component, and call the JBI endpoint as a plain Java object.</P>
<P>From a jsr181 Service Unit, it could be used as following:</P>
-
-
-
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-xml"><SPAN class="code-tag"><jsr181:endpoint serviceInterface=<SPAN class="code-quote">"test.Echo"</SPAN>></SPAN>
+ <SPAN class="code-tag"><jsr181:pojo></SPAN>
+ <SPAN class="code-tag"><bean class=<SPAN class="code-quote">"test.EchoProxy"</SPAN>></SPAN>
+ <SPAN class="code-tag"><property name=<SPAN class="code-quote">"echo"</SPAN>></SPAN>
+ <SPAN class="code-tag"><jsr181:proxy service=<SPAN class="code-quote">"test:EchoService"</SPAN> context=<SPAN class="code-quote">"#context"</SPAN> type=<SPAN class="code-quote">"test.Echo"</SPAN> /></SPAN>
+ <SPAN class="code-tag"></property></SPAN>
+ <SPAN class="code-tag"></bean></SPAN>
+ <SPAN class="code-tag"></jsr181:pojo></SPAN>
+<SPAN class="code-tag"></jsr181:endpoint></SPAN></PRE>
+</DIV></DIV>
<DIV class="code"><DIV class="codeContent">
<PRE class="code-java"><SPAN class="code-keyword">private</SPAN> Echo echo;
@@ -401,8 +459,8 @@
</DIV>
<DIV id="site-footer">
Added by <A href="http://goopen.org/confluence/users/viewuserprofile.action?username=gnt">gnt</A>,
- last edited by <A href="http://goopen.org/confluence/users/viewuserprofile.action?username=gnodet">Guillaume Nodet</A> on Nov 02, 2006
- (<A href="http://goopen.org/confluence/pages/diffpages.action?pageId=2057&originalId=14552">view change</A>)
+ last edited by <A href="http://goopen.org/confluence/users/viewuserprofile.action?username=philip.dodds%2540gmail.com">Philip Dodds</A> on Nov 20, 2006
+ (<A href="http://goopen.org/confluence/pages/diffpages.action?pageId=2057&originalId=15149">view change</A>)
(<A href="http://goopen.org/confluence/pages/editpage.action?pageId=2057">edit page</A>)
</DIV>