This is archived documentation for an older version of Nirvana (v3.1). Please refer to documentation for the latest version if required.

Nirvana Enterprise Manager - SOAP Plugin

Introduction

The Nirvana SOAP Plugin utilises the advanced HTTP/HTTPS stack capabilities of the Nirvana server to provide an implementation of a SOAP 1.2 based client API. Any SOAP toolkit can use the provided WSDL to generate client stubs for any SOAP compliant language. This way Nirvana functionality is offered to programming languages that were previously unsupported and all this without the need for any additional infrastructure component (SOAP server, web server etc).

The plugin can be configured to expose complete Nirvana namespaces or subsets, support username/password authentication, control web service listing and other options further explained in the section below.

Configuration

Once you have created the SOAP plugin on the interface you require it on, you can then select it from the plugins panel for the selected interface and enter values as you wish for the configuration parameters.

The SOAP plugin requires configuration details regarding the entry point in the namespace for the channels you wish to make avilable to vend to the clients, as well as web-services specific configuration. Below is a table that shows each configuration parameter and describes what it is used for.

Parameter Name

Description

Default Value

URL File Path The mount URL path for the SOAP plugin to be invoked. None (/soap needed for samples)
ChannelRoot Nirvana namespace node (channel or folder) to expose through soap /
UserFile Name of the file containing the usernames and passwords None.

Security Realm

Name of the authentication realm

None.

AttachmentDir Name of the directory to find the AXIS attachments <ServerPath>/plugins/attachments/
EnableList Enable or disable the listing of web services wsdl files. This is necessary if you want to generate client stubs. false.
WebRootDir Name of the file containing the usernames and passwords <ServerPath>/plugins/
WSDLEncoding Type of encoding to be used for WSDL, valid values are document, rpc, wrapped rpc

Once you have completed setting up your SOAP plugin, you can verify it works by opening a browser to the NHP interface in the mount URL path. For example for an NHP interface running on port 80 on localhost and having the plugin mounted on /soap, open a browser to http://localhost/soap/ and you should see something like:

Nirvana Supported Services

urn:nirvanasRealm (wsdl)
getRealmName
getStatus
getChannelDetails
getChannelCount

urn:nirvanasChannel (wsdl)
getLastEID
publish
getEvents
getEventCount

The image below shows the enterprise manager interface panel with an nhp interface running on port 80. This interface has a SOAP Plugin configured with it's URL path as /soap. The default ChannelRoot setting is /, which is the root of the namespace, i.e. all channels. Once the plugin is created, you can hit the apply button which will restart the interface and enable the new SOAP plugin.

Samples

The Nirvana installation includes a few samples for perl src/soap directory. The applications use the SOAP::Lite Perl module and were tested under cygwin for windows. Please note that all the samples included assume that you have an NHP interface running on port 80 on the local machine and having a SOAP plugin configured under /soap. Furthermore the getEvent.pl sample requires you to have a channel called test with at least 1 event inside.

For example to execute getChannelDetails.pl, open a cygwin (or other) shell and type:

$ perl getChannelDetails.pl
---------------------------------
firstEid=-1
ttl=0
name=Nirvana-p2p/serviceinfo
eventCount=0
type=Simple
capacity=0
lastEid=-1
---------------------------------
firstEid=0
ttl=0
name=test
eventCount=10
type=Reliable
capacity=0
lastEid=9