A
Adam Short
I am trying to write a routine that will connect a .NET server with a
classic ASP server.
I know the following code doesn't work! The data is being returned as a
dataset, however ASP does not recognise datasets and requires a recordset.
Can the datatypes be converted? At the Classic ASP end or .NET end? Can
SOAP toolkit provide the conversion, can any toolkit provide a conversion?
==================================================================================
Web Service Code :
---------------------
dim strSelect as string
dim srcData as ODBCconnection
dim fltData as ODBCdataAdapter
dim myPath as String
myPath = me.Context.Request.ServerVariables("APPL_PHYSICAL_PATH")
dim rtnData as DataSet
strSelect = "SELECT * FROM myDataSource"
' srcData = new ODBCConnection( "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA
SOURCE=" & myPath & "..\data\myDataSource.mdb" )
srcData = new ODBCConnection( "DSN=MyDataSource;uid=;pwd=" )
fltData = new ODBCdataAdapter( strSelect, srcData )
rtnData = new dataset
fltData.fill( rtnData )
return rtnData
==================================================================================
ASP Web Server Code:
-------------------------
SET objSoapClient = Server.CreateObject("MSSOAP.SoapClient")
' needs to be updated with the url of your Web Service WSDL and is
' followed by the Web Service name
objSoapClient.ClientProperty("ServerHTTPRequest") = True
Call
objSoapClient.mssoapinit("http://system.evolucion.co.uk/evolucion-services.asmx?WSDL")
set RecordSet = Server.CreateObject("ADODB.Recordset")
' use the SOAP object to call the Web Method Required
RecordSet = objSoapClient.getEvolucionVersionList()
strOutput = strOutput & "<P>On-Line Result : " & RecordSet.RecordCount
==================================================================================
classic ASP server.
I know the following code doesn't work! The data is being returned as a
dataset, however ASP does not recognise datasets and requires a recordset.
Can the datatypes be converted? At the Classic ASP end or .NET end? Can
SOAP toolkit provide the conversion, can any toolkit provide a conversion?
==================================================================================
Web Service Code :
---------------------
dim strSelect as string
dim srcData as ODBCconnection
dim fltData as ODBCdataAdapter
dim myPath as String
myPath = me.Context.Request.ServerVariables("APPL_PHYSICAL_PATH")
dim rtnData as DataSet
strSelect = "SELECT * FROM myDataSource"
' srcData = new ODBCConnection( "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA
SOURCE=" & myPath & "..\data\myDataSource.mdb" )
srcData = new ODBCConnection( "DSN=MyDataSource;uid=;pwd=" )
fltData = new ODBCdataAdapter( strSelect, srcData )
rtnData = new dataset
fltData.fill( rtnData )
return rtnData
==================================================================================
ASP Web Server Code:
-------------------------
SET objSoapClient = Server.CreateObject("MSSOAP.SoapClient")
' needs to be updated with the url of your Web Service WSDL and is
' followed by the Web Service name
objSoapClient.ClientProperty("ServerHTTPRequest") = True
Call
objSoapClient.mssoapinit("http://system.evolucion.co.uk/evolucion-services.asmx?WSDL")
set RecordSet = Server.CreateObject("ADODB.Recordset")
' use the SOAP object to call the Web Method Required
RecordSet = objSoapClient.getEvolucionVersionList()
strOutput = strOutput & "<P>On-Line Result : " & RecordSet.RecordCount
==================================================================================