Home | SOAP Tools | UDDI Browser | ResourcesSource Code | RFCs | News Reader  | SOAP Interop | Bookmarks 

  

Data Access Using SOAP
End Point: http://soapclient.com/xml/SQLDataSoap.WSDL
DataSource:    (ODBC Data Source)
SQLStatement:

Choose from three tables: CUSTOMER, ORDERS, PRODUCT

Result Format:
 

How it works:

  • The HTML form  initiates a SOAP request using our SOAP client library, the request is sent to a SQLData SOAP Server using the service description file: SQLDataSoap.wsdl.
  • Upon receiving the SOAP request, the server interacts with ODBC database services to process the SQL statement. The results, formatted as XML data, are then sent back to the SOAP client. 

Technical Details:

SOAP Endpoint URL: http://www.SoapClient.com/xml/SQLDataSoap.WSDL
SOAP Action: /SQLDataSRL
Method Names: ProcessSQL
WSDL URL:  http://www.SoapClient.com/xml/SQLDataSoap.wsdl
Parameters:
  1. DataSource: The ODBC data source, choose either TestAccess, TestDbase, or TestText.
  2. SQLStatement: The SQL query statement, please select data from CUSTOMER, ORDERS,and PRODUCTS.
  3. UserName: Optional
  4. Password: Optional

Key Features:

  • Directly access to all ODBC data sources from SOAP clients.
  • Support full SQL operations (DDL, DML, DCL and Query).
  • Result can be formatted as XML, HTML or plain text.
  • Use standard WSDL.
  • Support both COM objects and C++ methods, can directly access C routines and low level API.
  • Embedded XML/WSDL/WSML parser (SAX 2.0) and SOAP message handlers.

Sample Soap Message

The following message selects customer records from an Access database:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
	xmlns:xsd="http://www.w3.org/1999/XMLSchema"
	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
	xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
	SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
	<SOAP-ENV:Body>
		<mns:ProcessSQL xmlns:mns="http://www.SoapClient.com/xml/SQLDataSoap.xsd">
			<DataSource xsi:type="xsd:string">TestAccess</DataSource>
			<SQLStatement xsi:type="xsd:string">SELECT * FROM CUSTOMER</SQLStatement>
			<UserName xsi:type="xsd:string"></UserName>
			<Password xsi:type="xsd:string"></Password>
	</mns:ProcessSQL></SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Sample VB Code (SQLData SOAP Client)

Dim MyAgent As SoapAgent
Set MyAgent = New SoapAgent

MyAgent.AddParameter "DataSource", "TestAccess", ""
MyAgent.AddParameter "SQLStatement", "SELECT * FROM CUSTOMER", ""
'Execute the method
MyAgent.ExecuteMethod "http://soapclient.com/xml/SQLDataSOAP.wsdl", "ProcessSQL"
'show me the result!
MsgBox MyAgent.GetResponse("return")

Sample VB Code (MS SOAP 2.0)

    Dim Serializer As SoapSerializer
    Dim Connector As SoapConnector
    Dim Reader As SoapReader
    Dim Serializer As SoapSerializer
    Dim Connector As SoapConnector
    Dim Reader As SoapReader
    
    Set Connector = New HttpConnector
    Connector.Property("EndPointURL") = "http://soapclient.com/xml/SQLDataSoap.WSDL"
    Connector.Connect
    Connector.Property("SoapAction") = "/SQLDataSRL"
    Connector.BeginMessage 'Nothing
    Set Serializer = New SoapSerializer
    Serializer.Init Connector.InputStream
    Serializer.startEnvelope "SOAP-ENV", "http://schemas.xmlsoap.org/soap/encoding/"
    Serializer.startBody
    Serializer.startElement "ProcessSQL", "http://www.SoapClient.com/xml/SQLDataSoap.xsd", "mns"
    Serializer.startElement "DataSource"
    Serializer.writeString "TestAccess"
    Serializer.endElement
    Serializer.startElement "SQLStatement"
    Serializer.writeString "SELECT * FROM CUSTOMER WHERE COUNTRY='UK'"
    Serializer.endElement
    Serializer.endElement
    Serializer.endBody
    Serializer.endEnvelope
    Connector.EndMessage

    Set Reader = New SoapReader
    Reader.Load Connector.OutputStream
    
    If Not Reader.Fault Is Nothing Then
        MsgBox Reader.faultstring.Text, vbExclamation
    Else
        MsgBox Reader.DOM.xml
    End If
 


Copyright 1997-2011 SQLData System, Inc  All rights reserved.

Comments, or suggestions? Send to info2 at sqldata.com

This site is powered by SQLData SOAP Server