473,396 Members | 2,037 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

B2B dolution in classical ASP

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
Apr 10 '07 #1
10 2079
Create a page which will allow them to upload a file.
The upload can be followed with some desired processing
"c676228" <be****@community.nospamwrote in message news:6F**********************************@microsof t.com...
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

Apr 10 '07 #2
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.



Apr 11 '07 #3
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.

Apr 13 '07 #4
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.

Apr 13 '07 #5
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)
Apr 13 '07 #6
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.



Apr 13 '07 #7
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 be:(it 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.

Apr 17 '07 #8
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.

Apr 19 '07 #9
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.

Apr 23 '07 #10
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.
Apr 26 '07 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

45
by: Joh | last post by:
hello, i'm trying to understand how i could build following consecutive sets from a root one using generator : l = would like to produce : , , , ,
3
by: pankaj tiwary | last post by:
I have a problem and I am not able to get the solution for that. So, I thought may be you people can help me out. The problem is I have 3 arrows and each one of them has got intrincically 3...
5
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I guess this probably a very silly question. I am not sure if this can be done in classical asp. A button has to be clicked if a selection in drop down list has been changed. If not, a...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.