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 application

The following section provides a description on how to create an example application that uses the interfaces defined for the example WESPA module prepared in Creating an example WESPA module:

The application 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 SESPA Service Capability as described in Creating an example SESPA module.

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

 


Preparing the application

  1. Open the file exampleproj\client_impl\build.xml.
  2. Edit the location of the MyServiceCapability.wsdl and MyServiceCapabilityListener.wsdl files. Change the properties myScWsdl and myScListenerWsdl.
  3. Edit the location of the MyServiceCapabilityNetworkTriggeredEventListener.wsdl file. Change the property myScNetworkTriggeredEventListenerWsdl.
  4. Edit mapping namespaces for the WSDL generation. Change the namespace mapping properties if there have been any changes to classnames or package structure.
  5. Edit the location of the deployment descriptor, in the replaceregexp tag, for the application's web service if there have been any changes to classnames or package structure.

Adapt the application to use the example WESPA module interfaces

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

 


Compilation of the test application

Prior to this, the WESPA module must have been built.

  1. Compile the application by changing directory to exampleproj\client_impl and execute the command ant

 


Running the application

This section describes how to prepare the start script, register the application in Network Gatekeeper and how to set up the Service Level Agreement.

Prepare start script

  1. Open the file exampleproj\client_impl\runMe.bat and edit the HOST variable to fit the port that Network Gatekeeper listens to.
  2. Edit the URL for the Web Service for the new service capability. Change:
  3. http://%HOST%/wespa_myservicecapability/services/MyServiceCapability

    To reflect any changes done in the deployment descriptor for the WESPA module.

    The URL must be according to where the WESPA module was deployed, see Installing the WESPA service capability module.

Register application data

The application has a text based interface through which the login is performed. The following login data has to be registered in the Network Gatekeeper before the application can log in:

For information on how to perform the actual application registration, see WebLogic Network Gatekeeper User's Guide.

Both the service provider and application level SLAs must allow the application to use the ESPA_example_sc created in Creating an example ESPA Service Capability module.

Run the application

  1. Execute the start script exampleproj\client_impl\runMe.bat
  2. In the application, make sure that the application is configured to use the Access Web Service and the Web Service exposed by the WESPA SC module.

Make sure that the network simulator application is started and configured as described in Creating an example network simulator.

Print the configuration to make sure the server and login information is set up correctly, otherwise configure login information and server details.

Perform a login.

Use menu option 5. Start MySc test, synchronous mode to send an application initiated synchronous request to the WESPA SC.

Use menu option 6. Start MySc test, asynchronous mode to send an application initiated asynchronous request to the WESPA SC.

Provide an assignment ID that will be provided to the WESPA SC. The destination address and the payload data are automatically provided by the test application.

In both the synchronous and the asynchronous call the test application will output the outcome of the request.

The payload data, together with the destination address and the transaction ID is propagated through the modules and delivered to the network simulator which returns a reply. If there is an error the application will printout an error message. A network transaction ID provided by the network simulator is returned.

When an application performs an application triggered request, data about the request is printed in the console of the network simulator.

In order for the application to receive network triggered notifications, it must enable notifications for a specific address.

Use menu option 7. Enable network triggered events to enable the notifications.

An listener ID is returned. Use this ID when disabling network triggered events.

Use menu option 8. Disable network triggered events to enable the notifications.

See Creating an example network simulator for information on how to build and run the network simulator application.

 

Skip navigation bar  Back to Top Previous Next