Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Using Safe Arrays in ASPs

Reply
Thread Tools

Using Safe Arrays in ASPs

 
 
Bob.Brandt@galileo.ie
Guest
Posts: n/a
 
      09-17-2003
I need to find some way of using Safe Arrays within an ASP without using an
external application.

Here is the senerio:

I have one ASP and sends XML data to another ASP which returns Data from a
Database. Pretty straight forward, however the XML string is quite long and
I would like to pass it to the second ASP via a POST rather then a GET.
Problem is that the only way to retrieve the data is to use the BinaryRead
method of the Request object. This data is only text, but I can not find
any reference of how to use the data once I have retrieved it?!?!

So my question is how do I access the Data from the REQUEST.BINARYREAD?

Or, how else do I read the POSTed data?

Thanks
Bob Brandt


 
Reply With Quote
 
 
 
 
Mark Schupp
Guest
Posts: n/a
 
      09-17-2003
show your code and an example of the XML to be sent.

--
Mark Schupp
--
Head of Development
Integrity eLearning
Online Learning Solutions Provider
http://www.velocityreviews.com/forums/(E-Mail Removed)
http://www.ielearning.com
714.637.9480 x17


<(E-Mail Removed)> wrote in message
news:um6c$(E-Mail Removed)...
> I need to find some way of using Safe Arrays within an ASP without using

an
> external application.
>
> Here is the senerio:
>
> I have one ASP and sends XML data to another ASP which returns Data from a
> Database. Pretty straight forward, however the XML string is quite long

and
> I would like to pass it to the second ASP via a POST rather then a GET.
> Problem is that the only way to retrieve the data is to use the BinaryRead
> method of the Request object. This data is only text, but I can not find
> any reference of how to use the data once I have retrieved it?!?!
>
> So my question is how do I access the Data from the REQUEST.BINARYREAD?
>
> Or, how else do I read the POSTed data?
>
> Thanks
> Bob Brandt
>
>



 
Reply With Quote
 
 
 
 
Bob.Brandt@galileo.ie
Guest
Posts: n/a
 
      09-18-2003
The first asp (test.asp) is:
----------------------------------------------------------------------------
-------------------
Dim objxmlhttp
Set objxmlhttp = Server.CreateObject("Msxml2.ServerXMLHTTP")

xmlStr = "<?xml version=""1.0""
encoding=""utf-8""?><search><type>basic</type><sessid>959404635</sessid><use
r></user><pass></pass><op></op><dd>01/Oct/2003</dd><du>7</du><dp>ANY</dp><ds
>ANY</ds><accom></accom><ad>1</ad><ch>0</ch><res></res><ra></ra><bo></bo><pr

ice></price><fto></fto><ftr></ftr></search>"

objxmlhttp.Open "POST", "http://tqtest.galileo.ie/xml/xmltest.asp", False
objxmlhttp.setRequestHeader "Content-Type", "text/xml"
objxmlhttp.send xmlStr
Response.write objxmlhttp.responseText
Set objxmlhttp=nothing
----------------------------------------------------------------------------
-------------------

The second asp (xmltest.asp) is:
----------------------------------------------------------------------------
-------------------
tempdata=Request.BinaryRead(Request.TotalBytes)
Response.ContentType="text/xml"

Response.BinaryWrite tempdata
Response.End
----------------------------------------------------------------------------
-------------------

Right now the second file just spits back the XML code. But what I want to
do is readin the XML information, access a database, and return an XML
string. I am able to do this through the GET method, but the XML string is
quite long and it looks unprofessional. I would greatly prefer to use the
POST method.

Bob


 
Reply With Quote
 
Mark Schupp
Guest
Posts: n/a
 
      09-18-2003
Do a regular form post instead of sending as "text/xml"

objxmlhttp.Open "POST", "http://tqtest.galileo.ie/xml/xmltest.asp", False
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
objxmlhttp.send "xml=" & server.urlencode(xmlStr)

OR

Get the SOAP toolkit from MS
(http://www.microsoft.com/downloads/d...C0DD-CEEC-4088
-9753-86F052EC8450&displaylang=en).

It should contain the components and sample scripts you need to receive
"text/xml" messages.

May be other ways as well.


--
Mark Schupp
--
Head of Development
Integrity eLearning
Online Learning Solutions Provider
(E-Mail Removed)
http://www.ielearning.com
714.637.9480 x17


<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> The first asp (test.asp) is:
> --------------------------------------------------------------------------

--
> -------------------
> Dim objxmlhttp
> Set objxmlhttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
>
> xmlStr = "<?xml version=""1.0""
>

encoding=""utf-8""?><search><type>basic</type><sessid>959404635</sessid><use
>

r></user><pass></pass><op></op><dd>01/Oct/2003</dd><du>7</du><dp>ANY</dp><ds
>
>ANY</ds><accom></accom><ad>1</ad><ch>0</ch><res></res><ra></ra><bo></bo><pr
> ice></price><fto></fto><ftr></ftr></search>"
>
> objxmlhttp.Open "POST", "http://tqtest.galileo.ie/xml/xmltest.asp", False
> objxmlhttp.setRequestHeader "Content-Type", "text/xml"
> objxmlhttp.send xmlStr
> Response.write objxmlhttp.responseText
> Set objxmlhttp=nothing
> --------------------------------------------------------------------------

--
> -------------------
>
> The second asp (xmltest.asp) is:
> --------------------------------------------------------------------------

--
> -------------------
> tempdata=Request.BinaryRead(Request.TotalBytes)
> Response.ContentType="text/xml"
>
> Response.BinaryWrite tempdata
> Response.End
> --------------------------------------------------------------------------

--
> -------------------
>
> Right now the second file just spits back the XML code. But what I want

to
> do is readin the XML information, access a database, and return an XML
> string. I am able to do this through the GET method, but the XML string

is
> quite long and it looks unprofessional. I would greatly prefer to use the
> POST method.
>
> Bob
>
>



 
Reply With Quote
 
Bob.Brandt@galileo.ie
Guest
Posts: n/a
 
      09-19-2003
Thank You. I knew there had to be a simple answer!

I tested it out (the first idea) and that works perfectly!

Bob Brandt


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PUTTING THE ASPS INTO THE TRANLOADAS BARTHA CLIFTON ASP .Net 3 12-24-2007 03:18 PM
Pulling data from a .asps site hall.jeff@gmail.com Python 4 11-28-2007 12:26 AM
New session created when moving between asps and asp pages =?Utf-8?B?anBvcHBlcg==?= ASP .Net 1 04-08-2004 12:44 AM
how to run asps on windows xp Lakshmi Jagarlapudi ASP .Net Web Services 0 12-05-2003 06:15 AM
How can I test ASPs? Rob Rutherford ASP General 3 08-24-2003 02:42 PM



Advertisments