Bufferize operations with EIP

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (15)

View Page History
{column}

h2.





h1. == This article is a STUB, writing in progress ==


h1. Rationale and Context


{gliffy:name=Petals RMI-EIP-JSR181\|align=left\|size=L\|version=2}
*Deployed configurations:*
# One Petals ESB node has:
## SE-RMI for sending test messages via webconsole
## SE-EIP for the buffering chain + 1
## SE-JSR181 which contains the operation "AddIntegers" on the sample service "MathOperations"
# Then we will configure and deploy
## One Service Assembly (SA) containing two EIP Service Unit (SU) : Aggregator and Splitter patterns
## One SA containing one sample JSR181 SU: "MathOperations" with the operation "AddIntegers"

h1. Configuration for the Petals-SE-Talend component
*Message flows:*
# From SE-RMI to SE-EIP "Aggregator"
# From SE-EIP "Aggregator" to SE-EIP "Splitter"
# From SE-EIP "Splitter" to JSR181 "MathOperations"

hjh
h1. Configuring the sample JSR181 Service Unit
{code:language=java|title=MyMathOperations.java}package test.ebmwebsourcing.com;

//import javax.jws.Oneway;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;

h2. /**
* Here is a sample JAX-WS implementation.
* <p>
* For more information about JAX-WS, please visit
* <b>https://jax-ws.dev.java.net/jax-ws-ea3/docs/annotations.html</b>.
* </p>
*
* @author mlebreton
*/
@WebService( serviceName="MyMathOperations", targetNamespace="http://com.ebmwebsourcing.test", portName="MyMathOperationsPort" )
public class MyMathOperations {

/* (non-Javadoc)
* @see JaxWSInterface#HelloWorld()
*/
@WebMethod( operationName="AddIntegers" ) // @WebMethod: Name of service operations that we will call
@WebResult( name="returnMessage" ) // @WebResult: Name of the message returned by service
public Integer AddIntegers( @WebParam( name="integer1" ) Integer integer1, @WebParam( name="integer2" ) Integer integer2 ) { //@WebParam => Name of service parameters
Integer result;
result = integer1+integer2;
return result;
}; // Returns the sum of two integers
}{code}
The following files can be generated by the Petals Studio.package test.ebmwebsourcing.com;
//import javax.jws.Oneway;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
/*\*
&nbsp;\* Here is a sample JAX-WS implementation.
&nbsp;\* <p>
&nbsp;\* For more information about JAX-WS, please visit&nbsp;
&nbsp;\* <b>https://jax-ws.dev.java.net/jax-ws-ea3/docs/annotations.html</b>.
&nbsp;\* </p>
&nbsp;\*
&nbsp;\* @author mlebreton
&nbsp;*/
@WebService( serviceName="MyMathOperations", targetNamespace="http://com.ebmwebsourcing.test", portName="MyMathOperationsPort" )
public class MyMathOperations { /\* (non-Javadoc) \* @see JaxWSInterface#HelloWorld() \*/ @WebMethod( operationName="AddIntegers" ) // @WebMethod: Name of service operations that we will call @WebResult( name="returnMessage" ) // @WebResult: Name of the message returned by service public Integer AddIntegers( @WebParam( name="integer1" ) Integer integer1, &nbsp;@WebParam( name="integer2" ) Integer integer2 ) { //@WebParam => Name of service parameters Integer result; result = integer1+integer2; return result; }; // Returns the sum of two integers @WebMethod( operationName="DivideIntegers" ) // @WebMethod: Name of service operations that we will call @WebResult( name="returnMessage" ) // @WebResult: Name of the message returned by service public Integer DivideIntegers( @WebParam( name="integer1" ) Integer integer1, &nbsp;@WebParam( name="integer2" ) Integer integer2 ) { //@WebParam => Name of service parameters Integer result; result = integer1/integer2; return result; }; // Returns the division of two integers @WebMethod( operationName="MultiplyIntegers" ) // @WebMethod: Name of service operations that we will call @WebResult( name="returnMessage" ) // @WebResult: Name of the message returned by service public Integer MultiplyIntegers( @WebParam( name="integer1" ) Integer integer1, &nbsp;@WebParam( name="integer2" ) Integer integer2 ) { //@WebParam => Name of service parameters Integer result; result = integer1*integer2; return result; }; // Returns the multipication of two integers
}

h1. Configuration for the Petals-BC-SOAP component

{code:language=xml|title=MyMathOperations_schema1.xsd|collapse=true|theme=Default}<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema version="1.0" targetNamespace="http://com.ebmwebsourcing.test" xmlns:tns="http://com.ebmwebsourcing.test" xmlns:xs="http://www.w3.org/2001/XMLSchema">

<xs:element name="AddIntegers" type="tns:AddIntegers"/>

<xs:element name="AddIntegersResponse" type="tns:AddIntegersResponse"/>

<xs:element name="DivideIntegers" type="tns:DivideIntegers"/>

<xs:element name="DivideIntegersResponse" type="tns:DivideIntegersResponse"/>

<xs:element name="MultiplyIntegers" type="tns:MultiplyIntegers"/>

<xs:element name="MultiplyIntegersResponse" type="tns:MultiplyIntegersResponse"/>

<xs:complexType name="MultiplyIntegers">
<xs:sequence>
<xs:element name="integer1" type="xs:int" minOccurs="0"/>
<xs:element name="integer2" type="xs:int" minOccurs="0"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="MultiplyIntegersResponse">
<xs:sequence>
<xs:element name="returnMessage" type="xs:int" minOccurs="0"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AddIntegers">
<xs:sequence>
<xs:element name="integer1" type="xs:int" minOccurs="0"/>
<xs:element name="integer2" type="xs:int" minOccurs="0"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="AddIntegersResponse">
<xs:sequence>
<xs:element name="returnMessage" type="xs:int" minOccurs="0"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="DivideIntegers">
<xs:sequence>
<xs:element name="integer1" type="xs:int" minOccurs="0"/>
<xs:element name="integer2" type="xs:int" minOccurs="0"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="DivideIntegersResponse">
<xs:sequence>
<xs:element name="returnMessage" type="xs:int" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:schema>{code}
{code:language=xml|title=MyMathOperations_schema1.xsd|collapse=true|theme=Default}<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.6 in JDK 6. -->
<definitions targetNamespace="http://com.ebmwebsourcing.test" name="MyMathOperations" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://com.ebmwebsourcing.test" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<types>
<xsd:schema>
<xsd:import namespace="http://com.ebmwebsourcing.test" schemaLocation="MyMathOperations_schema1.xsd"/>
</xsd:schema>
</types>
<message name="AddIntegers">
<part name="parameters" element="tns:AddIntegers"/>
</message>
<message name="AddIntegersResponse">
<part name="parameters" element="tns:AddIntegersResponse"/>
</message>
<message name="DivideIntegers">
<part name="parameters" element="tns:DivideIntegers"/>
</message>
<message name="DivideIntegersResponse">
<part name="parameters" element="tns:DivideIntegersResponse"/>
</message>
<message name="MultiplyIntegers">
<part name="parameters" element="tns:MultiplyIntegers"/>
</message>
<message name="MultiplyIntegersResponse">
<part name="parameters" element="tns:MultiplyIntegersResponse"/>
</message>
<portType name="MyMathOperations">
<operation name="AddIntegers">
<input message="tns:AddIntegers"/>
<output message="tns:AddIntegersResponse"/>
</operation>
<operation name="DivideIntegers">
<input message="tns:DivideIntegers"/>
<output message="tns:DivideIntegersResponse"/>
</operation>
<operation name="MultiplyIntegers">
<input message="tns:MultiplyIntegers"/>
<output message="tns:MultiplyIntegersResponse"/>
</operation>
</portType>
<binding name="MyMathOperationsPortBinding" type="tns:MyMathOperations">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="AddIntegers">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="DivideIntegers">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
<operation name="MultiplyIntegers">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="MyMathOperations">
<port name="MyMathOperationsPort" binding="tns:MyMathOperationsPortBinding">
<soap:address location="REPLACE_WITH_ACTUAL_URL"/>
</port>
</service>
</definitions>{code}
{code:language=xml|title=MyMathOperations_schema1.xsd|collapse=true|theme=Default}<?xml version="1.0" encoding="UTF-8"?>

<!-- JBI descriptor for the Petals component petals-se-jsr181 -->
<jbi:jbi version="1.0"
xmlns:jbi="http://java.sun.com/xml/ns/jbi"
xmlns:jsr181="http://petals.ow2.org/components/jsr181/version-1"
xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-5"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<jbi:services binding-component="false">

<jbi:provides
interface-name="generatedNs:MyMathOperations"
service-name="generatedNs:MyMathOperations"
endpoint-name="MyMathOperationsPort"
xmlns:generatedNs="http://com.ebmwebsourcing.test">

<!-- CDK elements -->
<petalsCDK:wsdl>MyMathOperations.wsdl</petalsCDK:wsdl>

<!-- Component specific elements -->
<jsr181:class>test.ebmwebsourcing.com.MyMathOperations</jsr181:class>

</jbi:provides>

</jbi:services>
</jbi:jbi>{code}

h1. Running the use case