Axis2 Web Service Client Generation Scenarios

  1. Create Web service client with Axis runtime using the URLs:

    In all scenarios below, move the slider to the start setting. Do not generate the JUnit tests unless instructed.

  2. Part 1: Creating the Web Service client with different port name.

    Workspace set-up, and launching the axis2 client wizard pointing to the wsdl.

    select the HTTP port and generate the web service client.

    Test the client against the web service by copying the xxxClient.java file to the package with the other generated client files. Run the xxxClient.java file as a Java application. CurrencyConverterClient

    Repeat the test for SOAP11 and SOAP12 ports.

  3. Part 2: Creating the Web Service client with custom package name.

    Workspace set-up, and launching the axis2 client wizard pointing to the wsdl.

    set a custom package mapping and generate the web service client, so the generated client must adhere the custom package.

    Test the client against the web service by copying the xxxClient.java file to the package with the other generated client files. Run the xxxClient.java file as a Java application. StockQuoteServiceClient

  4. Part 3: Creating the Web Service client with different modes.

    In previous tests, we generated both sync and async style web service clients. In this test, we will test the asynchronous and synchronous clients separately against the web service.

    Workspace set-up, and launching the axis2 client wizard pointing to the wsdl.

    At the configuration page, select generate sync only and generate the web service client. Here the stubs will be generated to match the case where it will be having support for synchronous clients.

    Test the synchronous client against the web service by copying the xxxClient.java file to the package with the other generated client files. Run the xxxClient.java file as a Java application. StockQuoteServiceSyncClient

    Repeat the test, but select generate async only and use the xxxClient.java from the following zip: StockQuoteServiceAsyncClient

    Reference : http://ws.apache.org/axis2/1_2/adv-userguide.html#client

  5. Part 4: Creating the Web Service client with junit testcase.

    Workspace set-up, and launching the axis2 client wizard pointing to the wsdl.

    Select generate testcase option in configuration page and generate the web service client.

    Replace the generated CurrencyConvertorTest.java file with the one in this zip: CurrancyConverterJUnitTest

    Run CurrencyConvertorTest.java as a JUnit test.

  6. Part 5: Creating the Web Service client with generate all types.

    Workspace set-up, and launching the axis2 client wizard pointing to the wsdl AreaServiceExtraTypes.wsdl.

    In the client, select the "Generate all types for all elements referred by schemas" option. Click Finish.

    Verify that the NewXSDComplexType.java file is generated under the source folder.

  7. Part 6: Creating the Web Service client with different namespace to package mappings.

    Workspace set-up, and launching the axis2 client wizard pointing to the wsdl.

    Edit namespace to package mappings to user preferences and generate the web service client.

    Test the client against the web service by copying the xxxClient.java file to the package with the other generated client files. Run the xxxClient.java file as a Java application. StockQuoteServiceClient

  8. Also the any combination of Part 1 to Part 6 can be tested together in a single invocation.