Skip Headers
Oracle® Communications Network Integrity UIM Sample Web Service Guide
Release 7.1

E23708-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

11 About Client Connection to UIM

This chapter provides information on client connections to the Unified Inventory Management (UIM) for the Network Integrity UIM Sample Web Service.

Example 11-1 shows a fragment of code that a client can use to connect to UIM.

Example 11-1 Client UIM Connection Code

String userId = dis.getUsername();
String passWd = dis.getPassword();
if (userId == null || passWd == null) {
        logger.warning("Configuration error: Username/Password values are required for UIM Inventory System.");
        throw new ProcessorException(
                        "Configuration error: Username/Password values are required for UIM Inventory System.");
}
 
try {
        logger.finest("invoke new NI_Uim_Impl");
 
        NI_Uim service = new NI_Uim_Impl();
        if (service == null) {
                logger.severe("UIM Web Service initialization error: NI_Uim == null");
                throw new ProcessorException("UIM Web Service initialization error: NI_Uim == null");
        }
 
        logger.finest("invoke service.getNI_UimHTTPPort");
 
        NI_UimPort port = service.getNI_UimHTTPPort(userId.getBytes(), passWd.getBytes());
        if (port == null) {
                logger.severe("UIM Web Service initialization error: NI_UimPort == null");
                throw new ProcessorException("UIM Web Service initialization error: NI_UimPort == null");
        }
 
        logger.finer("UIM WS Endpoint = " + dis.getAddress());
        logger.finest("Setting endpoint on the WS port.");
        Stub stub = (Stub) port;
        stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, dis.getAddress());
 
        // Success. Save the connection objects.
        //
        uim_service = service;
        uim_port = port;
}

When uim_port is established, the Web service calls are available through uim_port.

Note:

For the full source code for this fragment, view oracle.communications.integrity.mibiiuimcartridge.resolutionprocessors.resolutionframeworkinitializer.uimWebService.