Skip navigation.

Extension SDK for BEA WebLogic Network Gatekeeper

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents View as PDF   Get Adobe Reader

Creating an example WESPA module

The following section provides a description on how to create an example WESPA module:

The example WESPA module will use the interfaces defined for the example SESPA service capability module prepared in Creating an example SESPA module. The WESPA module will have the following properties:

 


General preparations

This is general preparations. Do not perform these two steps if they already have been performed when creating the plug-in, ESPA service capability, or SESPA module in the previous chapters.

  1. Make sure the files for the WESPA Module and the WESPA interfaces are copied to the directory exampleproj. That is, all files and directories in module_templates\wespa_sc_impl and module_templates\wespa_sc_if.
  2. Change directory to bea\wlng21\esdk\build and issue the command ant

 


Preparing the WESPA service capability interface

Build environment

  1. Edit the file exampleproj\wespa_sc_if\build.xml.
  2. Edit the properties described in Adapting the build files for the modules on page 15-40 to reflect the desired names.
  3. Edit the Java to WSDL mapping. In all <axis-java2wsdl> tags, adapt the names, and locations of the WSDL files to be generated, package names of the implementing classes, and the namespace to use.

WESPA service capability module interface structure

  1. Rename the directories to reflect the desired package structure. Also change the package definitions accordingly.

WESPA service capability module interfaces

  1. Add any additional methods to be used in the interface between an application and the WESPA module. Use the method definitions in MyServiceCapability.java, MyServiceCapabilityListener.java and MyServiceCapabilityNetworkTriggeredEventListener.java as templates.
  2. In the template file, the method myMethod is an example of how to define an asynchronous method invoked by the WESPA module on the SESPA module and myMethodWait is an example of a synchronous method.

    There are dummy implementations of the interfaces, MyServiceCapability_dummy.java and MyServiceCapabilityListener_dummy.java. Adapt the dummy implementations to the interface definitions.

    An assignmentID is given when invoking the method myMethod. The ID connects an invocation to myMethod and the corresponding invocation of myMethodResult or myMethodError.

 


WESPA service capability module interface compilation

  1. Compile the WESPA module interface by changing directory to
    exampleproj\wespa_sc_if and execute the command ant

 


Preparing the WESPA service capability module implementation

Set up the build environment

  1. Edit the file exampleproj\wespa_sc_impl\build.xml.
  2. Edit the properties described in Adapting the build files for the modules on page 15-40 reflect the desired names.
  3. Edit the war-file name. Change the property local.warName to the name of the war file to be deployed in Tomcat.

WESPA service capability module structure

  1. Rename the directories to reflect the desired package structure. Also change the package definitions accordingly.

SESPA service capability listener implementation

The listener interface implementation has to be updated so it implements the SESPA service capability module listener interface as defined in SESPA service capability module interfaces.

  1. Open the file MyServiceCapabilityListenerImpl.java in exampleproj\wespa_sc_impl\src\com\acompany\wespa\mysctype.
  2. Open the file MyServiceCapabilityListenerImpl.java in exampleproj\wespa_sc_impl\src\com\acompany\wespa\mysctype.
  3. Adapt the import statement for the SESPA Service Capability interface if there has been any changes.
  4. Adapt the name of the class that the implements the listener, if necessary.

WESPA service capability SOAP binding implementation

The interface has to be updated so it implements the MyServiceCapability interface as defined in WESPA service capability module interfaces.

  1. Open the file MyServiceCapabilitySoapBindingImpl.java in exampleproj\wespa_sc_impl\src\com\acompany\wespa\mysctype.
  2. Adapt the import statement for the SESPA Service Capability interface if there has been any changes.
  3. The nameLookUp() method must be adapted to use fetch the SESPA implementation from SLEE Common loader. The lookup i performed by name. The name was given in SESPA service capability module service. The cast from Object obj must also be adapted to any changes in package structures and class names.
  4. Open the file web.xml in wespa_sc_impl\deploy\server
  5. Edit the reference to the servlet implementation. Adapt the classnames and package definitions in the tag <servlet> if necessary.

 


Compilation of the WESPA service capability module implementation

Prior to this, the plug-in interface, SESPA and WESPA module interfaces must have been built.

  1. Compile the WESPA module implementation by changing directory to exampleproj\wespa_sc_impl and perform the command ant

 


Installing the WESPA service capability module

This section describes how to install and deploy the WESPA module that was created using the instructions in this section. For detailed instructions on how to use the Management Tool, see WebLogic Network Gatekeeper User's Guide.

  1. Copy the generated war file to the /<install dir>/slee/bin/autowar directory in the Network Gatekeeper.
  2. Open the Management Tool and select the SLEE running on the server the file was copied to.
  3. In the Embedded_tomcat service, choose addContext. Enter the following parameter data:

    Parameter

    Description

    contextPath

    The context path to be used. For example: /exampleContext

    The Web Service will be reached in the following URL:

    http://<IP-address>:<port>/<contextPath>/services/<method>

    docBase

    Document root. Can be a war-file or a directory. Can be specified with an absolute or a relative path name or an URL. In the example the files are stored in:
    /usr/local/slee/bin/autowar/
    <name of war file>.war

    useCookies

    Enable cookies (TRUE/FALSE) for session handling. Use FALSE.

    autostart

    Start this context during next service restart (TRUE/FALSE). Use TRUE.

  4. Click Invoke.
  5. The WESPA module is started.

 

Skip navigation bar  Back to Top Previous Next