Skip Headers
Oracle® Communications Network Integrity UIM Integration Cartridge Guide
Release 7.2.2

Part Number E35810-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

8 About Client Connection to UIM

This chapter provides information about client connections to Oracle Communications Unified Inventory Management (UIM) for the UIM Sample Web service.

UIM Connection Client Example

Example 8-1 shows the code that you can use to connect to UIM.

Example 8-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.