WebSphere brand IBM WebSphere Premises Server, Version 6.1.x

Configuration samples for print profile support

Use these sample files for print profile support.

Sample XML generated from the printer driver before the XSL transformation

<?xml version="1.0" encoding="UTF-8"?>
<labels _PRINTERNAME="P4" _JOBNAME="1191438711797">
<label _FORMAT="file://SampleCase.zpl">
<variable name="epcdata">sgtin-64:2.1234567.100150.2</variable>
<variable name="manufacturername">Widget Makers, Inc.</variable>
<variable name="barcodedata">11234567001507</variable>
<variable name="EPC">907ce30e6c000002</variable>
<variable name="productquantity">50</variable>
<variable name="productname">Widgets</variable>
<variable name="productdescription">1/2 inch Steel Widgets</variable>
<variable name="manufacturerid">098574</variable>
</label>
</labels>

Sample XSLT to transform the XML generated by the printer driver

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="yes" method="xml"/>
<xsl:param name="attribute" select="'_PRINTERNAME'" />   
<xsl:param name="newvalue" select="'P10XXX'"/>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<!-- This is a generic search replace of attribute values --> 
<xsl:template match="@*" >
<xsl:attribute name="{name()}">
<xsl:choose>
<xsl:when test="(name()=$attribute)"><xsl:value-of select="$newvalue"/></xsl:when>
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:template>
</xsl:stylesheet>

Sample XML file after transformation

<?xml version="1.0" encoding="UTF-8"?>
<labels _PRINTERNAME="P10XXX" _JOBNAME="1191438711797">
<label _FORMAT="file://SampleCase.zpl">
<variable name="epcdata">sgtin-64:2.1234567.100150.2</variable>
<variable name="manufacturername">Widget Makers, Inc.</variable>
<variable name="barcodedata">11234567001507</variable>
<variable name="EPC">907ce30e6c000002</variable>
<variable name="productquantity">50</variable>
<variable name="productname">Widgets</variable>
<variable name="productdescription">1/2 inch Steel Widgets</variable>
<variable name="manufacturerid">098574</variable>
</label>
</labels>

Sample XML to define the printer device metadata

Note: If you would like to get a device configuration group name from the metadata published to the WebSphere® Application Server SIBus, the key name is DEVICE_CONFIGURATION_GROUP_NAME.
<?xml version="1.0" encoding="UTF-8"?>
<ibmrfidconfigadmin:configurationAdmin dest="prem" dts="2001-12-31T12:00:00"
    orig="dms" version="" xmlns:ibmrfidconfigadmin="http://www.ibm.com"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.ibm.com IBMRFIDConfigAdmin.xsd ">
<requests>
<request type="update">
<serverconfigurations>
<categories>
<category config-group-type="DeviceType" name="Printer">
<category-metadata defaultvalue="rr" name="Print XML Location URL" />
<category-metadata defaultvalue="rr" name="XSLT File URL" />
</category>
</categories>
</serverconfigurations>
</request>
</requests>
</ibmrfidconfigadmin:configurationAdmin>

Sample XML to update the print job status

Tip: Replace the variable, printer name, with the name of your printer.
<CommonBaseEvent creationTime="2008-04-25T19:28:54.781Z" globalInstanceId="123456789" 
priority="50" version="1.0.1">
<extendedDataElements name="ibmse_payloadMetaData" type="noValue"> 
</extendedDataElements> 
<extendedDataElements name="ibmse_payload" type="string"> 
<values>com.ibm.sensorevent.model.payload.Payload</values> 
<children name="ibmse/printer name/RfidWrite/signal/labelprint/job/status" type="noValue"> 
<children name="STATUS" type="string"> 
<values>PRINT: Submitted Job</values> 
</children>                      
<children name="JobID" type="string"> 
<values>1208787033984</values> 
</children> 
</children> 
</extendedDataElements> 
<situation categoryName="ReportSituation"> 
<situationType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ReportSituation" 
  reasoningScope="EXTERNAL" reportCategory="LOG"/> 
</situation> 
<CommonBaseEvent>

Sample XML to update tag status

Tip: Replace the variable, printer name, with the name of your printer.
<CommonBaseEvent creationTime=" 2008-04-25T19:28:54.781Z" globalInstanceId="123456789" 
priority="50" version="1.0.1">
<extendedDataElements name="ibmse_payloadMetaData" type="noValue"> 
</extendedDataElements>
<extendedDataElements name="ibmse_payload" type="string"> 
<values>com.ibm.sensorevent.model.payload.Payload</values> 
<children name="ibmse/printer name/RfidWrite/signal/labelprint/tag/status" type="noValue"> 
<children name="STATUS" type="string"> 
<values>PRINT: Submitted Job</values> 
</children>                      
<children name="TAGID" type="string"> 
<values>1208787033984</values> 
</children>  
</children> 
</extendedDataElements> 
<situation categoryName="ReportSituation"> 
<situationType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ReportSituation" 
  reasoningScope="EXTERNAL" reportCategory="LOG"/> 
</situation> 
<CommonBaseEvent>

Sample servlet URL to update the print job status

The parameters marked in bold type are required, and the following variables should be replaced with the correct values for your environment.

http://Premises_Server:9080/ibmse/eventpublish?eventType=RfidWrite/signal/labelprint/job/status&eventTopic=ibmse/device_ID/RfidWrite/signal/labelprint/job/status &eventXml=<CommonBaseEvent><extendedDataElements name="ibmse_payloadMetaData" type="noValue"></extendedDataElements><extendedDataElements name="ibmse_payload" type="string"><values>com.ibm.sensorevent.model.payload.Payload</values><children name="RfidWrite/signal/labelprint/job/status" type="noValue"><children name="STATUS" type="string"><values>status of print job</values></children><children name="JOBID" type="string"><values>job_ID</values></children></children></extendedDataElements></CommonBaseEvent>

Sample servlet URL to update tag status

The parameters marked in bold type are required, and the following variables should be replaced with the correct values for your environment.

http://Premises_Server:9080/ibmse/eventpublish?eventType=RfidWrite/signal/labelprint/tag/status&eventTopic=ibmse/device_ID/RfidWrite/signal/labelprint/tag/status &eventXml=<CommonBaseEvent><extendedDataElements name="ibmse_payloadMetaData" type="noValue"></extendedDataElements><extendedDataElements name="ibmse_payload" type="string"><values>com.ibm.sensorevent.model.payload.Payload</values><children name="RfidWrite/signal/labelprint/tag/status" type="noValue"><children name="STATUS" type="string"><values>status of tag</values></children><children name="TAGID" type="string"><values>tag_ID</values></children></children></extendedDataElements></CommonBaseEvent>


Library | Support | Terms of use

(c) Copyright IBM Corporation 2004, 2008. All rights reserved.
U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.