Petals-BC-SOAP

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

Changes (4)

View Page History
h2. Send a JBI message to an external Web Service

todo
The petals-bc-soap component can expose an external Web Service as a JBI ServiceEndpoint. This is done by deploying a Service Unit on it :

{center}
!soap_provide.png!
*Provides an external Web Service as a JBI service*
{center}

When a message is received on a SOAP linked endpoint from the JBI environment, it is transformed into a SOAP message and sent to the Web Service. The address of the Web Service to send the SOAP message to is defined in the address extension of the deployed Service Unit.

\\
The SOAP message is created like this :
* The JBI message payload is wrapped in the SOAP body
* The JBI message attachments are used to create SOAP ones
* The JBI message exchange operation is used to create the SOAP action
* The JBI MEP is used to determine the SOAP MEP

\\
The external Web Service is called and the SOAP response is processed and returned to the JBI environment.

h3. Service Unit descriptor

The Service Unit descriptor file ({{jbi.xml}}) looks like this :
{code:lang=xml}
<?xml version="1.0" encoding="UTF-8"?>
<jbi:jbi version="1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jbi="http://java.sun.com/xml/ns/jbi"
xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-4.0"
xmlns:soap="http://petals.ow2.org/components/soap/version-3.1"
xmlns:sample="http://petals.ow2.org/soap/sample">
<!-- Import a Service into PEtALS or Expose a PEtALS Service => use a BC. -->
<jbi:services binding-component="true">
<!-- Import a Service into PEtALS => provides a Service. -->
<jbi:provides
interface-name="sample:SoapInterface"
service-name="sample:SoapInterface"
endpoint-name="SoapInterfaceEndpoint">

<!-- CDK specific fields -->
<petalsCDK:wsdl>http://example.org/service/SampleWebService?wsdl</petalsCDK:wsdl>

<!-- SOAP specific fields -->
<soap:address>http://example.org/service/SampleWebService</soap:address>
<soap:soap-version>1.1</soap:soap-version>
<soap:add-root>false</soap:add-root>
<soap:chunked-mode>false</soap:chunked-mode>
<soap:cleanup-transport>true</soap:cleanup-transport>
<soap:mode>SOAP</soap:mode>
</jbi:provides>
</jbi:services>
</jbi:jbi>
{code}

todo