|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (18)
View Page History{section}
{column}
{column}
h2.
h1. == This article is a STUB, writing in progress ==
h1. Rationale and Context
An enterprise wants to delay some operations off-peak hours. Instead of calling operations directly, we will bufferize them, and send them later, when a trigger signal comes (might be automated, or activated by user).
An enterprise wants to delay some operations off-peak hours. Instead of calling operations directly, we will bufferize them, and send them later, when a trigger signal comes (might be automated, or activated by user).
{column}
{hide-if:display=pdf}
{hide-if:display=pdf}
{section}
h1. Solution
h1. Solution
h2. Overall solution
# From SE-EIP "Splitter" to JSR181 "MathOperations"
*This usecase was tested with:*
# Petals ESB 3.1, Petals-SE-EIP 2.4.3, Petals-SE-JSR181 1.1.3, Petals-SE-RMI-1.1.1, Petals webconsole 2.0.3. Configurations were generated using Petals Studio 1.1.0
# Petals ESB 3.1, Petals-SE-EIP 2.4.3, Petals-SE-JSR181 1.1.3, Petals-SE-RMI-1.1.1, Petals webconsole 2.0.3. Configurations were generated using Petals Studio 1.1.0
h1. Configuring the sample JSR181 Service Unit
{code:language=java|title=MyMathOperations.java}package test.ebmwebsourcing.com;
{code:language=java|title=MyMathOperations.java}package test.ebmwebsourcing.com;
}{code}
The following files can be generated by the Petals Studio.package test.ebmwebsourcing.com;
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;
/*\*
\* 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 @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, @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, @WebParam( name="integer2" ) Integer integer2 ) { //@WebParam => Name of service parameters Integer result; result = integer1*integer2; return result; }; // Returns the multipication of two integers
}
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
/*\*
\* 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 @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, @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, @WebParam( name="integer2" ) Integer integer2 ) { //@WebParam => Name of service parameters Integer result; result = integer1*integer2; return result; }; // Returns the multipication of two integers
}
<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: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: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: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 {code:language=xml|title=MyMathOperations.wsdl|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/">
<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/">
<part name="parameters" element="tns:AddIntegersResponse"/>
</message>
</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>
<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">
<operation name="AddIntegers">
<output message="tns:AddIntegersResponse"/>
</operation>
</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>
<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">
<binding name="MyMathOperationsPortBinding" type="tns:MyMathOperations">
</output>
</operation>
</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>
<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">
<service name="MyMathOperations">
</service>
</definitions>{code}
</definitions>{code}
{code:language=xml|title=MyMathOperations_schema1.xsd|collapse=true|theme=Default}<?xml version="1.0" encoding="UTF-8"?>
{code:language=xml|title=jbi.xml|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"
<jbi:jbi version="1.0"
</jbi:jbi>{code}
The method will be packaged in su-jsr181-MathOperations-provide
h1. Configuring SE-EIP: Aggregator and Splitter patterns
h2. SE-EIP Aggregator
{code:language=xml|title=jbi.xml}<?xml version="1.0" encoding="UTF-8"?>
<jbi:jbi version="1.0"
xmlns:eip="http://petals.ow2.org/components/eip/version-2"
xmlns:generatedNs="http://test.petalslink.com"
xmlns:jbi="http://java.sun.com/xml/ns/jbi"
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:EipAggregatorInterface"
service-name="generatedNs:EipAggregator"
endpoint-name="EipAggregatorEndpoint">
<!-- CDK specific elements -->
<petalsCDK:timeout>30000</petalsCDK:timeout>
<petalsCDK:validate-wsdl>false</petalsCDK:validate-wsdl>
<petalsCDK:forward-security-subject>false</petalsCDK:forward-security-subject>
<petalsCDK:forward-message-properties>false</petalsCDK:forward-message-properties>
<petalsCDK:forward-attachments>false</petalsCDK:forward-attachments>
<petalsCDK:wsdl xsi:nil="true" />
<!-- Component specific elements -->
<eip:eip>aggregator</eip:eip>
<eip:test>boolean(/*[local-name()="AddIntegers"]/*[local-name()="equals"])</eip:test>
<eip:aggregator-correlation>boolean(/*[local-name()="AddIntegers"])</eip:aggregator-correlation>
<eip:fault-robust>false</eip:fault-robust>
<eip:exception-robust>false</eip:exception-robust>
<eip:attachment-mode>false</eip:attachment-mode>
</jbi:provides>
<!-- Consumed project 1 ( test = boolean(/*[local-name()="AddIntegers"]/*[local-name()="equals"]) ) -->
<jbi:consumes
interface-name="iConsumeNsPrefix:EipSplitterInterface"
service-name="iConsumeNsPrefix:EipSplitter"
endpoint-name="EipSplitterEndpoint"
xmlns:iConsumeNsPrefix="http://test.petalslink.com">
<!-- CK specific fields for this consume -->
<petalsCDK:timeout>30000</petalsCDK:timeout>
<petalsCDK:operation xmlns:AnyOperationNameNs="http://test.petalslink.com">AnyOperationNameNs:AnyOperationName</petalsCDK:operation>
<petalsCDK:mep>InOut</petalsCDK:mep>
</jbi:consumes>
</jbi:services>
</jbi:jbi>{code}
h2. SE-EIP Splitter
{code:language=xml|title=jbi.xml}<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<jbi:jbi version="1.0"
xmlns:eip="http://petals.ow2.org/components/eip/version-2"
xmlns:generatedNs="http://test.petalslink.com"
xmlns:jbi="http://java.sun.com/xml/ns/jbi"
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:EipSplitterInterface"
service-name="generatedNs:EipSplitter"
endpoint-name="EipSplitterEndpoint">
<!-- CDK specific elements -->
<petalsCDK:timeout>30000</petalsCDK:timeout>
<petalsCDK:validate-wsdl>false</petalsCDK:validate-wsdl>
<petalsCDK:forward-security-subject>false</petalsCDK:forward-security-subject>
<petalsCDK:forward-message-properties>false</petalsCDK:forward-message-properties>
<petalsCDK:forward-attachments>false</petalsCDK:forward-attachments>
<petalsCDK:wsdl xsi:nil="true" />
<!-- Component specific elements -->
<eip:eip>splitter</eip:eip>
<eip:test>//*[local-name()="AddIntegers"]</eip:test>
<eip:fault-robust>false</eip:fault-robust>
<eip:exception-robust>false</eip:exception-robust>
<eip:attachment-mode>false</eip:attachment-mode>
</jbi:provides>
<!-- Consumed project 1 ( test = //*[local-name()="AddIntegers"] ) -->
<jbi:consumes
interface-name="iConsumeNsPrefix:MyMathOperations"
service-name="iConsumeNsPrefix:MyMathOperations"
endpoint-name="MyMathOperationsPort"
xmlns:iConsumeNsPrefix="http://com.ebmwebsourcing.test">
<!-- CK specific fields for this consume -->
<petalsCDK:timeout>30000</petalsCDK:timeout>
<petalsCDK:operation xmlns:AddIntegersNs="http://test.petalslink.com">AddIntegersNs:AddIntegers</petalsCDK:operation>
<petalsCDK:mep>InOut</petalsCDK:mep>
</jbi:consumes>
</jbi:services>
</jbi:jbi>{code}
h2. Assembling both SU (Service Unit) in one SA (Service Assembly)
Just to assemble su-EIP-EipAggregator-provide and su-EIP-EipSplitter-provide in one service assembly, sa-Eip-AggregatorSplitter
{code:language=xml|title=jbi.xml|collapse=true|theme=Default}
<?xml version="1.0" encoding="UTF-8"?>
<jbi:jbi version="1.0" xmlns="http://java.sun.com/xml/ns/jbi"
xmlns:jbi="http://java.sun.com/xml/ns/jbi">
<jbi:service-assembly>
<jbi:identification>
<jbi:name>sa-EIP-AggregatorSplitter</jbi:name>
<jbi:description></jbi:description>
</jbi:identification>
<jbi:service-unit>
<jbi:identification>
<jbi:name>su-EIP-EipAggregator-provide</jbi:name>
<jbi:description></jbi:description>
</jbi:identification>
<jbi:target>
<jbi:artifacts-zip>
su-EIP-EipAggregator-provide.zip
</jbi:artifacts-zip>
<jbi:component-name>petals-se-eip</jbi:component-name>
</jbi:target>
</jbi:service-unit>
<jbi:service-unit>
<jbi:identification>
<jbi:name>su-EIP-EipSplitter-provide</jbi:name>
<jbi:description></jbi:description>
</jbi:identification>
<jbi:target>
<jbi:artifacts-zip>
su-EIP-EipSplitter-provide.zip
</jbi:artifacts-zip>
<jbi:component-name>petals-se-eip</jbi:component-name>
</jbi:target>
</jbi:service-unit>
</jbi:service-assembly>
</jbi:jbi>
{code}
h1. Configuring SE-EIP: Aggregator and Splitter patterns
h2. SE-EIP Aggregator
{code:language=xml|title=jbi.xml}<?xml version="1.0" encoding="UTF-8"?>
<jbi:jbi version="1.0"
xmlns:eip="http://petals.ow2.org/components/eip/version-2"
xmlns:generatedNs="http://test.petalslink.com"
xmlns:jbi="http://java.sun.com/xml/ns/jbi"
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:EipAggregatorInterface"
service-name="generatedNs:EipAggregator"
endpoint-name="EipAggregatorEndpoint">
<!-- CDK specific elements -->
<petalsCDK:timeout>30000</petalsCDK:timeout>
<petalsCDK:validate-wsdl>false</petalsCDK:validate-wsdl>
<petalsCDK:forward-security-subject>false</petalsCDK:forward-security-subject>
<petalsCDK:forward-message-properties>false</petalsCDK:forward-message-properties>
<petalsCDK:forward-attachments>false</petalsCDK:forward-attachments>
<petalsCDK:wsdl xsi:nil="true" />
<!-- Component specific elements -->
<eip:eip>aggregator</eip:eip>
<eip:test>boolean(/*[local-name()="AddIntegers"]/*[local-name()="equals"])</eip:test>
<eip:aggregator-correlation>boolean(/*[local-name()="AddIntegers"])</eip:aggregator-correlation>
<eip:fault-robust>false</eip:fault-robust>
<eip:exception-robust>false</eip:exception-robust>
<eip:attachment-mode>false</eip:attachment-mode>
</jbi:provides>
<!-- Consumed project 1 ( test = boolean(/*[local-name()="AddIntegers"]/*[local-name()="equals"]) ) -->
<jbi:consumes
interface-name="iConsumeNsPrefix:EipSplitterInterface"
service-name="iConsumeNsPrefix:EipSplitter"
endpoint-name="EipSplitterEndpoint"
xmlns:iConsumeNsPrefix="http://test.petalslink.com">
<!-- CK specific fields for this consume -->
<petalsCDK:timeout>30000</petalsCDK:timeout>
<petalsCDK:operation xmlns:AnyOperationNameNs="http://test.petalslink.com">AnyOperationNameNs:AnyOperationName</petalsCDK:operation>
<petalsCDK:mep>InOut</petalsCDK:mep>
</jbi:consumes>
</jbi:services>
</jbi:jbi>{code}
h2. SE-EIP Splitter
{code:language=xml|title=jbi.xml}<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<jbi:jbi version="1.0"
xmlns:eip="http://petals.ow2.org/components/eip/version-2"
xmlns:generatedNs="http://test.petalslink.com"
xmlns:jbi="http://java.sun.com/xml/ns/jbi"
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:EipSplitterInterface"
service-name="generatedNs:EipSplitter"
endpoint-name="EipSplitterEndpoint">
<!-- CDK specific elements -->
<petalsCDK:timeout>30000</petalsCDK:timeout>
<petalsCDK:validate-wsdl>false</petalsCDK:validate-wsdl>
<petalsCDK:forward-security-subject>false</petalsCDK:forward-security-subject>
<petalsCDK:forward-message-properties>false</petalsCDK:forward-message-properties>
<petalsCDK:forward-attachments>false</petalsCDK:forward-attachments>
<petalsCDK:wsdl xsi:nil="true" />
<!-- Component specific elements -->
<eip:eip>splitter</eip:eip>
<eip:test>//*[local-name()="AddIntegers"]</eip:test>
<eip:fault-robust>false</eip:fault-robust>
<eip:exception-robust>false</eip:exception-robust>
<eip:attachment-mode>false</eip:attachment-mode>
</jbi:provides>
<!-- Consumed project 1 ( test = //*[local-name()="AddIntegers"] ) -->
<jbi:consumes
interface-name="iConsumeNsPrefix:MyMathOperations"
service-name="iConsumeNsPrefix:MyMathOperations"
endpoint-name="MyMathOperationsPort"
xmlns:iConsumeNsPrefix="http://com.ebmwebsourcing.test">
<!-- CK specific fields for this consume -->
<petalsCDK:timeout>30000</petalsCDK:timeout>
<petalsCDK:operation xmlns:AddIntegersNs="http://test.petalslink.com">AddIntegersNs:AddIntegers</petalsCDK:operation>
<petalsCDK:mep>InOut</petalsCDK:mep>
</jbi:consumes>
</jbi:services>
</jbi:jbi>{code}
h2. Assembling both SU (Service Unit) in one SA (Service Assembly)
Just to assemble su-EIP-EipAggregator-provide and su-EIP-EipSplitter-provide in one service assembly, sa-Eip-AggregatorSplitter
{code:language=xml|title=jbi.xml|collapse=true|theme=Default}
<?xml version="1.0" encoding="UTF-8"?>
<jbi:jbi version="1.0" xmlns="http://java.sun.com/xml/ns/jbi"
xmlns:jbi="http://java.sun.com/xml/ns/jbi">
<jbi:service-assembly>
<jbi:identification>
<jbi:name>sa-EIP-AggregatorSplitter</jbi:name>
<jbi:description></jbi:description>
</jbi:identification>
<jbi:service-unit>
<jbi:identification>
<jbi:name>su-EIP-EipAggregator-provide</jbi:name>
<jbi:description></jbi:description>
</jbi:identification>
<jbi:target>
<jbi:artifacts-zip>
su-EIP-EipAggregator-provide.zip
</jbi:artifacts-zip>
<jbi:component-name>petals-se-eip</jbi:component-name>
</jbi:target>
</jbi:service-unit>
<jbi:service-unit>
<jbi:identification>
<jbi:name>su-EIP-EipSplitter-provide</jbi:name>
<jbi:description></jbi:description>
</jbi:identification>
<jbi:target>
<jbi:artifacts-zip>
su-EIP-EipSplitter-provide.zip
</jbi:artifacts-zip>
<jbi:component-name>petals-se-eip</jbi:component-name>
</jbi:target>
</jbi:service-unit>
</jbi:service-assembly>
</jbi:jbi>
{code}
h1. Running the use case
To test this use case, you need to deploy the Petals-SE-EIP
To test this use case, you need to deploy the Petals-SE-EIP, Petals-SE-RMI, Petals-SE-JSR181 and run the webconsole.
Deploy the SA containing the SU su-jsr181-MathOperations-provide. Deploy the SA sa-Eip-AggregatorSplitter.
Then we can send test messages from the webconsole. For example, we will send three messages, with InOut MEP (message exchange pattern), and then send the trigger message.
{code:language=xml|title=Message 1|theme=Default}
<AddIntegers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<integer1>1</integer1>
<integer2>2</integer2>
</AddIntegers>
{code}
When everything is fine, you get this response, just saying the message was buffered :
{code:language=xml|title=Response message|theme=Default}
<result xmlns="http://petals.ow2.org/petals-se-eip/aggregator">Aggregator: the content is buffered by the pattern</result>
{code}
We can continue to bufferize messages...
{code:language=xml|title=Message 2|theme=Default}
<AddIntegers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<integer1>3</integer1>
<integer2>4</integer2>
</AddIntegers>
{code}
{code:language=xml|title=Message 3|theme=Default}
<AddIntegers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<integer1>5</integer1>
<integer2>6</integer2>
</AddIntegers>
{code}
Let us send the trigger message :
{code:language=xml|title=Message 4 - Trigger|theme=Default}
<AddIntegers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<equals/>
</AddIntegers>
{code}
Now all messages are processed by MathOperations :
{code:language=xml|title=Response message|theme=Default}
<result xmlns="http://petals.ow2.org/petals-se-eip/splitter">
<dlwmin:AddIntegersResponse xmlns:dlwmin="http://com.ebmwebsourcing.test" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<returnMessage xmlns="">3</returnMessage>
</dlwmin:AddIntegersResponse>
<dlwmin:AddIntegersResponse xmlns:dlwmin="http://com.ebmwebsourcing.test" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<returnMessage xmlns="">7</returnMessage>
</dlwmin:AddIntegersResponse>
<dlwmin:AddIntegersResponse xmlns:dlwmin="http://com.ebmwebsourcing.test" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<returnMessage xmlns="">11</returnMessage>
</dlwmin:AddIntegersResponse>
</result>
{code}
Deploy the SA containing the SU su-jsr181-MathOperations-provide. Deploy the SA sa-Eip-AggregatorSplitter.
Then we can send test messages from the webconsole. For example, we will send three messages, with InOut MEP (message exchange pattern), and then send the trigger message.
{code:language=xml|title=Message 1|theme=Default}
<AddIntegers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<integer1>1</integer1>
<integer2>2</integer2>
</AddIntegers>
{code}
When everything is fine, you get this response, just saying the message was buffered :
{code:language=xml|title=Response message|theme=Default}
<result xmlns="http://petals.ow2.org/petals-se-eip/aggregator">Aggregator: the content is buffered by the pattern</result>
{code}
We can continue to bufferize messages...
{code:language=xml|title=Message 2|theme=Default}
<AddIntegers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<integer1>3</integer1>
<integer2>4</integer2>
</AddIntegers>
{code}
{code:language=xml|title=Message 3|theme=Default}
<AddIntegers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<integer1>5</integer1>
<integer2>6</integer2>
</AddIntegers>
{code}
Let us send the trigger message :
{code:language=xml|title=Message 4 - Trigger|theme=Default}
<AddIntegers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<equals/>
</AddIntegers>
{code}
Now all messages are processed by MathOperations :
{code:language=xml|title=Response message|theme=Default}
<result xmlns="http://petals.ow2.org/petals-se-eip/splitter">
<dlwmin:AddIntegersResponse xmlns:dlwmin="http://com.ebmwebsourcing.test" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<returnMessage xmlns="">3</returnMessage>
</dlwmin:AddIntegersResponse>
<dlwmin:AddIntegersResponse xmlns:dlwmin="http://com.ebmwebsourcing.test" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<returnMessage xmlns="">7</returnMessage>
</dlwmin:AddIntegersResponse>
<dlwmin:AddIntegersResponse xmlns:dlwmin="http://com.ebmwebsourcing.test" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<returnMessage xmlns="">11</returnMessage>
</dlwmin:AddIntegersResponse>
</result>
{code}