You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Schumacher <pa...@gmx.net> on 2007/07/11 17:15:24 UTC

Exposing Existing Session Bean as a Web Service through ServiceMix

Hello,

sorry if this has been asked before. I searched but didn't find anything. 

For testing purposes I'm trying to use ServiceMix to expose a Session Bean
(running  in Jboss) as a Web Service. 

It would be great if somebody could point me to a tutorial or give me some
hints how to achieve this.

Thanks,
Pascal
-- 
View this message in context: http://www.nabble.com/Exposing-Existing-Session-Bean-as-a-Web-Service-through-ServiceMix-tf4062553s12049.html#a11542359
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Exposing Existing Session Bean as a Web Service through ServiceMix

Posted by Schumacher <pa...@gmx.net>.
Thanks for the help rabi, it is much appreciated :), but I still can't make
it work. 

Here is a more detailed description of my problem:

I'm trying to use ServiceMix to expose a Stateless EJB3 Session Bean as a
Web Service.  The Bean is inside a .ear and deployed to JBoss. 

I guess I have to run ServiceMix in JBoss. Then write a JSR181 component as
described by rabi and deploy it to JBoss too?

Thanks,
Pascal

 

rabi wrote:
> 
> I think you can write a JSR181 component and set the ejb-proxy as a
> property like mentioned below and then wrap calls to this in your
> webmethods of the JSR181 implementation class
>  
>  <jsr181:endpoint  pojo="#mypojo" wsdlResource="classpath:service.wsdl" 
>                      typeMapping="jaxb2"
>                      annotations="jsr181"
>                      style="document"/>
>    
>    	<bean id="mypojo"
> 		class="org.apache.servicemix.samples.orchestration_jsr181.CityTimeImpl">
> 		<property name="ejbProxy">
> <bean 
> class="org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean">                       
> <property name="jndiName">     <value>ejb/EJBService</value>   </property>  
> <property name="businessInterface">    
> <value>full.class.path.EJBServiceRemoteInterface</value>   </property> 
> </bean>
> </bean>
> </jsr181:endpoint>
> 
> and then access it over http consumer endpoint.
> 

-- 
View this message in context: http://www.nabble.com/Exposing-Existing-Session-Bean-as-a-Web-Service-through-ServiceMix-tf4062553s12049.html#a11578923
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Exposing Existing Session Bean as a Web Service through ServiceMix

Posted by rabi <ra...@wipro.com>.
I think you can write a JSR181 component and set the ejb-proxy as a property
like mentioned below and then wrap calls to this in your webmethods of the
JSR181 implementation class

 
 <jsr181:endpoint  pojo="#mypojo" wsdlResource="classpath:service.wsdl" 
                     typeMapping="jaxb2"
                     annotations="jsr181"
                     style="document"/>
   
   	<bean id="mypojo"
		class="org.apache.servicemix.samples.orchestration_jsr181.CityTimeImpl">
		<property name="ejbProxy">
<bean 
class="org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean">                       
<property name="jndiName">     <value>ejb/EJBService</value>   </property>  
<property name="businessInterface">    
<value>full.class.path.EJBServiceRemoteInterface</value>   </property> 
</bean>
</bean>
</jsr181:endpoint>

and then access it over http consumer endpoint.



Schumacher wrote:
> 
> Hello,
> 
> sorry if this has been asked before. I searched but didn't find anything. 
> 
> For testing purposes I'm trying to use ServiceMix to expose a Session Bean
> (running  in Jboss) as a Web Service. 
> 
> It would be great if somebody could point me to a tutorial or give me some
> hints how to achieve this.
> 
> Thanks,
> Pascal
> 

-- 
View this message in context: http://www.nabble.com/Exposing-Existing-Session-Bean-as-a-Web-Service-through-ServiceMix-tf4062553s12049.html#a11544663
Sent from the ServiceMix - User mailing list archive at Nabble.com.