A Sample XML Files, Schemas, and Transformations
This appendix contains the following:
Sample activationModel.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XML Spy v4.2 U (http://www.xmlspy.com) by Leung, Sandra (Nortel) -->
<activationModel xmlns="http://www.metasolv.com/ServiceActivation/2003/ActivationModel" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.metasolv.com/ServiceActivation/2003/ActivationModel
D:\ccm_databases\ASAP~sleung_windows\ASAP\jmx\xsd\SA_Archive.xsd" name="Nortel_DMS_POTS">
<name>Nortel DMS POTS DemoInstall</name>
<description>Nortel DMS POTS DemoInstall</description>
<vendor>Nortel</vendor>
<technology>DMS</technology>
<softwareLoad>BCS36</softwareLoad>
<version>
<author>Nortel Networks</author>
<label>1.2</label>
<majorVersion>1</majorVersion>
<minorVersion>2</minorVersion>
<createDate>2001-11-28</createDate>
<validDuration>P1Y2M3DT10H30M</validDuration>
</version>
<component>
<serviceModel>Nortel/DMS/POTS/service_model/add_pots_line_n_option.xml</serviceModel>
</component>
<component>
<serviceModel>Nortel/DMS/POTS/service_model/del_pots_line.xml</serviceModel>
</component>
<component>
<serviceModel>Nortel/DMS/POTS/service_model/del_option.xml</serviceModel>
</component>
<component>
<serviceModel>Nortel/DMS/POTS/service_model/raw_command.xml</serviceModel>
</component>
<component>
<serviceModel>Nortel/DMS/POTS/service_model/add_trk_grp.xml</serviceModel>
</component>
<component>
<serviceModel>Nortel/DMS/POTS/service_model/del_m5209_centrex_set.xml</serviceModel>
</component>
<component>
<serviceModel>Nortel/DMS/POTS/service_model/add_m5209_centrex_set.xml</serviceModel>
</component>
<component>
<serviceModel>Nortel/DMS/POTS/service_model/dms_cfd_option_off.xml</serviceModel>
</component>
<component>
<serviceModel>Nortel/DMS/POTS/service_model/dms_cfd_option_on.xml</serviceModel>
</component>
<component>
<serviceModel>Nortel/DMS/POTS/service_model/dms_ar_option_off.xml</serviceModel>
</component>
<component>
<serviceModel>Nortel/DMS/POTS/service_model/dms_ar_option_on.xml</serviceModel>
</component>
<component>
<serviceModel>Nortel/DMS/POTS/service_model/dms_cpu_option_off.xml</serviceModel>
</component>
<component>
<serviceModel>Nortel/DMS/POTS/service_model/dms_cpu_option_on.xml</serviceModel>
</component>
<component>
<serviceModel>Nortel/DMS/POTS/service_model/dms_mdn_option_off.xml</serviceModel>
</component>
<component>
<serviceModel>Nortel/DMS/POTS/service_model/dms_mdn_option_on.xml</serviceModel>
</component>
<component>
<serviceModel>Nortel/DMS/POTS/service_model/reserved_map.xml</serviceModel>
</component>
<component>
<javaProvisioningFile>
<jarFile>Nortel/DMS/POTS/java/lib/pots.jar</jarFile>
</javaProvisioningFile>
</component>
<javaProvisioningFile>
<jarFile>Nortel/DMS/POTS/java/lib/pots.jar</jarFile>
</javaProvisioningFile>
</component>
<role name="administrator">
<description>System Administrator</description>
</role>
</activationModel>
Sample srt.xml
<?xml version="1.0" encoding="UTF-8"?> <srtServiceModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\Documents and Settings\btang\Desktop\parameterMap.xsd"> <serviceBundle> <serviceBundleActionName>POTS_BUNDLE_ADD_LINE</serviceBundleActionName> <serviceBundleSpawning> <parameterName>BUNDLE_ID</parameterName> <parameterValue>POTS-1</parameterValue> </serviceBundleSpawning> <description>This Bundle Contains both POTS-1 and POTS-2</description> <serviceAction> <serviceActionName>C-ADD_POTS_LINE</serviceActionName> <includeOrderDataInResponse>true</includeOrderDataInResponse> <description>This is a basic Add Residential Line</description> <serviceActionSpawningLogic> <equalsCondition> <parameterLabel>NE_ID</parameterLabel> <parameterValue>TOR_REM1</parameterValue> </equalsCondition> </serviceActionSpawningLogic> <serviceActionParameterMapping> <parameterName>NE_ID</parameterName> <externalParameter> <parameterName>NE_ID</parameterName> </externalParameter> </serviceActionParameterMapping> <serviceActionParameterMapping> <parameterName>DN</parameterName> <externalParameter> <parameterName>DN</parameterName> <defaultValue>6792727</defaultValue> </externalParameter> </serviceActionParameterMapping> <serviceActionParameterMapping> <parameterName>LATA</parameterName> <externalParameter> <parameterName>LATA</parameterName> <defaultValue>236</defaultValue> </externalParameter> </serviceActionParameterMapping> <serviceActionParameterMapping> <parameterName>LCC</parameterName> <externalParameter> <parameterName>LTG</parameterName> <defaultValue>1</defaultValue> </externalParameter> </serviceActionParameterMapping> <serviceActionParameterMapping> <parameterName>LTG</parameterName> <externalParameter> <parameterName>LTG</parameterName> <defaultValue>1</defaultValue> </externalParameter> </serviceActionParameterMapping> <serviceActionParameterMapping> <parameterName>LEN</parameterName> <externalParameter> <parameterName>LEN</parameterName> <defaultValue>1010101</defaultValue> </externalParameter> </serviceActionParameterMapping> </serviceAction> <serviceAction> <serviceActionName>C-ADD_POTS_LINE</serviceActionName> <includeOrderDataInResponse>true</includeOrderDataInResponse> <description>Add Line and Options Example</description> <serviceActionSpawningLogic> <alwaysCondition/> <expression>NE_ID LIKE "TOR_REM2"</expression> </serviceActionSpawningLogic> <serviceActionParameterMapping> <parameterName>NE_ID</parameterName> <externalParameter> <parameterName>NE_ID</parameterName> </externalParameter> </serviceActionParameterMapping> <serviceActionParameterMapping> <parameterName>DN</parameterName> <externalParameter> <parameterName>DN</parameterName> <defaultValue>6792727</defaultValue> </externalParameter> </serviceActionParameterMapping> <serviceActionParameterMapping> <parameterName>LATA</parameterName> <externalParameter> <parameterName>LATA</parameterName> <defaultValue>236</defaultValue> </externalParameter> </serviceActionParameterMapping> <serviceActionParameterMapping> <parameterName>LCC</parameterName> <externalParameter> <parameterName>LTG</parameterName> <defaultValue>1</defaultValue> </externalParameter> </serviceActionParameterMapping> <serviceActionParameterMapping> <parameterName>LTG</parameterName> <externalParameter> <parameterName>LTG</parameterName> <defaultValue>1</defaultValue> </externalParameter> </serviceActionParameterMapping> <serviceActionParameterMapping> <parameterName>LEN</parameterName> <externalParameter> <parameterName>LEN</parameterName> <defaultValue>1010101</defaultValue> </externalParameter> </serviceActionParameterMapping> <serviceActionParameterMapping> <parameterName>OPT1</parameterName> <externalParameter> <parameterName>option1</parameterName> <defaultValue>CTR</defaultValue> </externalParameter> </serviceActionParameterMapping> <serviceActionParameterMapping> <parameterName>OPT2</parameterName> <externalParameter> <parameterName>option2</parameterName> <defaultValue>LCDR</defaultValue> </externalParameter> </serviceActionParameterMapping> </serviceAction> </serviceBundle> <serviceBundle> <serviceBundleActionName>POTS_BUNDLE_ADD_LINE_FAILED</serviceBundleActionName> <serviceBundleSpawning> <parameterName>BUNDLE_ID</parameterName> <parameterValue>POTS-3</parameterValue> </serviceBundleSpawning> <description>POTS-3 Fail and Rollback Example</description> <serviceAction> <serviceActionName>C-ADD_POTS_LINE</serviceActionName> <includeOrderDataInResponse>true</includeOrderDataInResponse> <description>This Action will be failed and Rollback</description> <serviceActionSpawningLogic> <definedCondition> <parameterName>NE_ID</parameterName> </definedCondition> </serviceActionSpawningLogic> <serviceActionParameterMapping> <parameterName>NE_ID</parameterName> <externalParameter> <parameterName>NE_ID</parameterName> </externalParameter> </serviceActionParameterMapping> <serviceActionParameterMapping> <parameterName>DN</parameterName> <externalParameter> <parameterName>DN</parameterName> <defaultValue>6792727</defaultValue> </externalParameter> </serviceActionParameterMapping> <serviceActionParameterMapping> <parameterName>LATA</parameterName> <externalParameter> <parameterName>LATA</parameterName> <defaultValue>236</defaultValue> </externalParameter> </serviceActionParameterMapping> <serviceActionParameterMapping> <parameterName>LCC</parameterName> <externalParameter> <parameterName>LTG</parameterName> <defaultValue>1</defaultValue> </externalParameter> </serviceActionParameterMapping> <serviceActionParameterMapping> <parameterName>LTG</parameterName> <externalParameter> <parameterName>LTG</parameterName> <defaultValue>1</defaultValue> </externalParameter> </serviceActionParameterMapping> <serviceActionParameterMapping> <parameterName>LEN</parameterName> <externalParameter> <parameterName>LEN</parameterName> <defaultValue>1010101</defaultValue> </externalParameter> </serviceActionParameterMapping> <serviceActionParameterMapping> <parameterName>OPT1</parameterName> <externalParameter> <parameterName>option2</parameterName> <defaultValue>CTR</defaultValue> </externalParameter> </serviceActionParameterMapping> <serviceActionParameterMapping> <parameterName>OPT2</parameterName> <externalParameter> <parameterName>option2</parameterName> <defaultValue>3WC</defaultValue> </externalParameter> </serviceActionParameterMapping> </serviceAction> </serviceBundle> <serviceBundle> <serviceBundleActionName>POTS_4_FAIL_AND_RETRY_EXAMPLE</serviceBundleActionName> <serviceBundleSpawning> <parameterName>BUNDLE_ID</parameterName> <parameterValue>POTS-4</parameterValue> </serviceBundleSpawning> <description>POTS-4 Fail and Retry Example</description> <serviceAction> <serviceActionName>C-ADD_POTS_LINE</serviceActionName> <includeOrderDataInResponse>true</includeOrderDataInResponse> <description>This Action will be failed and Retry</description> <serviceActionSpawningLogic> <alwaysCondition/> <expression>DN = 6794747</expression> </serviceActionSpawningLogic> <serviceActionParameterMapping> <parameterName>NE_ID</parameterName> <externalParameter> <parameterName>NE_ID</parameterName> </externalParameter> </serviceActionParameterMapping> <serviceActionParameterMapping> <parameterName>DN</parameterName> <externalParameter> <parameterName>DN</parameterName> <defaultValue>6792727</defaultValue> </externalParameter> </serviceActionParameterMapping> <serviceActionParameterMapping> <parameterName>LATA</parameterName> <externalParameter> <parameterName>LATA</parameterName> <defaultValue>236</defaultValue> </externalParameter> </serviceActionParameterMapping> <serviceActionParameterMapping> <parameterName>LCC</parameterName> <externalParameter> <parameterName>LTG</parameterName> <defaultValue>1</defaultValue> </externalParameter> </serviceActionParameterMapping> <serviceActionParameterMapping> <parameterName>LTG</parameterName> <externalParameter> <parameterName>LTG</parameterName> <defaultValue>1</defaultValue> </externalParameter> </serviceActionParameterMapping> <serviceActionParameterMapping> <parameterName>LEN</parameterName> <externalParameter> <parameterName>LEN</parameterName> <defaultValue>1010101</defaultValue> </externalParameter> </serviceActionParameterMapping> <serviceActionParameterMapping> <parameterName>OPT1</parameterName> <externalParameter> <parameterName>option1</parameterName> <defaultValue>CTR</defaultValue> </externalParameter> </serviceActionParameterMapping> <serviceActionParameterMapping> <parameterName>OPT2</parameterName> <externalParameter> <parameterName>option2</parameterName> <defaultValue>RETRY</defaultValue> </externalParameter> </serviceActionParameterMapping> </serviceAction> </serviceBundle> <serviceBundle> <serviceBundleActionName>POTS_5_EXIT_MAINTENACE_MODE_FORCE_DISCONNECT</serviceBundleActionName> <serviceBundleSpawning> <parameterName>BUNDLE_ID</parameterName> <parameterValue>POTS-5</parameterValue> </serviceBundleSpawning> <description>Exit Maintenace Mode - Force Disconnect</description> <serviceAction> <serviceActionName>C-ADD_POTS_LINE</serviceActionName> <includeOrderDataInResponse>true</includeOrderDataInResponse> <description>Exit Maintenace Mode - Force Disconnect</description> <serviceActionSpawningLogic> <equalsCondition> <parameterLabel>NE_ID</parameterLabel> <parameterValue>BEIJING</parameterValue> </equalsCondition> </serviceActionSpawningLogic> <serviceActionParameterMapping> <parameterName>NE_ID</parameterName> <externalParameter> <parameterName>NE_ID</parameterName> </externalParameter> </serviceActionParameterMapping> <serviceActionParameterMapping> <parameterName>DN</parameterName> <externalParameter> <parameterName>DN</parameterName> <defaultValue>6792727</defaultValue> </externalParameter> </serviceActionParameterMapping> <serviceActionParameterMapping> <parameterName>LATA</parameterName> <externalParameter> <parameterName>LATA</parameterName> <defaultValue>236</defaultValue> </externalParameter> </serviceActionParameterMapping> <serviceActionParameterMapping> <parameterName>LCC</parameterName> <externalParameter> <parameterName>LTG</parameterName> <defaultValue>1</defaultValue> </externalParameter> </serviceActionParameterMapping> <serviceActionParameterMapping> <parameterName>LTG</parameterName> <externalParameter> <parameterName>LTG</parameterName> <defaultValue>1</defaultValue> </externalParameter> </serviceActionParameterMapping> <serviceActionParameterMapping> <parameterName>LEN</parameterName> <externalParameter> <parameterName>LEN</parameterName> <defaultValue>1010101</defaultValue> </externalParameter> </serviceActionParameterMapping> <serviceActionParameterMapping> <parameterName>OPT1</parameterName> <externalParameter> <parameterName>OPT1</parameterName> <defaultValue>CTR</defaultValue> </externalParameter> </serviceActionParameterMapping> <serviceActionParameterMapping> <parameterName>OPT2</parameterName> <externalParameter> <parameterName>OPT2</parameterName> <defaultValue>MAINT</defaultValue> </externalParameter> </serviceActionParameterMapping> </serviceAction> </serviceBundle> <serviceBundle> <serviceBundleActionName>RAW-1_SEND_A RAW_COMMAND</serviceBundleActionName> <serviceBundleSpawning> <parameterName>BUNDLE_ID</parameterName> <parameterValue>RAW-1</parameterValue> </serviceBundleSpawning> <description>Sends a Raw Command to the SERVORD DMS Prompt</description> <serviceAction> <serviceActionName>C-RAW_COMMAND</serviceActionName> <includeOrderDataInResponse>true</includeOrderDataInResponse> <description>Query all Unassigned DNs in a Particular DN Range</description> <serviceActionSpawningLogic> <notDefinedCondition> <parameterName>OPT1</parameterName> </notDefinedCondition> </serviceActionSpawningLogic> <serviceActionParameterMapping> <parameterName>NE_ID</parameterName> <externalParameter> <parameterName>NE_ID</parameterName> </externalParameter> </serviceActionParameterMapping> <serviceActionParameterMapping> <parameterName>RAW_CMD</parameterName> <externalParameter> <parameterName>RAW_CMD</parameterName> <defaultValue>QDNSU R 5551000 5552000 ANCT S</defaultValue> </externalParameter> </serviceActionParameterMapping> </serviceAction> </serviceBundle> </srtServiceModel>
Sample translation.xml
<?xml version="1.0" encoding="UTF-8"?> <northBoundIntegration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\parameterMap.xsd"> <translation> <translationName>POTSTranslation</translationName> <translationScript>POTSTranslation.xslt</translationScript> <translationDispatch> <xpath> <xpath>//@name</xpath> <xpathReturn>POTS-Sample</xpathReturn> </xpath> </translationDispatch> </translation> <instance name="NCName"/> </northBoundIntegration>
Sample translation.xslt
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://java.sun.com/products/oss/xml/ServiceActivation" xmlns:sa="http://java.sun.com/products/oss/xml/ServiceActivation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mslv-sa="http://www.metasolv.com/oss/ServiceActivation/2003" xmlns:co="http://java.sun.com/products/oss/xml/Common" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:output method="xml" indent="yes" standalone="yes" media-type="xml"/> <xsl:template match="/"> <createOrderByValueRequest xmlns="http://java.sun.com/products/oss/xml/ServiceActivation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mslv-sa="http://www.metasolv.com/oss/ServiceActivation/2003" xmlns:co="http://java.sun.com/products/oss/xml/Common"> <orderValue xsi:type="mslv-sa:ASAPOrderValue"> <apiClientId>SRT</apiClientId> <orderKey> <co:applicationContext> <co:factoryClass/> <co:url/> <co:systemProperties/> </co:applicationContext> <co:applicationDN>System/ENV_ID/ApplicationType/ServiceActivation/Application/1-0;4-6;ASAP/Comp/</co:applicationDN> <co:type>javax.oss.order.CreateOrderValue</co:type> <primaryKey> <xsl:value-of select="//@serviceOrderId"/> </primaryKey> </orderKey> <priority>3</priority> <requestedCompletionDate>2003-06-11T12:00:00</requestedCompletionDate> <services> <parameter> <name>NE_ID</name> <value>TOR_REM2</value> </parameter> <parameter> <name>DN</name> <value> <xsl:value-of select="//number"/> </value> </parameter> <parameter> <name>LDATA</name> <value>236</value> </parameter> <parameter> <name>LCC</name> <value>1</value> </parameter> <parameter> <name>LTG</name> <value>1</value> </parameter> <parameter> <name>LEN</name> <value> <mslv-sa:value> <xsl:value-of select="//len"/> </mslv-sa:value> </value> </parameter> </services> <mslv-sa:parentKey> <co:applicationContext> <co:factoryClass/> <co:url/> <co:systemProperties/> </co:applicationContext> <co:applicationDN/> <co:type/> <primaryKey/> </mslv-sa:parentKey> <mslv-sa:origin>MetaSolv</mslv-sa:origin> <mslv-sa:organizationUnit>POTS</mslv-sa:organizationUnit> <mslv-sa:batchGroup/> <mslv-sa:rollbackState>rollback_not_required</mslv-sa:rollbackState> <mslv-sa:externalSystemId>MetaSolv-Pots</mslv-sa:externalSystemId> <mslv-sa:processType>IMMEDIATE</mslv-sa:processType> <mslv-sa:neId/> <mslv-sa:srqAction>REMOVE</mslv-sa:srqAction> <mslv-sa:infoParms/> <mslv-sa:extendedWoProperties/> </orderValue> </createOrderByValueRequest> </xsl:template> </xsl:stylesheet>
Sample Usage of XML and XPATH Parameters
The <xmlValue> and <xpathValue> tags in SRTServiceActivation.xsd support XML and XPATH parameters.There are three ways of passing parameters to a cartridge:
-
When parameters are passed in input work order. For example, suppose you want to pass the following work order.
<MetaSolv> <MetaSolvRequest name="POTS"> <NE_ID_UNICO-HIN>E_UNICO-HIN_1-0_HOST</NE_ID_UNICO-HIN> <TIME>2008-10-13T08:45:00</TIME> <BUNDLEID>PRODUCT_VALUE</BUNDLEID> <MSISDN>1234567890</MSISDN> <NUMBER>6742727</NUMBER> <LEN>1010202</LEN> <XMLparm> <X>123</X> </XMLparm> <XPATHparm>//XYZ</XPATHparm> <NEWINDEX>//welcome</NEWINDEX> <SCALARINDEX>14</SCALARINDEX> <INPARM>HOST_CLLI</INPARM> <RETURN_DATA_PREFIX> <x>dummywwww</x> </RETURN_DATA_PREFIX> </MetaSolvRequest> </MetaSolv>
You want to send XMLparm, RETURN_DATA_PREFIX, and XPATHparm parameters as XML and XPATH parameters respectively. For this, the cartridge developer has to create an XSLT that can extract the value of the XML parameter as an XML.Following is an example of XSLT fragment containing XPATH expression for extracting XML parameter:
<xmlValue><xsl:copy-of select="/MetaSolv/MetaSolvRequest/XMLparm/self::node()"></xsl:copy-of></xmlValue>
Following is an example of XSLT fragment containing XPATH expression for extracting XPATH parameter:
<xpathValue><xsl:value-of select="//XPATHparm"/></xpathValue>
-
When the value of XML and XPATH parameter is not available in the work order, and some default value is defined in the cartridge, then the value defined in the cartridge will be used while processing the work order.
-
The value of a parameter can also be fetched from lookup. If a lookup returns the XML as a result, then you need to be careful while using the XPATHs on the lookup. Currently, the XPATH expression is used only to fetch the result of the lookup. This applies for XML and XPATH parameters too. Do not extend the current behavior of the XPATH expression to extract a part of the result or modify the result.