Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1). ** Please don't post code questions here ** For issues specific to a particular language in .NET, please see the other forum categories.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VS.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 12th, 2003, 04:00 AM
Authorized User
 
Join Date: Sep 2003
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Post XML

Can anyone please tell
how can I post XML data from vb.net and receive read it in an asp page for further processing ?
This is what I am trying without success.
*-*-*-*-*
      Dim a As New MSXML2.ServerXMLHTTP40
      Dim URLstr As String
      URLstr = "http://ab/cd/ec/temp.asp"
      a.open("POST", URLstr, False)
      a.send()
*-*-*-*-*

Thanks for helping.
Vipul Bhatt.
 
Old September 12th, 2003, 09:24 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

There's a similar thread regarding this topic over in ASP XML. Take a look there and see if that's any help.

Peter
 
Old September 12th, 2003, 09:41 AM
Authorized User
 
Join Date: Sep 2003
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks it worked.
In VB Code Server.HTMLEncode can be used, but not in VB.NET and I feel because of this there is a problem.

The problem is that it looses all the formatting of tha data (Like it removes spaces, takes "=" as assignment rather than literal string and does not fetch further data)

Thanks for helping.
Vipul Bhatt.
 
Old September 12th, 2003, 10:31 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You shouldn't be using HTML encode. That's used to encode for display. You want to use URLEndode for posting the data.

Peter
 
Old September 13th, 2003, 12:44 AM
Authorized User
 
Join Date: Sep 2003
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I tried using URLEncode in the ASP page. It worked. But how do I read/save it later, as I cannot process URLEncoded XML.
 
Old September 15th, 2003, 09:02 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Have you tried processing it yet? When it comes in from the Request object, it should be all decoded for you. Just like query string values are already decoded when you use URLEncode. You just need to have your ASP page get the value with "Request.Form('myXMLData')" and you should be all set.

How you save it is up to you. You'll need to put it into some sort or persistant medium: file or database are your most likely options. Easiest to use a database. It depends on what your "further processing" will be.

Peter
 
Old September 18th, 2003, 01:23 AM
Authorized User
 
Join Date: Sep 2003
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks all of you for help.
Found the solution.
 
Old December 5th, 2003, 05:46 AM
Authorized User
 
Join Date: Sep 2003
Location: , , .
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi. I am able to post XML data but when I read/fetch it in ASP, It does not preserve white spaces(infact any characters apart from numbers and alphabets.)

Thanks for help.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Post a xml file to an URL? chengjianjin XML 10 June 10th, 2010 02:05 AM
XML HTTP Post acdsky Servlets 2 June 2nd, 2005 10:59 AM
GET URL FROM XML POST kevorkian Classic ASP XML 4 December 23rd, 2004 11:31 AM
XML Post using microsoft.XMLHTTP csmajor231 XML 0 April 5th, 2004 03:06 PM
Post xml using c# yangzhongbin VS.NET 2002/2003 6 November 7th, 2003 05:44 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.