Re: Classic ASP to .NET WebService interfacing (Dataset to RecordSet)
From: Bob Barrows [MVP] (reb01501_at_NOyahoo.SPAMcom)
Date: 03/21/05
- Next message: Bob Barrows [MVP]: "Re: global.asa fires after url parameters?"
- Previous message: McKirahan: "Re: Checking for duplication in an array or delimited string"
- In reply to: Adam Short: "Re: Classic ASP to .NET WebService interfacing (Dataset to RecordSet)"
- Next in thread: Adam Short: "Re: Classic ASP to .NET WebService interfacing (Dataset to RecordSet)"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 21 Mar 2005 13:38:06 -0500
I think MS agrees with you, given that they have deprecated that toolkit.
Adam Short wrote:
> Thankyou for your input, and comments.
>
> I am fully aware that I could use XMLRPC as you have suggested, but am
> really just looking to utilize SOAP as an alternative. More research
> than necessity, in fact to be honest I am very disappointed with
> SOAP on the whole, and wonder why anyone would implement a system
> which is so restrictive.
>
> In the past I have used a hacked XMLRPC procedure developed
> originally by David Carter-Tod. Although bugged, I have fixed most
> of them.
>
>
>
>
>
> "Chris Hohmann" <nospam@thankyou.com> wrote in message
> news:eEYJW9ALFHA.1308@TK2MSFTNGP15.phx.gbl...
>> "Adam Short" <adam@phuture-uk.net> wrote in message
>> news:ObPbSewKFHA.3340@TK2MSFTNGP14.phx.gbl...
>>> 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?
>> [snip]
>>
>> Here's a proof of concept I came up with. Basically, it makes an
>> HTTP GET call the getEvolucionVersionList operation of your
>> webservice, then loads the resultant xml into a MSXML2.DomDocument
>> and transforms the xml to html using a XSLT style***. HTTP, XML
>> and XSLT are all pretty standard, so this concept should port easily
>> to PHP, ASP.NET, JSP, etc...
>>
>> [EvolucionVersionList2HTML.xsl]
>> <?xml version="1.0" encoding="utf-8"?>
>> <xsl:style*** version="1.0"
>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>> <xsl:output method="html" version="4.0" indent="yes"/>
>> <xsl:template match="NewDataSet">
>> <html>
>> <body>
>> <table>
>> <tr>
>> <th>RecordID</th>
>> <th>ModuleName</th>
>> <th>Description</th>
>> <th>FileName</th>
>> <th>Version</th>
>> <th>Location</th>
>> <th>SystemVariable</th>
>> <th>DateEdited</th>
>> <th>Status</th>
>> </tr>
>> <xsl:apply-templates select="Table"/>
>> </table>
>> <xsl:value-of select="count(Table)"/> Record(s)
>> </body>
>> </html>
>> </xsl:template>
>> <xsl:template match="Table">
>> <tr>
>> <td><xsl:value-of select="RecordID"/></td>
>> <td><xsl:value-of select="ModuleName"/></td>
>> <td><xsl:value-of select="Description"/></td>
>> <td><xsl:value-of select="FileName"/></td>
>> <td><xsl:value-of select="Version"/></td>
>> <td><xsl:value-of select="Location"/></td>
>> <td><xsl:value-of select="SystemVariable"/></td>
>> <td><xsl:value-of select="DateEdited"/></td>
>> <td><xsl:value-of select="Status"/></td>
>> </tr>
>> </xsl:template>
>> </xsl:style***>
>>
>> [getEvolucionVersionList.asp]
>> <%
>> Dim url, http, xml, xsl
>> url =
>>
"http://system.evolucion.co.uk/evolucion-services.asmx/getEvolucionVersionLi
st"
>> Set http = CreateObject("MSXML2.ServerXMLHTTP.4.0")
>> http.Open "GET",url,False
>> http.Send
>> Set xml = CreateObject("MSXML2.DOMDocument.4.0")
>> xml.loadXML http.responseText
>> Set xsl = CreateObject("MSXML2.DOMDocument.4.0")
>> xsl.load Server.MapPath("EvolucionVersionList2HTML.xsl")
>> xml.transformNodeToObject xsl, Response
>> Set http = Nothing
>> Set xsl = Nothing
>> Set xml = Nothing
>> %>
>>
>> NOTES:
>> 1. I'm currently using MSXML 4.0. If you're using version 3.0 (which
>> is likely), you'll need to modify the asp file accordingly. For
>> example, "MSXML2.ServerXMLHTTP.4.0" would become
>> "MSXML2.ServerXMLHTTP.3.0"
>>
>> 2. I opted not to include the SourceCode data in the html table
>> presentation.
>>
>> 3. There's nothing wrong with using SOAP to get the data instead of
>> HTTP to get the data as you did in your origianl code. However, you
>> indicated that eventually end users would need to be able to consume
>> the service from a number of different environments. Some of those
>> environments may not have SOAP, so I wanted to show that it could be
>> done without it.
>>
>> 4. On a completely unrelated note, I noticed that you're using the
>> ".inc" extension for your include files. Also, it appears you're
>> loading objects into the Application scope. Here are two articles
>> that explain why these are not good ideas:
>>
>> http://aspfaq.com/show.asp?id=2269
>> http://aspfaq.com/show.asp?id=2053
>>
>>
>> HTH
>> -Chris Hohmann
-- Microsoft MVP -- ASP/ASP.NET Please reply to the newsgroup. The email account listed in my From header is my spam trap, so I don't check it very often. You will get a quicker response by posting to the newsgroup.
- Next message: Bob Barrows [MVP]: "Re: global.asa fires after url parameters?"
- Previous message: McKirahan: "Re: Checking for duplication in an array or delimited string"
- In reply to: Adam Short: "Re: Classic ASP to .NET WebService interfacing (Dataset to RecordSet)"
- Next in thread: Adam Short: "Re: Classic ASP to .NET WebService interfacing (Dataset to RecordSet)"
- Messages sorted by: [ date ] [ thread ]