net.sourceforge.saxadapter.examples.commerce
Class OrderProcessor
java.lang.Object
|
+--net.sourceforge.saxadapter.examples.commerce.OrderProcessor
- public class OrderProcessor
- extends java.lang.Object
This class processes e-commerce orders in the XCBL 3.5 format and converts
them into Order objects
- Author:
- Mark Priest
Method Summary |
static void |
main(java.lang.String[] args)
This main method takes an argument of the path of an XML file in the JVM
classpath which represent an XCBL 3.5 OrderRequest and writes out the
OrderResponse. |
Order |
processXCBL35Order(org.xml.sax.InputSource argIn)
This method takes an InputSource that represents an order in
XCBL 3.5 format and converts it to an Order object |
Order |
processXCBL35Order(org.xml.sax.InputSource argIn,
java.io.Writer argWriter)
This method takes an InputSource that represents an order in
XCBL 3.5 format and converts it to an Order object and also creates
an XCBL 3.5 OrderResponse document to be returned to the buyer |
static void |
usage(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XCBL35NAMESPACE
public static final java.lang.String XCBL35NAMESPACE
ORDER_DATE_FORMAT
public static final java.lang.String ORDER_DATE_FORMAT
m_parserAdapter
SAXAdapter m_parserAdapter
m_writerAdapter
SAXAdapter m_writerAdapter
m_writerHandler
XCBLResponseWriter m_writerHandler
m_orderHandler
OrderHandler m_orderHandler
m_orderAddressHandler
OrderAddressHandler m_orderAddressHandler
m_orderContactHandler
OrderContactHandler m_orderContactHandler
m_orderContactNumHandler
OrderContactNumHandler m_orderContactNumHandler
m_orderPartyHandler
OrderPartyHandler m_orderPartyHandler
m_orderReferenceHandler
OrderReferenceHandler m_orderReferenceHandler
m_orderLineItemHandler
OrderLineItemHandler m_orderLineItemHandler
m_orderPartNumHandler
OrderPartNumHandler m_orderPartNumHandler
OrderProcessor
public OrderProcessor()
throws org.xml.sax.SAXException
processXCBL35Order
public Order processXCBL35Order(org.xml.sax.InputSource argIn)
throws org.xml.sax.SAXException,
java.io.IOException
- This method takes an InputSource that represents an order in
XCBL 3.5 format and converts it to an Order object
- Parameters:
argIn
- the order in XCBL 3.5 format- Throws:
SAXException,
- IOException
processXCBL35Order
public Order processXCBL35Order(org.xml.sax.InputSource argIn,
java.io.Writer argWriter)
throws org.xml.sax.SAXException,
java.io.IOException
- This method takes an InputSource that represents an order in
XCBL 3.5 format and converts it to an Order object and also creates
an XCBL 3.5 OrderResponse document to be returned to the buyer
- Parameters:
argIn
- the order in XCBL 3.5 formatargWriter
- the writer to which to write the OrderResponse document- Throws:
SAXException,
- IOException
main
public static void main(java.lang.String[] args)
- This main method takes an argument of the path of an XML file in the JVM
classpath which represent an XCBL 3.5 OrderRequest and writes out the
OrderResponse. If the optional second argument is provided it is
interpreted as a file name to which the output is written.
- Parameters:
args
- the first argument is the path of an XML file
within the JVM classpath following the DTD. The second argument is the
optional filename for the output
usage
public static void usage(java.lang.String[] args)