Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Now save all the files and start the App Server by running <AS_HOME>/bin/wso2server.sh (on Linux) or <AS_HOME>/bin/wso2server.bat (on Windows).

...

Use Case: A sample web service

...

in WSO2 AS subscribes to WSO2 Message Broker

This section describes, through a usecase, how to integrate WSO2 Message Broker using a WSO2 AS web service as the JMS subscriber.

Usecase

Deploy use case demonstrates how a web service deployed in WSO2 AS can work as a JMS subscriber for WSO2 MB. In this use case, you will be deploying a sample web service in App Server which listens on SOAP messages and prints message string into console. A JMS queue with the name of this service will be generated in the Message Broker. Publish a message to this queue and it will be received and printed into the App Server console by the sample web service.
1. strings into the console.

  1. Log into App Server

...

  1. .
  2. Go to Home --> Manager --> Services --> Add --> AAR Service

...

  1.  and upload SimpleEventSinkService.aar archive file, which can be downloaded from here. A JMS queue with the name of this service will be generated in the Message Broker.
  2. Log in to Message Broker and publish a text message into the created SimpleEventSinkService queue using the message sender UI.

    Code Block
    languagehtml/xml
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://services.samples">
       <soapenv:Header/>
       <soapenv:Body>
          <ser:receive>
             <!--Optional:-->
             <ser:message>Test Message</ser:message>
          </ser:receive>
       </soapenv:Body>
    </soapenv:Envelope>

...

  1. Go to the App Server terminal and the published message will

...

  1. display in the console as

...

  1. 'Got the message ==> Test Message'.