1 Overview
This document provides information that you can use when working with the Oracle Communications MetaSolv Solution (MSS) Enterprise JavaBeans (EJB) application program interfaces (APIs).
About the MSS EJB APIs
This section provides an overview of EBJ APIs. You can use the EJB APIs to reconcile data from third-party applications into MSS.
Working with Connection EJB APIs
The "Working with Connections" chapter provides the set of EJB APIs that are related to connections, such as creating and updating connections, assigning and un-assigning ports, and also provisioning assignments. The following summarizes the APIs:
-
createConnectionsNew EJB API: Creates multiple connections at a time based on the input data. See "Creating Connections (createConnectionsNew)" for more information.
-
associateConnectionToNetworkSystem EJB API: Associates the given connection between two components of a network system or deletes the association between components for multiple connections at a time in a network system. See "Associating/Unassociating Connections (associateConnectionToNetworkSystem)" for more information.
-
autoBuildConnection EJB API: Auto-builds an optical circuit to lower levels based on the input data and hierarchy (service type) structure defined in MSS, including simultaneous auto-build of multiple connections that are a part of network systems. See "Auto-Building Connections (autoBuildConnection)" for more information.
-
assignPort EJB API: Creates new port assignments and removes the existing port assignments for multiple connections at a time. See "Assigning/Unassigning Ports (assignPort)" for more information.
-
createCustomerConnection EJB API: Creates multiple customer connections at a time based on the input data. See "Creating Customer Connections (createCustomerConnection)" for more information.
-
updateProvisioningInfo EJB API: Enables you to provision:
-
Network assignment (optical/SDH provisioning)
-
Facility assignment
-
Equipment assignment
See "Provisioning Assignments for Customer Circuits (updateProvisioningInfo)" for more information.
-
-
createCustomerConnNew EJB API: Creates and provisions multiple customer connections at a time based on the input data. See "Creating and Provisioning Customer Connections (createCustomerConnNew)" for more information.
-
createVirtualConnection EJB API: Creates and provisions customer/non-customer virtual connections based on the input data. See "Creating Virtual Connections (createVirtualConnection)" for more information.
-
provisionVirtualConnection EJB API: Updates the provisioning information for non-channelized or virtual connections. See "Provisioning Virtual Connections (provisionVirtualConnection)" for more information.
-
updateConnection EJB API: Updates multiple connections. Each connection is updated based on the input data. See "Updating Connections (updateConnection)" for more information.
Working with Engineering Work Orders
The "Working with Engineering Work Orders" chapter provides the set of EJB APIs that are related to Engineering Work Orders, creating and updating work orders and their notes, associating connections and equipment to work orders, and also processing due date supplements. The following summarizes the EJB APIs:
-
createWorkOrder EJB API: Creates an Engineering Work Order. The new order is created based on the input data. See "Creating a Work Order (createWorkOrder)" for more information.
-
updateWorkOrder EJB API: Updates an Engineering Work Order. The order is updated based on the input data. See "Updating a Work Order (updateWorkOrder)" for more information.
-
createWorkOrderNote EJB API: Creates a note for an Engineering Work Order. See "Creating a Work Order Note (createWorkOrderNote)" for more information.
-
updateWorkOrderNote EJB API: Updates a note for an Engineering Work Order. See "Updating a Work Order Notes (updateWorkOrderNote)" for more information.
-
associateConnectionToWorkOrder EJB API: Associates a connection to an Engineering Work Order. See "Associating a Connection to a Work Order (associateConnectionToWorkOrder)" for more information.
-
associateEquipmentToWorkOrder EJB API: Associates equipment to an Engineering Work Order. See "Associating Equipment to a Work Order (associateEquipmentToWorkOrder)" for more information.
-
addTask EJB API: Assigns a task to an Engineering Work Order. See "Adding a Task to a Work Order (addTask)" for more information.
-
processDDChangeSupplement EJB API: Processes the supplementing of an Engineering Work Order. See "Supplementing a Work Order (processDDChangeSupplement)" for more information.
Overview of EJB API Content
This document includes the following:
-
Information about each MSS EJB API, which describes API usage patterns for implementing common business scenarios.
-
Examples that show correct usage setting parameters for the APIs.
-
Input information for an API.
-
Output information received from an API, including the following:
-
Data that has reconciled successfully into MSS.
-
Data that failed to reconcile with MSS. In this case, all the validation errors are displayed based on the input provided.
-
-
Working with transactions. A transaction provides information about:
-
Whether or not a specific API participates in the client's transaction
-
How the input data is reconciled by the API
-
Calling an API
This section provides information about the steps that are required to call an API.
Calling an API typically includes:
-
Getting the initial context
-
Looking up the context with the Java Naming and Directory Interface (JNDI) name
-
Calling the specific API on the business interface reference
-
Getting the results from the API output.
-
Getting the error codes/messages from the API.
-
Adding the following JVM options to the JDeveloper client before calling the EJB APIs that are deployed in an SSL environment:
-Dweblogic.security.SSL.ignoreHostnameVerification=true -Dweblogic.security.SSL.trustedCAKeyStore=C:\MSSSSL\trust.jks
Note:
The MSS application implements security for EJB methods. You must add a registered user to the Global Role MSSRole to access the EJB methods externally. See MSS Security Guide for more information.
For each API the parameters are listed and indicate whether each is mandatory or optional. If you do not provide a mandatory parameter, the API fails and returns an error. For all parameters, if you provide a value that does not exist in MSS for a parameter where a valid value or identifier is applicable, the API fails and returns an error message.
Example 1-1 shows the information required to call an API.
Example 1-1 Sample Code for an API Call
// Gets the initial context. // Context.INITIAL_CONTEXT_FACTORY is a constant that holds the initial context // factory to use. // Context.PROVIDER_URL is a constant that holds the information for the service // provider to use. // IP_Address is the IP address of the system where the WebLogic server is // running for MSS. // WebLogic_Domain_Port is the port of the server on which the WebLogic server is // running. // Context.SECURITY_PRINCIPAL is a constant that holds the user name for // authenticating to the service. // Context.SECURITY_CREDENTIALS is a constant that holds the password of the user // for authenticating to the service. Properties h = new Properties(); h.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory"); h.put(Context.PROVIDER_URL, "t3://IP_Address:WebLogic_Domain_Port"); h.put(Context.SECURITY_PRINCIPAL, "LoginId"); h.put(Context.SECURITY_CREDENTIALS, "password"); Context ctx = new InitialContext(h); // Looks up the context with the JNDI name and gets the reference of // ConnectionAccessManagerRemote business interface object. ConnectionAccessManagerRemote remote = (ConnectionAccessManagerRemote) = ctx.lookup("nrm/resource/entity/connection/ConnectionAccessManager"); // Calls the corresponding API on the remote object to import the required // data. // API_CALL can be, for example, createVirtualConnection(Connection[] // conns, User user). remote.API_CALL
// Gets the results from the remote object reference. results.getReturnObject(); // The resultant must be converted to the corresponding object type based on the // calling API. For example: ArrayList keys = (ArrayList)results.getReturnObject(); for (int i = 0; i < keys.size(); i++) { System.out.println(keys.get(i)); } // Gets the error messages from the API. results.getMessages(); // Always returns a vector of the results. For example: Vector errorMessages = (Vector)results.getMessages(); Iterator errorIterator = errorMessages.iterator(); while (errorIterator.hasNext()) { MSLVException mslvExcep = (MSLVException)errorIterator.next(); System.out.println("Error code: "+ mslvExcep.getCode() + ", Error message : " + mslvExcep.getMessage()); }