|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--XmlOdbc
The XmlOdbc class is used to communicate with the Easysoft XML-ODBC Server.
It allows you to send SQL statements to an ODBC driver on the same machine as the XML-ODBC Server and retrieve the results in XML. The protocol used is simple and documented by the DTDs distributed with the XML-ODBC Server.
Constructor Summary | |
XmlOdbc()
|
Method Summary | |
void |
connect(java.lang.String server)
Establishes socket connection to the XML-ODBC Server; Port defaults to 8895. |
void |
connect(java.lang.String server,
int port)
Establishes socket connection to the XML-ODBC Server |
java.io.DataInputStream |
getStreamResponse()
Get XML response from the server as an input stream that can be passed to a parser. |
java.lang.String |
getStringResponse()
Get XML response from the server as a String |
void |
sendRequest(java.lang.String sql,
java.lang.String odbcConnectionString)
Construct a request in XML and send it to the server. |
void |
sendXml(java.lang.String xmlrequest)
Send XML request to the server given as a String parameter |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XmlOdbc()
Method Detail |
public void connect(java.lang.String server) throws java.net.UnknownHostException, java.io.IOException
server
- XML-ODBC Server machinepublic void connect(java.lang.String server, int port) throws java.net.UnknownHostException, java.io.IOException
server
- XML-ODBC Server machineport
- Port on which the XML-ODBC Server is listeningpublic void sendRequest(java.lang.String sql, java.lang.String odbcConnectionString) throws java.lang.Exception
sql
- SQL query to be sent to the XML-ODBC ServerodbcConnectionString
- connection stringpublic java.lang.String getStringResponse() throws java.lang.Exception
public java.io.DataInputStream getStreamResponse() throws java.lang.Exception
public void sendXml(java.lang.String xmlrequest) throws java.lang.Exception
xmlrequest
- request in XML, see DTDs.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |