Oracle8i Application Developer's Guide - XML Release 3 (8.1.7) Part Number A86030-01 |
|
B2B XML Application: Step by Step , 18 of 32
See Figure 13-5 for the detailed procedural flow of the B2B XML application.
SS.bat
.
Stylesheet Batch File: SS.bat
@echo off @echo Stylesheet Util D:\jdev31\java\bin\java -mx50m -classpath "D:\xml817\references\olivier_new; D:\jdev31\lib\jdev-rt.zip; D:\jdev31\jdbc\lib\oracle8.1.6\classes111.zip; D:\jdev31\lib\connectionmanager.zip; D:\jdev31\lib; D:\jdev31\lib\oraclexsql.jar; D:\jdev31\lib\oraclexmlsql.jar; D:\jdev31\lib\xmlparserv2_2027.jar; D:\jdev31\jfc\lib\swingall.jar; D:\jdev31\jswdk-1.0.1\lib\servlet.jar; D:\Ora8i\rdbms\jlib\aqapi11.jar; D:\Ora8i\rdbms\jlib\aqapi.jar; D:\XMLWorkshop\xmlcomp.jar; D:\jdev31\java\lib\classes.zip" B2BDemo.StyleSheetUtil.GUIStylesheet
Using this utility you can browse the actual table, Stylesheets
, in which the stylesheets are stored. These stylesheets are used by the AQ Broker-Transformer to process the documents it received. See Figure 13-7.
The three batch files for the Retailer, AQ Broker-Transformer (Broker), and Supplier applications are listed here:
retailer.bat
@echo off @echo Retail Side D:\jdev31\java\bin\java -mx50m -classpath "D:\xml817\references\Ora817DevGuide; D:\jdev31\lib\jdev-rt.zip; D:\jdev31\jdbc\lib\oracle8.1.6\classes111.zip; D:\jdev31\lib\connectionmanager.zip; D:\jdev31\lib; D:\jdev31\lib\oraclexsql.jar; D:\jdev31\lib\oraclexmlsql.jar; D:\jdev31\lib\xmlparserv2_2027.jar; D:\jdev31\jfc\lib\swingall.jar; D:\jdev31\jswdk-1.0.1\lib\servlet.jar; D:\Ora8i\rdbms\jlib\aqapi11.jar; D:\Ora8i\rdbms\jlib\aqapi.jar; D:\XMLWorkshop\xmlcomp.jar; D:\jdev31\java\lib\classes.zip" B2BDemo.Retailer.UpdateMaster -step=1000 -verbose=y -dbURL=jdbc:oracle:thin:@atp-1.us.oracle.com:1521:ORCL
broker.bat
@echo off @echo Broker D:\jdev31\java\bin\java -mx50m -classpath "D:\xml817\references\Ora817DevGuide; D:\jdev31\lib\jdev-rt.zip; D:\jdev31\jdbc\lib\oracle8.1.6\classes111.zip; D:\jdev31\lib\connectionmanager.zip; D:\jdev31\lib;D:\jdev31\lib\oraclexsql.jar; D:\jdev31\lib\oraclexmlsql.jar; D:\jdev31\lib\xmlparserv2_2027.jar; D:\jdev31\jfc\lib\swingall.jar; D:\jdev31\jswdk-1.0.1\lib\servlet.jar; D:\Ora8i\rdbms\jlib\aqapi11.jar; D:\Ora8i\rdbms\jlib\aqapi.jar; D:\XMLWorkshop\xmlcomp.jar; D:\jdev31\java\lib\classes.zip" B2BDemo.Broker.MessageBroker -step=1000 -verbose=y
supplier.bat
@echo off @echo Supplier D:\jdev31\java\bin\java -mx50m -classpath "D:\xml817\references\Ora817DevGuide; D:\jdev31\lib\jdev-rt.zip; D:\jdev31\jdbc\lib\oracle8.1.6\classes111.zip; D:\jdev31\lib\connectionmanager.zip; D:\jdev31\lib;D:\jdev31\lib\oraclexsql.jar; D:\jdev31\lib\oraclexmlsql.jar; D:\jdev31\lib\xmlparserv2_2027.jar; D:\jdev31\jfc\lib\swingall.jar; D:\jdev31\jswdk-1.0.1\lib\servlet.jar; D:\Ora8i\rdbms\jlib\aqapi11.jar; D:\Ora8i\rdbms\jlib\aqapi.jar; D:\XMLWorkshop\xmlcomp.jar; D:\jdev31\java\lib\classes.zip" B2BDemo.Supplier.SupplierWatcher -step=1000 -verbose=y -dbURL=jdbc:oracle:thin:@atp-1.us.oracle.com:1521:ORCL
<?xml version="1.0"?> <!-- | Second script to be called. | Check if the user in known in the database. | $Author: olediour@us $ | $Revision: 1.1 $ +--> <?xml-stylesheet type="text/xsl" media="HandHTTP" href="PP.xsl"?> <?xml-stylesheet type="text/xsl" media="Mozilla" href="HTML.xsl"?> <loginResult xmlns:xsql="urn:oracle-xsql" connection="retail" custName="XXX"> <pageTitle>Hi-Tech Mall</pageTitle> <xsql:query tag-case="upper"> <![CDATA[ select C.ID, C.NAME from CUSTOMER C where Upper(C.NAME) = Upper('{@custName}') ]]> <xsql:no-rows-query> Select '{@custName}' as "unknown" from dual </xsql:no-rows-query> </xsql:query> <nextStep>inventory.xsql</nextStep> <returnHome>index.xsql</returnHome> </loginResult>
This XSQL script calls the following XSL scripts:
<?xml version="1.0"?> <!-- | This is the entry point in the application. | Notice that this script does not access the database. | $Author: olediour@us $ | $Revision: 1.1 $ +--> <?xml-stylesheet type="text/xsl" media="HandHTTP" href="PP.xsl"?> <?xml-stylesheet type="text/xsl" media="Mozilla" href="HTML.xsl"?> <index xmlns:xsql="urn:oracle-xsql"> <pageTitle>Hi-Tech Mall</pageTitle> <form action="getLogged.xsql" method="post"> <field type="text" name="custName" prompt="Your ID"/> <button type="submit" label="Log In"/> </form> </index>
<?xml version="1.0"?> <!-- | This is the third script called. | It produces the catalog from the Retailer's database. | | $Author: olediour@us $ | $Revision: 1.1 $ +--> <?xml-stylesheet type="text/xsl" media="HandHTTP" href="PP.xsl"?> <?xml-stylesheet type="text/xsl" media="Mozilla" href="HTML.xsl"?> <inventory xmlns:xsql="urn:oracle-xsql" connection="retail" custId="000"> <pageTitle>Hi-Tech Mall</pageTitle> <form action="order.xsql" method="post"> <hiddenFields> <xsql:include-param name="custId"/> </hiddenFields> <theMart> <xsql:query tag-case="upper"> <![CDATA[ select I.ID, I.DESCRIPTION, I.PRICE, S.NAME from INVENTORY_ITEM I, SUPPLIER S where I.SUPPLIER_ID = S.ID ]]> <xsql:no-rows-query> Select 'No items !' as "Wow" from dual </xsql:no-rows-query> </xsql:query> </theMart> </form> <returnHome>index.xsql</returnHome> </inventory>
<?xml version="1.0"?> <!-- | This is the fourth script called. | It prompts you to enter a quantity. | | $Author: olediour@us $ | $Revision: 1.1 $ +--> <?xml-stylesheet type="text/xsl" media="HandHTTP" href="PP.xsl"?> <?xml-stylesheet type="text/xsl" media="Mozilla" href="HTML.xsl"?> <order xmlns:xsql="urn:oracle-xsql" connection="retail" custId="000" prodId="000"> <pageTitle>Hi-Tech Mall</pageTitle> <xsql:query tag-case = "upper" rowset-element= "" row-element = "cust"> <![CDATA[ select C.ID, C.NAME from CUSTOMER C where C.ID = '{@custId}' ]]> <xsql:no-rows-query> Select '{@custId}' as "unknown" from dual </xsql:no-rows-query> </xsql:query> <xsql:query tag-case="upper" rowset-element="" row-element="prod"> <![CDATA[ select I.ID, I.DESCRIPTION, I.PRICE, S.NAME from INVENTORY_ITEM I, SUPPLIER S where I.SUPPLIER_ID = S.ID and I.ID = '{@prodId}' ]]> <xsql:no-rows-query> Select '{@prodId}' as "unknown" from dual </xsql:no-rows-query> </xsql:query> <returnHome>index.xsql</returnHome> </order>
|
Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
|