Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > B2B dolution in classical ASP

Reply
Thread Tools

B2B dolution in classical ASP

 
 
c676228
Guest
Posts: n/a
 
      04-10-2007
Hi all,
Recently, a couple of our clients have asked if it is possible for them to
pass data in xml format to our server program for processing it.
Would you please give me some guide lines or point me to a starting point
how I should do it in classical asp program.
Thank you.
--
Betty
 
Reply With Quote
 
 
 
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      04-11-2007
Hi Betty,

For the client users of your application, how will they provide the XML
data to your server application? So far, for classic ASP page, you can
consider the following approachs:

1. let use upload the xml data via file upload as Jon has suggested

2. Let them programmatically post the XML document as content of http post
request, and at server-side, you can read the XML data from http request's
body:

#Happy Days Are Here Again: Posting XML to the Server
http://msdn2.microsoft.com/en-us/library/ms950790.aspx

3. You can also let client user use html form input textbox to submit some
XML data.

IMO, the #1 and #2 would be preferred.


Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights.







 
Reply With Quote
 
 
 
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      04-13-2007
Hi Betty,

Any progress on this? If you have anything else we can help, please feel
free to post here.


Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.

 
Reply With Quote
 
c676228
Guest
Posts: n/a
 
      04-13-2007
Jon and Steven,
thanks for your help. Steven, thank you so much being helpful all the time,
with your detailed information and help, I can always quickly start with
something which I never did before.
I just read your meesage, I think in our scenario. Our client will send a
XML file
(which has many fields data in a form) programatically to our *.asp script.
My task is unwrapped the data in this xml file and use it just like a
regular form data and process it and then save the transaction data into
database.
I don't need to save this xml file some where, I need to process the data on
the fly.
Do you have an example, how to extra data from a xml file?
--
Betty


"Steven Cheng[MSFT]" wrote:

> Hi Betty,
>
> Any progress on this? If you have anything else we can help, please feel
> free to post here.
>
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>

 
Reply With Quote
 
Evertjan.
Guest
Posts: n/a
 
      04-13-2007
Steven Cheng[MSFT] wrote on 13 apr 2007 in
microsoft.public.inetserver.asp.general:

> Any progress on this? If you have anything else we can help, please feel
> free to post here.
>


[please always quote on usenet]

Please Steven, usenet is not email.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 
Reply With Quote
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      04-13-2007
Hi Betty,

For file uploading and processing in classic ASP, it is a bit complex since
ASP doesn't provide built-in object model for accessing multi-part
form(when upload files). I know that there are many 3rd party components
for classic ASP file uploading processing. If you do not want to use 3rd
party one, here are some web article that provide some custom vbscript to
process uploaded file stream:

#File upload script class
http://authors.aspalliance.com/Michiel/uploadscript.asp

#File Upload using a VBScript Class
http://www.codeproject.com/asp/vbsupload.asp?df=100

After you get the uploaded file's stream, you can load them into some XML
component to process them(the MSXML classes).

Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.







 
Reply With Quote
 
c676228
Guest
Posts: n/a
 
      04-17-2007
Hi,
here is my question: The following code I download from hotscript.com which
display oK on the server, but it will give me an error message if I use
https://xxxx.com instead of http://xxxx.com
The error message will beit seems very strange to me since it has nothing
to do with xsl style sheet.


The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and
then click the Refresh button, or try again later.


--------------------------------------------------------------------------------

Invalid at the top level of the document. Error processing resource
'https://www.xxxxxx.com/annualp/testxm...

<news><newsitem><title>programmingsite.co.uk</title><link>http://www.programmingsite.co.uk<...



<%@LANGUAGE = "VBScript" %>
<%
Response.Buffer = False
'ensure proper headers sent to the client
Response.ContentType = "text/xml"
%>
<?xml version="1.0"?>
<%
'these are our variables
Dim objXML , objNews
'create an instance of the DOM
Set objXML = Server.CreateObject("Microsoft.XMLDOM")
'Create our root element using the createElement method
Set objXML.documentElement = objXML.createElement("news")
'Create the newsitem element
Set objNews = objXML.createElement("newsitem")
'now we will create all the child elements in this case
'title , link and description
objNews.appendChild objXML.createElement("title")
objNews.appendChild objXML.createElement("link")
objNews.appendChild objXML.createElement("description")
'now we add values to the child elements
objNews.childNodes(0).text = "programmingsite.co.uk"
objNews.childNodes(1).text = "http://www.programmingsite.co.uk"
objNews.childNodes(2).text = "programming resources"
'add the newsitem element to the news element
objXML.documentElement.appendChild objNews.cloneNode(true)
'write the document using the xml method of the DOM
Response.Write objXML.xml
%>

--
Betty


"Steven Cheng[MSFT]" wrote:

> Hi Betty,
>
> Any progress on this? If you have anything else we can help, please feel
> free to post here.
>
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>

 
Reply With Quote
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      04-19-2007
Thanks for your followup Betty,

So when you return a XML document into ASP page's response, it displays
well when through http channel, but report the following error through
https channel, correct?

=============
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and
then click the Refresh button, or try again later.
===============

For this problem, I think it is likely due to the response's XML stream be
malformed or the client browser has something incorrect. I have pasted your
code and test in my local environment(with both SSL and non SSL channel),
both of them work well.

I think you can first try using a static XML document file(with the same
response content) and visiting it through https to see whether you'll get
the same problem behavior.

For client specfic test, you can try using different machine or browser to
perform the test to see whether behavior.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.

 
Reply With Quote
 
c676228
Guest
Posts: n/a
 
      04-23-2007
Steven,
I think you are right. I have experience similar situation too.
sometimes, the xml file cannot be present the way it is supposed to be. i.e.
just regular text in the browser,
But when I view the source of the page, the code is in xml file format. I
don't know why.
another question I want to ask is when I validate the data submitted from an
external source, how I can check if certain fields are provided or not. let's
say lastname,
if they don't provide the lastname, check request("lastname")="" won't work,
isNUll or isobject(Request("lastname")) seems not working, any suggestion or
clue?
Thank you.
--
Betty


"Steven Cheng[MSFT]" wrote:

> Thanks for your followup Betty,
>
> So when you return a XML document into ASP page's response, it displays
> well when through http channel, but report the following error through
> https channel, correct?
>
> =============
> The XML page cannot be displayed
> Cannot view XML input using XSL style sheet. Please correct the error and
> then click the Refresh button, or try again later.
> ===============
>
> For this problem, I think it is likely due to the response's XML stream be
> malformed or the client browser has something incorrect. I have pasted your
> code and test in my local environment(with both SSL and non SSL channel),
> both of them work well.
>
> I think you can first try using a static XML document file(with the same
> response content) and visiting it through https to see whether you'll get
> the same problem behavior.
>
> For client specfic test, you can try using different machine or browser to
> perform the test to see whether behavior.
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>

 
Reply With Quote
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      04-26-2007
Hi Betty,

For the form elements in the post request, I think as long as the certain
item key has been included in the post messsage(such as the input element
has been put on the <form> ), the request.Form collection should contain it
(if no value specified, it is an empty string). You can use the following
code to enumerate all the form collection items:

===============
<%

dim x

for each x in Request.Form
Response.Write("<br>" & x & " = " & Request.Form )
next

%>
=================

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.


 
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
selling b2b trading marketplace script (b2b trade script likealibaba.com) nadiralishah Computer Support 0 01-06-2008 05:15 AM
can an event be controled in classical ASP? c676228 ASP General 5 03-09-2007 08:30 PM
any resouces for construct/parse xml string in classical asp using c676228 ASP General 6 10-24-2006 04:54 PM
Classical Complex challenging Asp and SQL problem =?Utf-8?B?cmFtYXRh?= ASP .Net 3 05-03-2005 07:18 AM
(classical ASP question) Order a xml Eduardo Rosa ASP .Net 1 06-30-2004 02:02 PM



Advertisments