Sun Java System Application Server Enterprise Edition 8.2 Developer's Guide

ProcedureTo Run the Sample Application

  1. Make sure that the Application Server is running.

    Message security providers are set up when the asant targets are run, so you don’t need to configure these on the Application Server prior to running this example.

  2. If you are not running HTTP on the default port of 8080, change the WSDL file for the example to reflect the change, and change the file to reflect the change as well.

    The WSDL file for this example is located at install-dir/samples/webservices/security/ejb/apps/xms/xms-ejb/src/conf/HelloWorld.wsdl. The port number is in the following section:

    <service name="HelloWorld">
      <port name="HelloIFPort" binding="tns:HelloIFBinding">
        <soap:address location="http://localhost:8080/service/HelloWorld"/>

    Verify that the properties in the install-dir/samples/ file are set properly for your installation and environment. If you need more description of this file, refer to the Configuration section for the web services security applications at install-dir/samples/webservices/security/docs/common.html#Logging.

  3. Change to the install-dir/samples/webservices/security/ejb/apps/xms/ directory.

  4. Run the following asant targets to compile, deploy, and run the example application:

    1. To compile samples:


    2. To deploy samples:

      asant deploy

    3. To run samples:

      asant run

    If the sample has compiled and deployed properly, you see the following response on your screen after the application has run:

    run:[echo] Running the xms program:[exec] Established message level security : Hello Duke!

  5. To undeploy the sample, run the following asant target:

    asant undeploy

    All of the web services security examples use the same web service name (HelloWorld) and web service ports in order to show only the differences necessary for protecting web services using various mechanisms. Make sure to undeploy an application when you have completed running it, or you receive an Already in Use error and deployment failures when you try to deploy another web services example application.