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. Create a WS-N topic

To create a WS-N topic, you need to deploy a service unit with a specific address format :
todo {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:TopicInterface"
service-name="sample:TopicService"
endpoint-name="TopicEndpoint">

<!-- SOAP specific fields -->
<soap:address>TopicSample</soap:address>
<soap:mode>TOPIC</soap:mode> 1
...
</jbi:provides>
</jbi:services>
</jbi:jbi>
{code}
# With the TOPIC mode, the topic specified in the address parameter will be created during Service Unit startup.

After deployment, a new JBI endpoint is available : TopicEndpoint. Each JBI message sent to this endpoint will be published on the topic. A WS-N producer is automatically created. It is in charge of handle the topic and send notification messages to all subscribers.

{note:title=Note}
The topics are persisted by the component since the release 3.1 so that all the required data is reloaded on restart.
{note}

h2. Subscribe to WS-N producer