beautypg.com

Example - writing a client – Nortel Networks AS 5300 User Manual

Page 44

background image

44

Creating Open Provisioning Interface clients

2

Instantiate a URL object that will point to the Provisioning Server
location and the OPI web service running on it.

3

Invoke the

getOPI

call on the

OPIServiceLocator

instance

with the URL.

This action will result in an instance of the OPI object, which can
be used to make OPI provisioning method calls.

4

Set the authentication information on the OPI object.

Perform this action by downcasting the OPI object as a

org.apache.axis.client.Stub

object.

5

Set the OPI Client Version number in a SOAP Header.

This is used by the Provisioning Server to determine the version
of the provisioning client and return data that the Provisioning
Client can understand.

6

Make the OPI provisioning method call (for example,

getUser

)

by invoking the same on the OPI instance.

The arguments to this provisioning method are the data objects
generated during the stub generation process. For example, for
the

addUser

method, pass in the

domainName

and the

User

object, which is populated with the user data.

--End--

Example - Writing a client

The following figure shows an example of writing a client. In the example,
the class is placed under

D:\opiclient

.

Nortel AS 5300

Nortel Application Server 5300 Application Programming Interfaces Reference

NN42040-110

01.01

Standard

11 June 2008

Copyright © 2008 Nortel Networks

.