In this example I use the java Logger and BPEL component of Clemens OTN article.
First I copied the java sources from my Weblogic SCA Spring project to the Soa project and created for demo purposes two Spring Bean configurations.

The first spring bean configuration will just passthrough the java call. We need to remove the WS and EJB binding in the service and reference. ( Soa Suite don't need this )
<?xml version="1.0" encoding="windows-1252" ?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:lang="http://www.springframework.org/schema/lang"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:sca="http://xmlns.oracle.com/weblogic/weblogic-sca">
<!--Spring 2.5 Bean defintions go here-->
<sca:service target="loggerPassThrough" name="LogServiceWS"
type="nl.whitehorses.wls.sca.spring.ILoggerComponent">
</sca:service>
<bean class="nl.whitehorses.wls.sca.spring.LoggerPassThrough" name="loggerPassThrough">
<property name="reference" ref="loggerEJBReference" />
</bean>
<sca:reference name="loggerEJBReference"
type="nl.whitehorses.wls.sca.spring.ILoggerComponent">
</sca:reference>
</beans>
The second spring bean configuration is the java logger. Here we also have to remove the WS binding in the service
<?xml version="1.0" encoding="windows-1252" ?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:lang="http://www.springframework.org/schema/lang"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:sca="http://xmlns.oracle.com/weblogic/weblogic-sca">
<!--Spring 2.5 Bean defintions go here-->
<sca:service target="logger" name="LogServiceEJB"
type="nl.whitehorses.wls.sca.spring.ILoggerComponent">
</sca:service>
<bean class="nl.whitehorses.wls.sca.spring.LoggerComponentImpl" name="logger">
<property name="output" ref="loggerOutput" />
</bean>
<bean id="loggerOutput" class="nl.whitehorses.wls.sca.spring.LoggerOutput"></bean>
</beans>
Now the composite application looks like this. We need to add some wires between the BPEL and Spring Components.


Open the BPEL component and add an invoke to call the partnerlink and create the input and output variables.

Deploy the composite and test it in the Soa Suite. With this as result.

Here is my Soa Suite example workspace
No comments:
Post a Comment