8 Generating the Schema for Your Opcodes

Learn how to use the Oracle Communications Billing and Revenue Management (BRM) Web Services Manager package with the opcode schemas and flist specifications you need for a default integration.

Topics in this document:

If you customized any of the opcodes that are supported by Web Services Manager or if you added support for new opcodes, you must generate XSD schema files for the opcodes.

Note:

  • Before you customize an existing opcode specification, ensure that you update the opcode specification in the BRM system.

  • After you customize web services, copy the customized schema files and the WSDL files to the infranetwebsvc.war file.

Generating the Schema for an Existing Opcode

To generate schema files for an opcode that you customized and Web Services Manager already supports:

  1. Modify the opcode's XML specification file. By default, the opcode specification XML files are installed in the BRM_home/apps/brm_integrations/opspecs directory, where BRM_home is the directory in which you installed the BRM components.

  2. Do one of the following:

    • For web services that take payload as XML string:

    • For web services that take payload as XML element:

Creating Opcode Specification Schema Files

You must create opcode flist specification files for opcodes that you customize or add to the Web Services Manager. Create the specification XML files by following the BRM_home/apps/brm_integrations/stylesheets/opspec.xsd file.

You then convert the opcode flist specification XML files into XSD schema by using the pin_opspec_to_schema and pin_opspec_to_schema_v2 utilities.

To convert opcode flist specification XML files into XSD schema, go to the BRM_home/apps/brm_integrations directory and do the following:

  • For web services that take payload as XML string, run the following command:

    pin_opspec_to_schema -i input_file [-o output_file]
  • For web services that take payload as XML element, run the following command:

    Note:

    Before you run the following command, specify the BRM installation directory in the pin_opspec_to_schema_v2 utility by replacing $PIN_HOME with BRM_home.

    pin_opspec_to_schema_v2 -i input_file > output_file

    where:

    • input_file specifies the name and location of the opcode's XML flist specification. By default, the utility looks for the file in the current directory.

    • output_file creates the XSD schema output file using the name you specify. By default, the utility creates a file named opcodename.xsd in the directory from which you run the utility.

You can also create XSD schema for web services that take payload as XML element by using the pin_opspec_to_schema_v2 XSD generator utility that is located in the BRM_home/bin directory.

To create the XSD schema file by using the pin_opspec_to_schema_v2 utility, run the following command using Groovy:

groovy pin_opspec_to_schema_v2 -i input.xml > output.xsd

where:

  • input.xml specifies the name of the opcode's XML flist specification

  • output.xsd creates the XSD schema output file using the name you specify

Specifying the XSL Rules to Create the Opcode Schema

The pin_opspec_to_schema utility uses the BRM_home/brm_integrations/stylesheets/pin_opspec_to_schema.xsl style sheet to generate the schema for BRM opcodes. If your opcode references custom fields, you must customize the pin_opspec_to_schema.xsl style sheet to handle your custom fields.

For a list of the supported BRM data types, see "Understanding the BRM Data Types" in BRM Developer's Guide.