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
Re: B2B dolution in classical ASP
am 10.04.2007 20:28:40 von Jon Paal
Create a page which will allow them to upload a file.
The upload can be followed with some desired processing
"c676228" wrote in message news:6F375FFA-65DA-47FF-B8A3-1B29A7583681@microsoft.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
Re: B2B dolution in classical ASP
am 11.04.2007 06:09:10 von stcheng
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.
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/de fault.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/subscriptions/support/default.aspx .
This posting is provided "AS IS" with no warranties, and confers no rights.
Re: B2B dolution in classical ASP
am 13.04.2007 03:40:11 von stcheng
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.
Re: B2B dolution in classical ASP
am 13.04.2007 04:44:02 von bettys
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.
>
>
Re: B2B dolution in classical ASP
am 13.04.2007 09:17:34 von exjxw.hannivoort
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)
Re: B2B dolution in classical ASP
am 13.04.2007 11:13:38 von stcheng
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.
Re: B2B dolution in classical ASP
am 18.04.2007 00:22:03 von bettys
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.
<%@LANGUAGE = "VBScript" %>
<%
Response.Buffer = False
'ensure proper headers sent to the client
Response.ContentType = "text/xml"
%>
<%
'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.
>
>
Re: B2B dolution in classical ASP
am 19.04.2007 06:31:50 von stcheng
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.
Re: B2B solution in classical ASP
am 24.04.2007 01:34:02 von bettys
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.
>
>
Re: B2B solution in classical ASP
am 26.04.2007 06:24:31 von stcheng
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