Versions Compared

Key

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

Table of Contents

This samples demonstrates

  • How to enable a Metadata Exchange (MEX) request for an arbitrary service.
  • How to use MEXClient to retrieve metadata from a service that supports MEX requests.
  • How to write your own data retrievers to configure the metadata of your service.

Building the

...

sample

...

The steps are as follows:

...

2. In a command prompt, switch to the sample directory:

...

The MEX sample is located in  <AS_HOME>\samplesSamples\MEX directory.

3. From there, type ant For more information, see Building Axis2 Samples.

Configuring Services

To enable MEX request support for samples services, follow these steps:1.

  1. Login to Application Server Management Console

...

  1. .
  2. On the Main menu, under services, click List.
    The Deployed Services page will appear.
  3. Click on the HelloWorldService1 link.
    The service's Dashboard will appear.

...

  1. Click on the Module Configurations link in the

...

  1. Quality of Services

...

  1. panel of the service dashboard.

...

  1. Select wso2mex from the drop down list

...

  1. .

...

  1. Click Engage.
  2. An alert box would be displayed if the module is engaged successfully.

Running the Client

...

  1. Switch to <AS_HOME>/samples/MEX directory.

...

  1. Execute one of the following commands to run the client:

    OSCommand
    On Windows
    run-client.bat

...

  1. On Linux/Solaris
    sh run-client.sh

...

...

  1. Enter the URL of the target service. You will be prompted for the URL of the service, from which you wish to retrieve metadata.
    For example: 

    Panel

    Please enter the service URL: http://localhost:9763/services/HelloWorldService1

  2. Choose the type of metadata you wish to retrieve.
    For example, if you wish to retrieve XML Schema documents you need to type 1 and press enter when the following is prompted.

    Code Block
    Choose type of Metadata
        [1] XML Schema
        [1] WSDL
        [3] WS-Policy
        1
    

...

  1. Specify the Identifier.
    This is optional. You can skip it by just pressing

...

  1. Enter.

...

  1. The results will be printed on the Console.