All Examples  XML Examples  This Package 

Class examples.xml.http.StockClient

java.lang.Object
   |
   +----org.xml.sax.HandlerBase
           |
           +----examples.xml.http.StockClient

public class StockClient
extends HandlerBase
This example works with SAXServlet included in this package to demonstrate how XML data is created, manipulated, and passed between a client and a servlet. This class accepts user input to define a stock trade transaction. XML data is generated and sent to StockServlet via a HTTP POST. The resulting XML data returned from StockServlet is parsed and displayed in the console.

Author:
Copyright (c) 2000 by BEA Systems, Inc. All Rights Reserved.

Constructor Index

 o StockClient()
Default constructor.

Method Index

 o endDocument()
End document.
 o error(SAXParseException)
Error.
 o fatalError(SAXParseException)
Fatal error.
 o main(String[])
Runs this exmaple from the command line.
 o startDocument()
Start document.
 o startElement(String, AttributeList)
Start element.
 o warning(SAXParseException)
Warning.

Constructors

 o StockClient
 public StockClient()
Default constructor.

Methods

 o main
 public static void main(String args[])
Runs this exmaple from the command line.

java examples.xml.sax.StockClient t3://localhost:7001/stock BEAS

Parameters:
url - URL of the servlet such as "http://localhost:7001/SAXStockServlet"
 o startDocument
 public void startDocument() throws SAXException
Start document.

Overrides:
startDocument in class HandlerBase
 o startElement
 public void startElement(String name,
                          AttributeList attrs) throws SAXException
Start element.

Overrides:
startElement in class HandlerBase
 o endDocument
 public void endDocument() throws SAXException
End document.

Overrides:
endDocument in class HandlerBase
 o warning
 public void warning(SAXParseException ex)
Warning.

Overrides:
warning in class HandlerBase
 o error
 public void error(SAXParseException ex)
Error.

Overrides:
error in class HandlerBase
 o fatalError
 public void fatalError(SAXParseException ex) throws SAXException
Fatal error.

Overrides:
fatalError in class HandlerBase

All Examples  XML Examples  This Package