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.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZphDKb03bG519t4-i4S0F3c07CDCiZ2trDz-PJIfEflvboFq97Fvii50VGwcmKAaHhivpSE1FUpD1hdNkSiruBj2pl1iMFKJngqTsey5GdBiiNzAytyJb7BO0nWyVWjx62Zmb87dNufw/s400/sca_spring_1.png)
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.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhA1tUAYVSaol6A17OFgueuJ0TrViUmkroAS4pXLG4hXFapMCjrmEtQ3MK4tfMZJ5fxFKPDcLDGf0tsMa3CWwRwvkvjvlIydtGKVKqiwuDyJxww_jV7EHM9kmKgad7o1fcs6NoOnDGczg0/s400/sca_spring_2.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlZuxftjC1_5M_Qypa5EUFRVhFZC1cBDl5al-BgQvenY35YgQ5weqa_mlVsvuFl3woslT4lTBcrXvPLUl14hLWJ0S2pH-3qXWhjyYk5Mit0gODVSm06UmLc5xwepNshbZbUTlGlUws2kQ/s400/sca_spring_3.png)
Open the BPEL component and add an invoke to call the partnerlink and create the input and output variables.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjwjHkbOVcIGuY8-JrDGjCfkZF9oo3VYZzR4F1Paa6GYO5ZMEKpWpE-VOlRg0CAw4QWG0xyNFIC_bQ1WN9flzQDYDiSS7sBJZjDWeoMLrZtf_86aoquHVS_wVZ85ZKX45EKTQ2D24Ibrs/s400/sca_spring_2_5.png)
Deploy the composite and test it in the Soa Suite. With this as result.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRRgIfYlKbySwjMx_aTPuQDd50pfaoTVCQ8ZELC_Olu1ig7gZPJ6QdvkDHES8VPWzUUzFU5eokutmorO3f6LVxvjUTs1d6AmUNhBHdXxugJZ8Rdle4eDcpMliCf6E7JLvmYaIhHxpcwrs/s400/sca_spring_4.png)
Here is my Soa Suite example workspace
No comments:
Post a Comment