1 Using Web Services

Oracle Communications Billing and Revenue Management (BRM) Web Services Manager enables BRM opcodes to be exposed through Web services. Web Services Manager supports SOAP Web services and is packaged as an integration pack.

Topics in this document:

About WSDL Files and BRM Opcodes

Web Services Manager exposes BRM opcodes as operations through different Web services. The Web services define the opcodes that can be called and the attributes to include.

The Web service APIs are grouped by functional area. For example, the BRMBillServices Web service defines the billing Web service APIs, and the BRMPymtServices Web service defines the payment Web service APIs. Web Services Manager includes one WSDL file for each Web service.

Web Services Manager contains two different types of WSDL files. One type is for Web services that support the payload as an XML string data type. The second type is for Web services that support the payload as an XML element data type. For example:

  • The BRMBalService Web service defines balances Web service APIs that take the payload as an XML string data type.

  • The BRMBalService_v2 Web service defines balances Web service APIs that take the payload as an XML element data type.

    File names with a _v2 suffix support the payload as an XML element data type.

Note:

The WSDL and schema (XSD) files for Web services that support the payload as an XML string data type are included in the infranetwebsvc.war file. If you customize any Web services, copy the customized schema files and WSDL files to the infranetwebsvc.war file.

Web services that support the payload as an XML element data type describe the input in a well-defined structure. Any standards-compliant SOAP development application can generate a client stub.

Table 1-1 describes the Web services included that take the payload as an XML string.

Table 1-1 Web Services Included in Web Services Manager that Take the Payload as an XML String

Web Service Name Description

BRMARServices

Defines the accounts receivable Web service, which includes the following opcodes:

  • PCM_OP_AR_ACCOUNT_ADJUSTMENT

  • PCM_OP_AR_BILL_ADJUSTMENT

  • PCM_OP_AR_GET_ACCT_ACTION_ITEMS

  • PCM_OP_AR_GET_ACCT_BAL_SUMMARY

  • PCM_OP_AR_GET_ACCT_BILLS

  • PCM_OP_AR_GET_BAL_SUMMARY

  • PCM_OP_AR_GET_BILL_ITEMS

  • PCM_OP_AR_ITEM_ADJUSTMENT

  • PCM_OP_AR_EVENT_ADJUSTMENT

  • PCM_OP_AR_GET_ACTION_ITEMS

  • PCM_OP_AR_GET_BILLS

  • PCM_OP_AR_RESOURCE_AGGREGATION

See "Accounts Receivable FM Standard Opcodes" in BRM Opcode Guide for more information.

BRMBalServices

Defines the balances Web service, which includes the following opcodes:

  • PCM_OP_BAL_GET_BALANCES

  • PCM_OP_BAL_GET_BAL_GRP_AND_SVC

  • PCM_OP_BAL_GET_ACCT_BAL_GRP_AND_SVC

  • PCM_OP_BAL_GET_ACCT_BILLINFO

  • PCM_OP_BAL_GET_ECE_BALANCES

    Note:

    You must perform configuration steps before calling this opcode. See "Configuring BRM to Use PCM_OP_BAL_GET_ECE_BALANCES".

See "Balance FM Standard Opcodes" in BRM Opcode Guide for more information.

BRMBillServices

Defines the billing Web service, which includes the following opcodes:

  • PCM_OP_BILL_GET_ITEM_EVENT_CHARGE_DISCOUNT

  • PCM_OP_BILL_GROUP_MOVE_MEMBER

  • PCM_OP_BILL_MAKE_BILL_NOW

  • PCM_OP_BILL_DEBIT

  • PCM_OP_BILL_GROUP_GET_PARENT

See "Billing FM Standard Opcodes" in BRM Opcode Guide for more information.

BRMCollectionsServices

Defines the collections Web service, which includes the following opcode:

  • PCM_OP_COLLECTIONS_SET_ACTION_STATUS

See "Collections Manager FM Standard Opcodes" in BRM Opcode Guide for more information.

BRMCustcareServices

Defines the customer care Web service, which includes the following opcode:

  • PCM_OP_CUSTCARE_MOVE_ACCT

BRMCustServices

Defines the customer Web service, which includes the following opcodes:

  • PCM_OP_CUST_COMMIT_CUSTOMER

  • PCM_OP_CUST_MODIFY_CUSTOMER

  • PCM_OP_CUST_UPDATE_CUSTOMER

  • PCM_OP_CUST_UPDATE_SERVICES

  • PCM_OP_CUST_DELETE_ACCT

  • PCM_OP_CUST_DELETE_PAYINFO

  • PCM_OP_CUST_CREATE_PROFILE

  • PCM_OP_CUST_MODIFY_PROFILE

  • PCM_OP_CUST_DELETE_PROFILE

See "Customer FM Standard Opcodes" in BRM Opcode Guide for more information.

BRMInvServices

Defines the invoicing Web service, which includes the following opcode:

  • PCM_OP_INV_VIEW_INVOICE

Important: You must configure your client application to convert the invoice data received from the PCM_OP_INV_VIEW_INVOICE opcode into the appropriate format. See "About Invoicing Output XML Data" in BRM JCA Resource Adapter.

See "Invoicing FM Standard Opcodes" in BRM Opcode Guide for more information.

BRMPymtServices

Defines the payment Web service, which includes the following opcode:

  • PCM_OP_PYMT_COLLECT

See "Payment FM Standard Opcodes" in BRM Opcode Guide for more information.

BRMReadServices

Defines the read Web service, which includes the following opcodes:

  • PCM_OP_READ_FLDS

  • PCM_OP_READ_OBJ

  • PCM_OP_SEARCH

See "LDAP Base Opcodes" in BRM Opcode Guide for more information.

BRMSubscriptionServices

Defines the subscription Web service, which includes the following opcodes:

  • PCM_OP_SUBSCRIPTION_CANCEL_PRODUCT

  • PCM_OP_SUBSCRIPTION_CANCEL_DISCOUNT

  • PCM_OP_SUBSCRIPTION_CANCEL_SUBSCRIPTION

  • PCM_OP_SUBSCRIPTION_CHANGE_DEAL

  • PCM_OP_SUBSCRIPTION_PURCHASE_DEAL

  • PCM_OP_SUBSCRIPTION_SET_BUNDLE

  • PCM_OP_SUBSCRIPTION_SET_DISCOUNT_STATUS

  • PCM_OP_SUBSCRIPTION_SET_DISCOUNTINFO

  • PCM_OP_SUBSCRIPTION_SET_PRODINFO

  • PCM_OP_SUBSCRIPTION_SET_PRODUCT_STATUS

  • PCM_OP_SUBSCRIPTION_TRANSFER_SUBSCRIPTION

  • PCM_OP_SUBSCRIPTION_GET_PURCHASED_OFFERINGS

See "Subscription Management FM Standard Opcodes" in BRM Opcode Guide for more information.

Table 1-2 describes the Web services that take the payload as an XML element.

Table 1-2 Web Services Included in Web Services Manager that Take the Payload as an XML Element

Web Service Name Description

BRMACTServices_v2

Defines the activity Web service, which includes the following opcodes:

  • PCM_OP_ACT_FIND

  • PCM_OP_ACT_LOAD_SESSION

See "Activity FM Standard Opcodes" in BRM Opcode Guide for more information.

BRMARServices_v2

Defines the accounts receivable Web service, which includes the following opcodes:

  • PCM_OP_AR_ACCOUNT_ADJUSTMENT

  • PCM_OP_AR_ACCOUNT_WRITEOFF

  • PCM_OP_AR_BILL_ADJUSTMENT

  • PCM_OP_AR_BILL_DISPUTE

  • PCM_OP_AR_BILL_SETTLEMENT

  • PCM_OP_AR_BILL_WRITEOFF

  • PCM_OP_AR_BILLINFO_WRITEOFF

  • PCM_OP_AR_EVENT_ADJUSTMENT

  • PCM_OP_AR_EVENT_DISPUTE

  • PCM_OP_AR_EVENT_SETTLEMENT

  • PCM_OP_AR_GET_ACCT_ACTION_ITEMS

  • PCM_OP_AR_GET_ACCT_BAL_SUMMARY

  • PCM_OP_AR_GET_ACCT_BILLS

  • PCM_OP_AR_GET_ACTION_ITEMS

  • PCM_OP_AR_GET_BAL_SUMMARY

  • PCM_OP_AR_GET_BILLS

  • PCM_OP_AR_GET_BILL_ITEMS

  • PCM_OP_AR_GET_DISPUTES

  • PCM_OP_AR_GET_DISPUTE_DETAILS

  • PCM_OP_AR_GET_ITEMS

  • PCM_OP_AR_GET_ITEM_DETAILS

  • PCM_OP_AR_ITEM_ADJUSTMENT

  • PCM_OP_AR_ITEM_DISPUTE

  • PCM_OP_AR_ITEM_SETTLEMENT

  • PCM_OP_AR_ITEM_WRITEOFF

  • PCM_OP_AR_RESOURCE_AGGREGATION

See "Accounts Receivable FM Standard Opcodes" in BRM Opcode Guide for more information.

BRMBALServices_v2

Defines the balances Web service, which includes the following opcodes:

  • PCM_OP_BAL_CHANGE_VALIDITY

  • PCM_OP_BAL_GET_BALANCES

  • PCM_OP_BAL_GET_ECE_BALANCES

    Note:

    You must perform configuration steps before calling this opcode. See "Configuring BRM to Use PCM_OP_BAL_GET_ECE_BALANCES".
  • PCM_OP_BAL_GET_BAL_GRP_AND_SVC

  • PCM_OP_BAL_GET_ACCT_BAL_GRP_AND_SVC

  • PCM_OP_BAL_GET_ACCT_BILLINFO

See "Balance FM Standard Opcodes" in BRM Opcode Guide for more information.

BRMBILLServices_v2

Defines the billing Web service, which includes the following opcodes:

  • PCM_OP_BILL_DEBIT

  • PCM_OP_BILL_FIND

  • PCM_OP_BILL_GET_ITEM_EVENT_CHARGE_DISCOUNT

  • PCM_OP_BILL_GROUP_GET_PARENT

  • PCM_OP_BILL_GROUP_MOVE_MEMBER

  • PCM_OP_BILL_ITEM_EVENT_SEARCH

  • PCM_OP_BILL_ITEM_REFUND

  • PCM_OP_BILL_MAKE_BILL_NOW

  • PCM_OP_BILL_REVERSE

  • PCM_OP_BILL_SET_LIMIT_AND_CR

  • PCM_OP_BILL_VIEW_INVOICE

See "Billing FM Standard Opcodes" in BRM Opcode Guide for more information.

BRMCOLLECTIONSServices_v2

Defines the collections Web service, which includes the following opcode:

  • PCM_OP_COLLECTIONS_SET_ACTION_STATUS

See "Collections Manager FM Standard Opcodes" in BRM Opcode Guide for more information.

BRMCUSTCAREServices_v2

Defines the customer care Web service, which includes the following opcode:

  • PCM_OP_CUSTCARE_MOVE_ACCT

BRMCUSTServices_v2

Defines the customer Web service, which includes the following opcodes:

  • PCM_OP_CUST_COMMIT_CUSTOMER

  • PCM_OP_CUST_CREATE_PROFILE

  • PCM_OP_CUST_DELETE_ACCT

  • PCM_OP_CUST_DELETE_PAYINFO

  • PCM_OP_CUST_DELETE_PROFILE

  • PCM_OP_CUST_FIND

  • PCM_OP_CUST_FIND_PAYINFO

  • PCM_OP_CUST_FIND_PROFILE

  • PCM_OP_CUST_GET_NOTE

  • PCM_OP_CUST_MODIFY_CUSTOMER

  • PCM_OP_CUST_MODIFY_PROFILE

  • PCM_OP_CUST_SET_NOTE

  • PCM_OP_CUST_SET_STATUS

  • PCM_OP_CUST_SET_TAXINFO

  • PCM_OP_CUST_UPDATE_CUSTOMER

  • PCM_OP_CUST_UPDATE_SERVICES

See "Customer FM Standard Opcodes" in BRM Opcode Guide for more information.

  • PCM_OP_CUST_POL_GET_PLANS

  • PCM_OP_CUST_POL_GET_DEALS

  • PCM_OP_CUST_POL_GET_PRODUCTS

  • PCM_OP_CUST_POL_READ_PLAN

See "Customer FM Policy Opcodes" in BRM Opcode Guide for more information.

BRMINVServices_v2

Defines the invoicing Web service, which includes the following opcode:

  • PCM_OP_INV_VIEW_INVOICE

Important: You must configure your client application to convert the invoice data received from the PCM_OP_INV_VIEW_INVOICE opcode into the appropriate format. See "About Invoicing Output XML Data" in BRM JCA Resource Adapter.

See "Invoicing FM Standard Opcodes" in BRM Opcode Guide for more information.

BRMPYMTServices_v2

Defines the payment Web service, which includes the following opcode:

  • PCM_OP_PYMT_COLLECT

See "Payment FM Standard Opcodes" in BRM Opcode Guide for more information.

BRMREADServices_v2

Defines the read Web service, which includes the following opcodes:

  • PCM_OP_READ_FLDS

  • PCM_OP_READ_OBJ

  • PCM_OP_SEARCH

  • PCM_OP_TEST_LOOPBACK

See "LDAP Base Opcodes" in BRM Opcode Guide for more information.

BRMSUBSCRIPTIONServices_v2

Defines the subscription Web service, which includes the following opcodes:

  • PCM_OP_SUBSCRIPTION_CANCEL_DEAL

  • PCM_OP_SUBSCRIPTION_CANCEL_PRODUCT

  • PCM_OP_SUBSCRIPTION_CANCEL_DISCOUNT

  • PCM_OP_SUBSCRIPTION_CANCEL_SUBSCRIPTION

  • PCM_OP_SUBSCRIPTION_CHANGE_DEAL

  • PCM_OP_SUBSCRIPTION_GET_HISTORY

  • PCM_OP_SUBSCRIPTION_PURCHASE_DEAL

  • PCM_OP_SUBSCRIPTION_PURCHASE_FEES

  • PCM_OP_SUBSCRIPTION_READ_ACCT_PRODUCTS

  • PCM_OP_SUBSCRIPTION_SERVICE_BALGRP_TRANSFER

  • PCM_OP_SUBSCRIPTION_SET_BUNDLE

  • PCM_OP_SUBSCRIPTION_SET_DISCOUNT_STATUS

  • PCM_OP_SUBSCRIPTION_SET_DISCOUNTINFO

  • PCM_OP_SUBSCRIPTION_SET_PRODINFO

  • PCM_OP_SUBSCRIPTION_SET_PRODUCT_STATUS

  • PCM_OP_SUBSCRIPTION_TRANSFER_SUBSCRIPTION

  • PCM_OP_SUBSCRIPTION_TRANSITION_DEAL

  • PCM_OP_SUBSCRIPTION_TRANSITION_PLAN

  • PCM_OP_SUBSCRIPTION_GET_PURCHASED_OFFERINGS

See "Subscription Management FM Standard Opcodes" in BRM Opcode Guide for more information.

Configuring BRM to Use PCM_OP_BAL_GET_ECE_BALANCES

Before you can call the PCM_OP_BAL_GET_ECE_BALANCES opcode, you must configure BRM to support the opcode. To do so, add the following entry to your Connection Manager (CM) configuration file (BRM_home/sys/cm/pin.conf):

- cm em_group ece PCM_OP_BAL_GET_ECE_BALANCES

Stop and restart the CM for the changes to take effect.

About Validating Input and Output XML Data

Web Services Manager validates the input and output XML by comparing the XML fields and values against the opcode XML schema.

The opcode specifications, schemas, and WSDL files are packaged along with Web Services Manager. The package includes the opspec.xsd file and the pin_opspec_to_schema utility. Use the opspec.xsd file to write opcode specifications for custom opcodes that need to be exposed as a Web service. Use the pin_opspec_to_schema utility to generate the schema files from the opcode specification files.

To configure Web Services Manager to validate the input and output XML against the target opcode XML schema:

  1. Open the local_dir/WEB-INF/classes/Infranet.properties file.

  2. Add the following entries to the file:

    • webservices.input.validation.enabled=true

    • webservices.output.validation.enabled=true

  3. Do one of the following:

    • If you are using WebLogic Server, copy the schema files packaged as a part of Web Services Manager installation from the BRM_home/deploy/web_services/schemas directory to the local_dir/common/lib directory.

    • If you are using any supported server, copy the schema files from the BRM_home/deploy/web_services/schemas directory to the local_dir/WEB-INF/classes directory.

About Developing and Testing Client Applications with Web Services Manager

You can develop custom applications that interact with BRM through Web Services Manager. Use a SOAP development environment that supports importing WSDL files (for example, SoapUI) to develop and test your custom Web service applications. SOAP development applications may have minor differences in product configuration. Consult your SOAP development application documentation for configuration information.

In general, do the following to develop and test your Web services applications:

  1. Download and install a SOAP development application.

  2. Configure a new project in your SOAP development application.

  3. Write a client application that communicates with Web services using the SOAP protocol.

  4. Import the Web service definitions using the WSDL files. See "About WSDL Files and BRM Opcodes" for more information on accessing WSDL files.

  5. Run the required commands to set up your application server environment.

  6. Configure the properties of the Web services operations in your SOAP development environment with valid credentials.

  7. Send a Web service request to BRM from the SOAP development environment client.

  8. View the Web service response in the SOAP development environment.

Example of Testing a Web Services Implementation Using a Client Application

To test your Web services implementation, write a client application that communicates with the Web service using the SOAP protocol.

This sample procedure demonstrates how to use the TestClient.java sample code with the PCM_OP_TEST_LOOPBACK opcode to verify communication between BRM and the Web service. The sample uses WebLogic Server, but you can apply the concepts to any other supported application server.

  1. Do one of the following, which sets up the WebLogic Server environment:

    • If WebLogic is installed on a UNIX host, run WebLogic_home/wlserver/server/bin/setWLSEnv.sh

    • If WebLogic is installed on a Windows host, run WebLogic_home/server/bin/setenv.exe

    where WebLogic_home is the directory in which you installed the WebLogic Server.

  2. Create an XML file (some_name_1.xml) using the following text:

    <project name="buildWebservice" default="all">
    <property name="buildDir" value="./myapps" />
    <property name="jarFiles" value="jars" />
    <target name="all" depends="jar" description="builds everything">
    </target>
    <target name="generate-client">
    <clientgen wsdl="http://198.51.100.1:7001/infranetwebsvc/services/Infranet?wsdl"       
    packageName="test_client"  
    destDir= "./myapps"/>       
    </target>
    <target name="compile" depends="generate-client" description="compile source files">
        <echo> Compiling adapter files</echo>
        <javac  destdir="${buildDir}">
            <src path="${buildDir}"/>
        </javac>
    </target>
    <target name="jar" depends="compile" description="generate jar file(s)">
        <jar jarfile="clientStub.jar"  basedir="${buildDir}">
        <exclude name = "**/*.java"/>
    
        </jar>
    </target>
    <target name="clean" description="remove files created by target prepare">
        <delete dir="${buildDir}"/>
    </target>
    </project>
    

    This XML file uses the WebLogic Server clientgen task to automatically generate a utility library that provides low-level SOAP communication (client stubs).

  3. Run the following command, which creates the client stubs:

    ant -file some_name_1.xml

    This process generates the clientstubs.jar file, which contains stubs used by the client. The test client code (source_home/TestClient.java, where source_home is the directory where your source code files are stored) then creates an flist, converts it to XML, and calls the PCM_OP_TEST_LOOPBACK opcode.

    The following is a sample listing of TestClient.java:

    import java.io.IOException;
    import test_client.*;  // corresponds to package name clientgen generated 
    
    public class TestClient {
    
        public static void main(String[] args) {
            try {
    
                String wsdlUrl = 
    "http://198.51.100.1:7001/infranetwebsvc/services/Infranet?wsdl"; 
                InfranetWebServiceService service = new InfranetServiceService_Impl( wsdlUrl );
                InfranetWebService port = service.getInfranet();
    
                // convert flist to XML representation
                String XMLInput="<flist xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"><POID>0.0.0.1 /account 80408 8</POID></flist>";
                System.out.println("Input: " + XMLInput);
                // invoke web service ‘opcode' method
                String result = port.opcode("TEST_LOOPBACK", XMLInput);
        
                System.out.println("result: "+ result);
    
            } catch (Exception ex) {
                ex.printStackTrace();    
            }
        }
    }
  4. Create another XML file (some_name_2.xml) using the following text:

    Note:

    Replace the paths for the JAR files as required.

    <project name="test_client" default="all">
    
    <target name="all" depends="run"/>
    
    <path id="classpath">
        <pathelement path="clientstubs.jar"/>
        <pathelement path=".\classes"/>
        <pathelement path="D:\WebServices\webman\lib\jaxrpc.jar"/>
        <pathelement path="D:\bea\wlserver_10.3\server\lib\wseeclient.jar"/>
        <pathelement path="D:\bea\wlserver_10.3\server\lib\weblogic.jar"/>
    </path>
    
    c
    <target name="compile">
        <mkdir dir="classes"/>
        <javac  srcdir="src" 
            destdir="classes"
            classpathref="classpath"
        />
    </target>
    
    <target name="run" depends="compile">
        <java classname="TestClient"
                fork="yes"
                classpathref="classpath">
        </java>
    </target>
    
    </project>    
  5. Build and run the test with the some_name_2.xml file using regular Ant tasks:

    ant -file some_name_2.xml

Testing the Web Service

To test your Web services implementation, use a SOAP development application that supports importing WSDL files, for example SoapUI. SOAP development applications may have minor differences in project configuration. Consult your SOAP development environment documentation for configuration information.

To test your Web services implementation, write a client application that communicates with the Web service using the SOAP protocol.

Note:

You can test Web services using SoapUI version 4.6.3.

The sample procedures use WebLogic Server, but you can apply the concepts to any other supported server.

For example, with WebLogic Server:

  1. Run one of the following commands, which set up the WebLogic Server environment:

    • If WebLogic is installed on a UNIX host: WebLogic_home/wlserver/server/bin/setWLSEnv.sh

    • If WebLogic is installed on a Windows host: WebLogic_home/server/bin/setenv.exe

      where WebLogic_home is the directory in which you installed the WebLogic Server.

  2. Create an XML file (some_name_1.xml) using the following text:

    <project name="buildWebservice" default="all">
    <property name="buildDir" value="./myapps" />
    <property name="jarFiles" value="jars" />
    <target name="all" depends="jar" description="builds everything">
    </target>
    <target name="generate-client">
    <clientgen wsdl="http://198.51.100.1:7001/infranetwebsvc/services/Infranet?wsdl"       
    packageName="test_client"  
    destDir= "./myapps"/>       
    </target>
    <target name="compile" depends="generate-client" description="compile source files">
        <echo> Compiling adapter files</echo>
        <javac  destdir="${buildDir}">
            <src path="${buildDir}"/>
        </javac>
    </target>
    <target name="jar" depends="compile" description="generate jar file(s)">
        <jar jarfile="clientStub.jar"  basedir="${buildDir}">
        <exclude name = "**/*.java"/>
    
        </jar>
    </target>
    <target name="clean" description="remove files created by target prepare">
        <delete dir="${buildDir}"/>
    </target>
    </project>

    This XML file uses the WebLogic Server clientgen task to automatically generate a utility library that provides low-level SOAP communication (client stubs).

  3. Run the following command, which creates the client stubs:

    ant -file some_name_1.xml

    This process generates the clientstubs.jar file, which contains stubs used by the client. The test client code (src\TestClient.java) then creates an flist, converts it to XML, and calls the PCM_OP_TEST_LOOPBACK opcode.

    The following is a sample listing of TestClient.java:

    import java.io.IOException;
    import test_client.*;  // corresponds to package name clientgen generated 
    
    public class TestClient {
    
    public static void main(String[] args) {
            try {
    
                String wsdlUrl = 
    "http://198.51.100.1:7001/infranetwebsvc/services/Infranet?wsdl"; 
                InfranetWebServiceService service = new InfranetServiceService_Impl( wsdlUrl );
                InfranetWebService port = service.getInfranet();
    
                // convert flist to XML representation
                String XMLInput="<flist xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"><POID>0.0.0.1 /account 80408 8</POID></flist>";
                System.out.println("Input: " + XMLInput);
                // invoke web service ‘opcode' method
                String result = port.opcode("TEST_LOOPBACK", XMLInput);
        
                System.out.println("result: "+ result);
    
            } catch (Exception ex) {
                ex.printStackTrace();    
            }
        }
    }
  4. Create another XML file (some_name_2.xml) using the following text:

    Note:

    Replace the paths for the JAR files as required.

    <project name="test_client" default="all">
    
    <target name="all" depends="run"/>
    
    <path id="classpath">
        <pathelement path="clientstubs.jar"/>
        <pathelement path=".\classes"/>
        <pathelement path="D:\WebServices\webman\lib\jaxrpc.jar"/>
        <pathelement path="D:\bea\wlserver_10.3\server\lib\wseeclient.jar"/>
        <pathelement path="D:\bea\wlserver_10.3\server\lib\weblogic.jar"/>
    </path>
    
    c
    <target name="compile">
        <mkdir dir="classes"/>
        <javac  srcdir="src" 
            destdir="classes"
            classpathref="classpath"
        />
    </target>
    
    <target name="run" depends="compile">
        <java classname="TestClient"
                fork="yes"
                classpathref="classpath">
        </java>
    </target>
    
    </project>    
  5. Build and run the test with the some_name_2.xml file using regular Ant tasks:

    ant -file some_name_2.xml

Using Sample Web Services Programs

Web Services Manager includes sample programs that demonstrate how to write code for various tasks when customizing Web services. For example, the sample program InfranetBALTestClient.java creates an flist, converts it to XML, and calls the PCM_OP_BAL_GET_BALANCES opcode.

Example of Creating an Account in BRM Using Web Services

This section describes an example of creating a customer account using Web services. The example shows a sample SOAP request and a response message for creating a customer account in BRM by calling a Web service in Web Services Manager.

To create an account in BRM using Web services, you call the pcmOpCustCommitCustomer Web service API that maps to the PCM_OP_CUST_COMMIT_CUSTOMER opcode. The pcmOpCustCommitCustomer Web service API is included in the BRMCUSTServices_v2 Web service. The BRMCUSTServices_v2 Web service contains Web service APIs that are related to customer accounts. See "About WSDL Files and BRM Opcodes" for more information about the Web services included in the Web Services Manager package.

You use URLs to create SOAP clients for Web services. The URL to create a SOAP client is generated by the JAX-WS in Oracle WebLogic Server.

To generate the URL for a Web service:

  1. Log in to the WebLogic Server Administration Console.

  2. Go to the deployments section.

  3. Click BrmWebServices link.

    The Settings page for the deployment appears and all the web services are listed in the Modules and Components section.

  4. Click the web service in the Modules and Components section.

  5. Click the Testing tab.

  6. The WebLogic Server Administration console displays an URL for the BRM web services.

A sample URL for the BRMCUSTServices_v2 Web service is as follows:

http://hostIPAddress:port/BrmWebServices/BRMCUSTServices_v2?wsdl

To call a Web service, users are required to authenticate using a valid user name and a password. Users can call only those Web services that they are authorized to call.

Sample SOAP Request Input XML File

The following sample shows a SOAP request for the pcmOpCustCommitCustomer Web service API.

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
   xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bus="http://xmlns.oracle.com/BRM/schemas/BusinessOpcodes">
   <soapenv:Header/> 
   <soapenv:Body>
    <bus:pcmOpCustCommitCustomerRequest>
     <PCM_OP_CUST_COMMIT_CUSTOMER_Request xsi:type="bus:PCM_OP_CUST_COMMIT_CUSTOMER_RequestType">
       <flags xsi:type="xsd:int">1</flags> 
       <PCM_OP_CUST_COMMIT_CUSTOMER_inputFlist xmlns="http://xmlns.oracle.com/BRM/schemas/BusinessOpcodes">
         <ACCTINFO elem="0">
           <ACCOUNT_NO>a022020202011992</ACCOUNT_NO> 
           <BAL_INFO/> 
           <BUSINESS_TYPE>1</BUSINESS_TYPE> 
           <CURRENCY>840</CURRENCY> 
           <POID>0.0.0.1 /account -1 0</POID> 
         </ACCTINFO>
       <BAL_INFO elem="0">
        <BILLINFO/> 
         <LIMIT elem="840">
          <CREDIT_LIMIT>"0"</CREDIT_LIMIT> 
        </LIMIT>
      <NAME>Account Level Balance Group</NAME> 
      <POID>0.0.0.1 /balance_group -1 0</POID> 
    </BAL_INFO>
   <BILLINFO elem="0">
     <BAL_INFO/> 
     <BILL_WHEN>1</BILL_WHEN> 
     <BILLINFO_ID>88-CYZZ5</BILLINFO_ID> 
     <CURRENCY>840</CURRENCY> 
     <PAY_TYPE>10001</PAY_TYPE> 
     <PAYINFO/> 
     <POID>0.0.0.1 /billinfo -1 0</POID> 
   </BILLINFO>
   <END_T>2010-02-17T22:37:49</END_T> 
   <FLAGS>0</FLAGS> 
   <LOCALES elem="1">
     <LOCALE>en_US</LOCALE> 
   </LOCALES>
   <NAMEINFO elem="1">
     <ADDRESS>123 Hollywood Boulevard</ADDRESS> 
     <CITY>Los Angeles</CITY> 
     <CONTACT_TYPE>Account holder</CONTACT_TYPE> 
     <COUNTRY>USA</COUNTRY> 
     <EMAIL_ADDR>test_001</EMAIL_ADDR> 
     <FIRST_NAME>Chetn3457</FIRST_NAME> 
     <LAST_NAME>Chet8905</LAST_NAME> 
     <STATE>NJ</STATE> 
     <ZIP>90001</ZIP> 
   </NAMEINFO>
   <PAYINFO elem="0">
        <INHERITED_INFO>
            <INV_INFO elem="0">
               <ADDRESS>123 Hollywood Boulevard</ADDRESS> 
               <CITY>Los Angeles</CITY> 
               <COUNTRY>USA</COUNTRY> 
               <DELIVERY_DESCR>test_001</DELIVERY_DESCR> 
               <DELIVERY_PREFER>0</DELIVERY_PREFER> 
               <EMAIL_ADDR/> 
             <INV_TERMS>0</INV_TERMS> 
           <NAME>Chet3457 Chet8905</NAME> 
         <STATE>NJ</STATE> 
       <ZIP>90001</ZIP> 
      </INV_INFO>
     </INHERITED_INFO>
     <INV_TYPE>0</INV_TYPE> 
     <PAY_TYPE>10001</PAY_TYPE> 
     <POID>0.0.0.1 /payinfo/invoice -1 0</POID> 
     </PAYINFO>
     <POID>0.0.0.1 /plan -1 0</POID> 
    </PCM_OP_CUST_COMMIT_CUSTOMER_inputFlist>
   </PCM_OP_CUST_COMMIT_CUSTOMER_Request>
  </bus:pcmOpCustCommitCustomerRequest>
 </soapenv:Body>
</soapenv:Envelope>

Sample SOAP Response Output XML File

The following sample shows a SOAP response message for the pcmOpCustCommitCustomer Web service API.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
    <brm:PCM_OP_CUST_COMMIT_CUSTOMER_outputFlist xmlns:brm="http://xmlns.oracle.com/BRM/schemas/BusinessOpcodes">
     <brm:ACCOUNT_OBJ>0.0.0.1 /account 225757 0</brm:ACCOUNT_OBJ> 
     <brm:ACCTINFO elem="0">
      <brm:ACCOUNT_NO>a022020202011992</brm:ACCOUNT_NO> 
      <brm:BAL_INFO elem="0"/> 
      <brm:BUSINESS_TYPE>1</brm:BUSINESS_TYPE> 
      <brm:CURRENCY>840</brm:CURRENCY> 
      <brm:POID>0.0.0.1 /account -1 0</brm:POID> 
    </brm:ACCTINFO>
    <brm:BAL_INFO elem="0">
     <brm:ACCOUNT_OBJ>0.0.0.1 /account 225757 0</brm:ACCOUNT_OBJ> 
     <brm:BILLINFO_OBJ>0.0.0.1 /billinfo 226269 0</brm:BILLINFO_OBJ> 
       <brm:LIMIT elem="840">
        <brm:CREDIT_LIMIT/> 
      </brm:LIMIT>
      <brm:NAME>Account Level Balance Group</brm:NAME> 
      <brm:POID>0.0.0.1 /balance_group 225341 0</brm:POID> 
      <brm:SERVICE_OBJ>0.0.0.0 0 0</brm:SERVICE_OBJ> 
      </brm:BAL_INFO>
      <brm:BILLINFO elem="0">
        <brm:BAL_GRP_OBJ>0.0.0.1 /balance_group 225341 0</brm:BAL_GRP_OBJ> 
        <brm:BILLINFO_ID>88-CYZZ5</brm:BILLINFO_ID> 
        <brm:BILL_WHEN>1</brm:BILL_WHEN> 
        <brm:CURRENCY>840</brm:CURRENCY> 
        <brm:CURRENCY_SECONDARY>0</brm:CURRENCY_SECONDARY> 
        <brm:EFFECTIVE_T>2010-02-17T22:37:49Z</brm:EFFECTIVE_T> 
        <brm:PAYINFO_OBJ>0.0.0.1 /payinfo/invoice 226781 0</brm:PAYINFO_OBJ> 
        <brm:PAY_TYPE>10001</brm:PAY_TYPE> 
        <brm:POID>0.0.0.1 /billinfo 226269 0</brm:POID> 
      </brm:BILLINFO>
      <brm:END_T>2010-02-17T22:37:49Z</brm:END_T> 
      <brm:FLAGS>0</brm:FLAGS> 
      <brm:GROUP_INFO/> 
      <brm:HOST elem="1">
        <brm:HOSTNAME>XXX.XXX.XXX.XXX</brm:HOSTNAME> 
        <brm:TYPE>1</brm:TYPE> 
      </brm:HOST>
      <brm:HOST elem="2">
        <brm:HOSTNAME>XXX.XXX.XXX.XXX</brm:HOSTNAME> 
        <brm:TYPE>1</brm:TYPE> 
     </brm:HOST>
     <brm:HOST elem="3">
        <brm:HOSTNAME>XXXXXXXXX.XXX</brm:HOSTNAME> 
        <brm:PORT>0</brm:PORT> 
        <brm:TYPE>2</brm:TYPE> 
     </brm:HOST>
     <brm:HOST elem="4">
        <brm:HOSTNAME>XXXX.XXX</brm:HOSTNAME> 
        <brm:TYPE>3</brm:TYPE> 
    </brm:HOST>
    <brm:HOST elem="5">
        <brm:HOSTNAME>XXXX.XXX</brm:HOSTNAME> 
        <brm:TYPE>4</brm:TYPE> 
    </brm:HOST>
    <brm:HTTP_URL>XXXXXXXXXXXXXXX</brm:HTTP_URL> 
    <brm:LOCALES elem="1">
      <brm:LOCALE>en_US</brm:LOCALE> 
    </brm:LOCALES>
    <brm:NAMEINFO elem="1">
      <brm:ADDRESS>123 Hollywood Boulevard</brm:ADDRESS> 
      <brm:CANON_COUNTRY>US</brm:CANON_COUNTRY> 
      <brm:CITY>Los Angeles</brm:CITY> 
      <brm:COMPANY/> 
      <brm:CONTACT_TYPE>Account holder</brm:CONTACT_TYPE> 
      <brm:COUNTRY>USA</brm:COUNTRY> 
      <brm:ELEMENT_ID>1</brm:ELEMENT_ID> 
      <brm:EMAIL_ADDR>test_001</brm:EMAIL_ADDR> 
      <brm:FIRST_NAME>Chetn3457</brm:FIRST_NAME> 
      <brm:LAST_NAME>Chet8905</brm:LAST_NAME> 
      <brm:MIDDLE_NAME/> 
      <brm:SALUTATION/> 
      <brm:STATE>NJ</brm:STATE> 
      <brm:TITLE/> 
      <brm:ZIP>90001</brm:ZIP> 
     </brm:NAMEINFO>
     <brm:PAYINFO elem="0">
      <brm:INHERITED_INFO>
       <brm:INV_INFO elem="0">
        <brm:ADDRESS>123 Hollywood Boulevard</brm:ADDRESS> 
        <brm:CITY>Los Angeles</brm:CITY> 
        <brm:COUNTRY>USA</brm:COUNTRY> 
        <brm:DELIVERY_DESCR>test_001</brm:DELIVERY_DESCR> 
        <brm:DELIVERY_PREFER>0</brm:DELIVERY_PREFER> 
        <brm:EMAIL_ADDR/> 
        <brm:INV_TERMS>0</brm:INV_TERMS> 
        <brm:NAME>Chet3457 Chet8905</brm:NAME> 
        <brm:STATE>NJ</brm:STATE> 
        <brm:ZIP>90001</brm:ZIP> 
       </brm:INV_INFO>
      </brm:INHERITED_INFO>
    <brm:INV_TYPE>0</brm:INV_TYPE> 
    <brm:PAY_TYPE>10001</brm:PAY_TYPE> 
    <brm:POID>0.0.0.1 /payinfo/invoice 226781 0</brm:POID> 
    </brm:PAYINFO>
    <brm:POID>0.0.0.1 /plan -1 0</brm:POID> 
    <brm:START_T>2014-05-07T06:00:09Z</brm:START_T> 
    <brm:SUPPORT_PHONE>XXXXXXXXXXXXXXX</brm:SUPPORT_PHONE> 
   </brm:PCM_OP_CUST_COMMIT_CUSTOMER_outputFlist>
  </soapenv:Body>
</soapenv:Envelope>

About Data Masking in Web Services Responses

SOAP output response XML files may contain masked fields as configured by your BRM implementation. Subscriber fields, including payment information and user credentials, may be hidden in responses for securing sensitive subscriber data.

See "Masking Sensitive Customer Data" in BRM Managing Customers for more information on configuring data masking.