Oracle8i Application Developer's Guide - XML
Release 3 (8.1.7)

Part Number A86030-01

Library

Product

Contents

Index

Go to previous page Go to beginning of chapter Go to next page

B2B: How iProcurement Uses XML to Offer Multiple Catalog Products to Users, 11 of 16


Order Line XML Definition

Use the XML schema below as a template for formatting the data elements discussed in the previous section. The XML file will be passed through the Oracle XML parser which will extract the data and create requisition lines in iProcurement.

Please note that, although not explicitly stated in the schema, all attribute values should be enclosed in single quotes. For example, the schema statement:

<attribute name="categoryCodeIdentifier" atttype="ENUMERATION" values "SPSC 
SUPPLIER BUYER"/>

should result in the following XML statement:

<category categoryCodeIdentifier='SPSC'>

Enclose All Data in CDATA Tags

All data must be enclosed in CDATA tags. Because data can contain special characters - single quotes, double quotes, and so on, this is necessary to ensure data integrity for and during parsing. For example, the schema statement:

<elementType id="manufacturerName">
     <string/>
     <description>the name of the manufacturer</description>
</elementType>

should result in the following XML statement:

<manufacturerName><![CDATA[Bob's Factory]]></manufacturerName>

iProcurement Example 8: Order Line XML Schema

<?xml version='1.0'?>
<s:schema id='OrderLinesDataItems'>
<elementType id="catalogTradingPartner">
     <string/>
     <description>Unique trading partner code in requisition 
system</description>
</elementType>

<elementType id="contractNumber">
     <string/>
     <description>contract in which the item exists</description>
</elementType>
<elementType id="buyerContractLineNum">
     <string/>
     <description> line number of the item on the buyer contract </description>
</elementType>
<elementType id="catalogType">				
     <string/>
     <description>catalog type: CONTRACTED/NONCONTRACTED</description>
</elementType>
<elementType id="supplierContract">
     <elementType ="#contractNumber"/>
     <description>supplier contract identifier for the line item </description>
</elementType>
<elementType id="buyerContract">
     <elementType ="#contractNumber"/>
     <description>buyer contract identifier for the line item </description>
</elementType>
<elementType id="contract">
     <attribute name=" contractNumberIdentifier" atttype="ENUMERATION" values=  
"KNOWN UNKNOWN INFORMATIONAL NONE"/>
     <group groupOrder="OR">
          <elementType ="#supplierContract"/>
          <elementType ="#buyerContract"/>
          <elementType ="#buyerContractLineNumber"/>
          <elementType ="#catalogType" occurs "OPTIONAL "/>
     </group>
     <description>contract information for the line item </description>
</elementType>

<elementType id="itemID">			
     <string/>
     <description>the item number in the chosen catalog/system</description>
</elementType>
<elementType id=" supplierItemNumber">
     <elementType ="#itemID"/>
     <description>supplier item number information</description>
</elementType>
<elementType id="manufacturerName">
     <string/>
     <description>the name of the manufacturer</description>
</elementType>
<elementType id=" manufacturerItemNumber">
     <elementType ="#itemID"/>
     <elementType ="#manufacturerName"/>
     <description>manufacturer item number information</description>
</elementType>
<elementType id="buyerItemRevision">
     <string/>
     <description> the buyer's item revision code(optional)</description>
</elementType>
<elementType id="buyerItemNumber">
     <elementType ="#itemID"/>
     <elementType ="#buyerItemRevision"/>
     <description>buyer item number information</description>
</elementType>
<elementType id="itemNumber">				
     <group groupOrder="OR">
          <elementType ="#supplierItemNumber"/>
          <elementType ="#manufacturerItemNumber"/>
          <elementType ="#buyerItemNumber"/>
     </group>
     <description>the item number in the chosen catalog/system</description>
</elementType>
<elementType id="itemDescription">				
     <string/>
     <description>the description of the item</description>
</elementType>
<elementType id="quantity">
     <number/>
     <description> quantity of the item (optional)</description>
</elementType>
<elementType id="buyerUnitOfMeasure">
     <string/>
     <description> unit of measure of the item on buyer system</description>
</elementType>
<elementType id="supplierUOMType">
     <string/>
     <description> unit of measure of the item on supplier system</description>
</elementType>
<elementType id="supplierUOMQuantity">
     <number/>
     <description> quantity associated with supplier unit of measure 
(optional)</description>
</elementType>
<elementType id="supplierUnitOfMeasure">
     <elementType ="#supplierUOMType"/>
     <elementType ="#supplierUOMQuantity" occurs "OPTIONAL "/>
     <description> item information on supplier system equivalent to buyer unit 
of measure</description>
</elementType>
<elementType id="UnitOfMeasure">
     <group groupOrder="OR">
          <elementType ="#buyerUnitOfMeasure"/>
          <elementType ="#supplierUnitOfMeasure"/>
</group>
     <description> unit of measure of the item</description>
</elementType>
<elementType id="hazardClass">
     <string/>
     <description> the hazard class ID  (optional)</description>
</elementType>
<elementType id="item"> 
     <attribute name ="lineType" atttype="ENUMERATION" values= "GOODS 
AMOUNTBASEDSERVICES RATEBASEDSERVICES " default="GOODS">
     <elementType ="#itemNumber"/>
     <elementType ="#itemDescription"/>
     <elementType ="#quantity" occurs "OPTIONAL ">
          <default>1</default>
     <elementType>
     <elementType ="#unitOfMeasure" />
     <elementType ="#hazardClass" occurs "OPTIONAL "/>
     <description>identifies the item</description>
</elementType>

<elementType id="categoryCode">
     <string/>
     <description>the code for the category</description>
</elementType>
<elementType id="category">
     <attribute name="categoryCodeIdentifier" atttype="ENUMERATION" values "SPSC 
SUPPLIER BUYER"/>
     <elementType ="#categoryCode"/>
     <description>indicates item source catalog & category code</description>
</elementType>

<elementType id="currency">
     <string/>
     <description>ISO currency code</description>
</elementType>
<elementType id="unitPrice">
     <number/>
     <description>the price per unit of measure</description>
</elementType>
<elementType id="rateDate">
     < date/>
     <description> date of rate shown</description>
</elementType>
<elementType id="rateType">
     < String/>
     <description> type of rate</description>
</elementType>
<elementType id="rate">
     <attribute name="rateDefinition" atttype="ENUMERATION" values "FUNCTIONAL 
CONTRACT SUPPLIER BUYER"/>
     < number/>
     <elementType ="#rateDate"/>
     <elementType ="#rateType"/>
     <description> conversion rate between currencies</description>
</elementType>
<elementType id="price">
     <elementType ="#currency"/>
     <elementType ="#unitPrice"/>
     <elementType ="#rate" occurs "OPTIONAL "/>
     <description>item unit price in appropriate currency</description>
</elementType>

<elementType id="supplierSite">
     <string/>
     <description>the supplier's site</description>
</elementType>
<elementType id="supplierDUNS">
     <string/>
     <description>the supplier's DUNS number</description>
</elementType>
<elementType id="supplierName">
     <string/>
     <elementType ="#supplierSite"/>
     <description>the supplier's name</description>
</elementType>
<elementType id="supplierNumber">
     <number/>
     <elementType ="#supplierSite"/>
     <description>supplier number as described in buyer system</description>
</elementType>
<elementType id="supplierTradingPartner">
     <string/>
     <description>supplier trading partner code</description>
</elementType>
<elementType id="contactName">
     <string/>
     <description> contact person at supplier site</description>
</elementType>
<elementType id="contactPhone">				
     <string/>
     <description>phone number of contact</description>
</elementType>
<elementType id="supplier">
     <group groupOrder="OR">
          <elementType ="#supplierDUNS"/>
          <elementType ="#supplierName"/>
          <elementType ="#supplierNumber"/>
          <elementType ="#supplierTradingPartner"/>
     </group>
     <elementType ="#contactName" occurs "OPTIONAL "/>
     <elementType ="#contactPhone" occurs "OPTIONAL "/>
     <description>identifies suppliers</description>
</elementType>

<elementType id="languageCode">				
     <string/>
     <description>the language code</description>
</elementType>
<elementType id="language">				
     <elementType ="#languageCode" occurs "OPTIONAL "/>
     <description>language used to enter information for this item</description>
</elementType>

<elementType id="attribute1">				
     <string/>
     <description>optional extra line attribute</description>
</elementType>
<elementType id="attribute2">				
     <string/>
     <description>optional extra line attribute</description>
</elementType>
<elementType id="attribute3">				
     <string/>
     <description>optional extra line attribute</description>
</elementType>
<elementType id="attribute4">				
     <string/>
     <description>optional extra line attribute</description>
</elementType>
<elementType id="attribute5">				
     <string/>
     <description>optional extra line attribute</description>
</elementType>
<elementType id="attribute6">				
     <string/>
     <description>optional extra line attribute</description>
</elementType>
<elementType id="attribute7">				
     <string/>
     <description>optional extra line attribute</description>
</elementType>
<elementType id="attribute8">				
     <string/>
     <description>optional extra line attribute</description>
</elementType>
<elementType id="attribute9">				
     <string/>
     <description>optional extra line attribute</description>
</elementType>
<elementType id="attribute10">				
     <string/>
     <description>optional extra line attribute</description>
</elementType>
<elementType id="attribute11">				
     <string/>
     <description>optional extra line attribute</description>
</elementType>
<elementType id="attribute12">				
     <string/>
     <description>optional extra line attribute</description>
</elementType>
<elementType id="attribute13">				
     <string/>
     <description>optional extra line attribute</description>
</elementType>
<elementType id="attribute14">				
     <string/>
     <description>optional extra line attribute</description>
</elementType>
<elementType id="attribute15">				
     <string/>
     <description>optional extra line attribute</description>
</elementType>
<elementType id="additionalAttributes">
     <elementType ="#attribute1" occurs "OPTIONAL "/>
     <elementType ="#attribute2" occurs "OPTIONAL "/>
     <elementType ="#attribute3" occurs "OPTIONAL "/>
     <elementType ="#attribute4" occurs "OPTIONAL "/>
     <elementType ="#attribute5" occurs "OPTIONAL "/>
     <elementType ="#attribute6" occurs "OPTIONAL "/>
     <elementType ="#attribute7" occurs "OPTIONAL "/>
     <elementType ="#attribute8" occurs "OPTIONAL "/>
     <elementType ="#attribute9" occurs "OPTIONAL "/>
     <elementType ="#attribute10" occurs "OPTIONAL "/>
     <elementType ="#attribute11" occurs "OPTIONAL "/>
     <elementType ="#attribute12" occurs "OPTIONAL "/>
     <elementType ="#attribute13" occurs "OPTIONAL "/>
     <elementType ="#attribute14" occurs "OPTIONAL "/>
     <elementType ="#attribute15" occurs "OPTIONAL "/>
     <description>additional information about the item</description>
</elementType>

<elementType id="orderLine">
     <elementType ="#contract"/> 
     <elementType ="#item"/>
     <elementType ="#category"/> 
     <elementType ="#price"/>
     <elementType ="#supplier"/> 
     <elementType ="#language"/> 
     <elementType ="#additionalAttributes"/>
     <description>Order line sent to requisition server</description>
</elementType>

<elementType id="OrderLinesDataElements">
     <elementType ="#catalogTradingPartner"/>
     <elementType ="#orderLine" occurs "ZEROORMORE"/>
     <description>complete order line sent to requisition server</description>
</elementType>
</s:schema>


Note:

In this example, the `catalogTradingPartner' in the XML header maps to the `catalog source' field for each requisition line. 


For an explanation of all the terms used in the schema, see the XML Data Spec: http://www.w3.org/TR/1998/NOTE-XML-data-0105/

Oracle tailored several definitions, for example enumeration. Enumeration is used as a case statement switch in some elements of the above schema. This decides what data the element will contain. For example, in "contract" the enumerated attribute value can be either KNOWN, UNKNOWN, INFORMATIONAL or NONE. It is these values that decide what the element will contain as values.

iProcurement Example 9: XML -- One Order Line for the Full Schema Specification

This is an example of one order line covering the full schema specification including optional tags. It has approximately 50 tags and is 2.5K bytes.

<?xml version='1.0'?>
<OrderLinesDataElements xml:lang='EN-US'>
<catalogTradingPartner><![CDATA[ABCCatalogServices]]></catalogTradingPartner>
<orderLine>
<contract contractNumberIdentifier='KNOWN'>
    <supplierContract>
        <contractNumber><![CDATA[12323634634]]></contractNumber>
    </supplierContract>
    <buyerContract>
        <contractNumber><![CDATA[987654321]]></contractNumber>
    </buyerContract>
    <buyerContractLineNumber><![CDATA[99]]></buyerContractLineNumber>
    <catalogType><![CDATA[CONTRACTED]]></catalogType>
</contract>

<item lineType='GOODS'>
    <itemNumber>
       <supplierItemNumber>
            <itemID><![CDATA[B1324]]></itemID>
       </supplierItemNumber>
       <manufacturerItemNumber>
            <itemID><![CDATA[X456]]></itemID>
            <manufacturerName><![CDATA[Bob's Factory]]></manufacturerName>
        </manufacturerItemNumber>
        <buyerItemNumber>
            <itemID><![CDATA[2222XY]]></itemID>
            <buyerItemRevision><![CDATA[4]]></buyerItemRevision>
        </buyerItemNumber>
    </itemNumber>
    <itemDescription><![CDATA[Purple and Red]]></itemDescription>
    <quantity><![CDATA[999]]></quantity>
    <unitOfMeasure>
        <buyerUnitOfMeasure><![CDATA[ea]]></buyerUnitOfMeasure>
        <supplierUnitOfMeasure>
           <supplierUOMType ><![CDATA[each]]></supplierUOMType>
           <supplierUOMQuantity><![CDATA[1]]></supplierUOMQuantity>
        </supplierUnitOfMeasure>
    </unitOfMeasure>
    <hazardClass><![CDATA[2768]]></hazardClass>  
</item>

<category categoryCodeIdentifier='SPSC'>
    <categoryCode><![CDATA[5149-9908-00]]></categoryCode>
</category>

<price>
    <currency><![CDATA[USD]]></currency>
    <unitPrice><![CDATA[50.99]]></unitPrice>
    <rate rateDefinition='CONTRACT'>
        <rateDate><![CDATA[19981210]]></rateDate>
        <rateType><![CDATA[corporate]]></rateType>
    </rate>
</price>

<supplier>
    <supplierName><![CDATA[ACME Hot Air Balloons]]></supplierName>
    <supplierSite><![CDATA[Kinshasa]]></supplierSite>
    <supplierTradingPartner><![CDATA[Traders R Us</supplierTradingPartner>
    <contactName><![CDATA[Ramanujam Kondetimmanahalli]]></contactName>
    <contactPhone><![CDATA[3015061111]]></contactPhone>
</supplier>

<language>
    <languageCode><![CDATA[AmEnglish]]></languageCode>
</language>

<additionalAttributes>
    <attribute1><![CDATA[additional information 1 ]]></attribute1>
    <attribute2><![CDATA[additional information 2 ]]></attribute2>
    <attribute3><![CDATA[additional information 3 ]]></attribute3>
    <attribute4><![CDATA[additional information 4 ]]></attribute4>
    <attribute5><![CDATA[additional information 5 ]]></attribute5>
    <attribute6><![CDATA[additional information 6 ]]></attribute6>
    <attribute7><![CDATA[additional information 7 ]]></attribute7>
    <attribute8><![CDATA[additional information 8 ]]></attribute8>
    <attribute9><![CDATA[additional information 9 ]]></attribute9>
    <attribute10><![CDATA[additional information 10]]></attribute10>
    <attribute11><![CDATA[additional information 11]]></attribute11>
    <attribute12><![CDATA[additional information 12]]></attribute12>
    <attribute13><![CDATA[additional information 13]]></attribute13>
    <attribute14><![CDATA[additional information 14]]></attribute14>
    <attribute15><![CDATA[additional information 15]]></attribute15>
</additionalAttributes>

</orderLine>
</OrderLinesDataElements>

iProcurement Example 10: XML -- Two-Item Transaction Example

This is an example of a typical two-item transaction with the following items:

"ABC Catalog Services" is the external third party catalog service sending the data for the two items into the Oracle system. For both items, the following data is provided:

UN/SPSC is the category code used for both items.

<?xml version='1.0'?>
<OrderLinesDataElements>
<catalogTradingPartner><![CDATA[ABCCatalogServices]]></catalogTradingPartner>

<orderLine>
<contract contractNumberIdentifier='KNOWN'>
    <supplierContract>
        <contractNumber><![CDATA[111111112767-1]]></contractNumber>
        <contractLineNumber><![CDATA[12]]></contractLineNumber>
    </supplierContract>
</contract>

<item lineType='GOODS'>
    <itemNumber>
       <supplierItemNumber>
            <itemID><![CDATA[C13139]]></itemID>
       </supplierItemNumber>
</itemNumber>
    <itemDescription><![CDATA[Hard drive-540MB IDE]]></itemDescription>
    <quantity><![CDATA[34]]></quantity>
    <unitOfMeasure>
         <supplierUnitOfMeasure>
            <supplierUOMType ><![CDATA[Each]]></supplierUOMType>
            <supplierUOMQuantity><![CDATA[1]]></supplierUOMQuantity>
         </supplierUnitOfMeasure>
    </unitOfMeasure>
</item>

<category categoryCodeIdentifier='SPSC'>
    <categoryCode><![CDATA[5149-9908-00]]></categoryCode>
</category>

<price>
    <currency><![CDATA[USD]]></currency>
    <unitPrice><![CDATA[485.99]]></unitPrice>
</price>

<supplier>
    <supplierName><![CDATA[A-1 Lighting]]></supplierName>
    <supplierSite><![CDATA[Washington]]></supplierSite>
</supplier>
</orderLine>

<orderLine>
<contract contractNumberIdentifier='KNOWN'>
    <supplierContract>
        <contractNumber><![CDATA[222222225678-2]]></contractNumber>
        <contractLineNumber><![CDATA[15]]></contractLineNumber>
    </supplierContract>
</contract>

<item lineType='GOODS'>
    <itemNumber>
       <supplierItemNumber>
            <itemID><![CDATA[P22378]]></itemID>
       </supplierItemNumber>
</itemNumber>
    <itemDescription><![CDATA[High speed assembly machine]]></itemDescription>
    <quantity><![CDATA[9]]></quantity>
    <unitOfMeasure>
         <supplierUnitOfMeasure>
             <supplierUOMType ><![CDATA[Each]]></supplierUOMType>
             <supplierUOMQuantity><![CDATA[1]]></supplierUOMQuantity>
         </supplierUnitOfMeasure>
    </unitOfMeasure>
</item>

<category categoryCodeIdentifier='SPSC'>
    <categoryCode><![CDATA[5149-9908-00]]></categoryCode>
</category>

<price>
    <currency><![CDATA[USD]]></currency>
    <unitPrice><![CDATA[12575.99]]></unitPrice>
</price>

<supplier>
    <supplierName><![CDATA[JCN Technologies]]></supplierName>
    <supplierSite><![CDATA[New York]]></supplierSite>
</supplier>

</orderLine>
</OrderLinesDataElements>

Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2000, Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index