473,581 Members | 2,833 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Not Getting Response from a URL while posting XML Data

6 New Member
i am posting a xml string to "http://www.axeria-iard.fr/Sitetest/extranet/pushxml/receiver.asp" through my aspx page , when i tried to read the response , it shows an error . The same is fine through a asp or html page .

The XML string is
string req = "<?xml version='1.0'?> ";
req = req + "<DEVISAUTO >";
req = req + "<MODE>TAR</MODE>";
req = req + "<CP>38300</CP>";
req = req + "<DPMC>01/01/2005</DPMC>";
req = req + "<SEXE>MA</SEXE>";
req = req + "<CSP>6</CSP>";
req = req + "<DNAIS>01/01/1960</DNAIS>";
req = req + "<DPERM>01/09/1980</DPERM>";
req = req + "<USAG>2</USAG>";
req = req + "<GTA>RE510 13</GTA>";
req = req + "<BONUS>0.7 2</BONUS>";
req = req + "<FORM>C</FORM>";
req = req + "<TGAR>BC</TGAR>";
req = req + "<CEXL>O</CEXL>";
req = req + "<MULDET>N</MULDET>";
req = req + "<NBENF>1</NBENF>";
req = req + "<PLAOBJ>0</PLAOBJ>";
req = req + "<PLAACC>0</PLAACC>";
req = req + "</DEVISAUTO>";

xmlString.Text = req;
string msgBody = Server.UrlEncod e("xmlString= " + xmlString.Text) ;

xmlString is a textbox

Please suggest me .
Mar 1 '07 #1
6 1507
dorinbogdan
839 Recognized Expert Contributor
Which is the error description?
Mar 1 '07 #2
manitewary
6 New Member
Impossible of recuperer the parameter xmlString by method POST

Its an French site , so i am translating the erroe message in English
Mar 1 '07 #3
dorinbogdan
839 Recognized Expert Contributor
Strange error, it looks like a user-defined message....
Mar 1 '07 #4
kenobewan
4,871 Recognized Expert Specialist
This is not going to work. The message is telling you you cannot use urlencode on xml. You will need to find another way to send your xml rather that via a URL. Please provide more info about what you are trying to achieve.
Mar 1 '07 #5
manitewary
6 New Member
This is not going to work. The message is telling you you cannot use urlencode on xml. You will need to find another way to send your xml rather that via a URL. Please provide more info about what you are trying to achieve.
http://www.axeria-iard.fr/Sitetest/extranet/pushxml/receiver.asp

Above is the URL on which i have to send a request in xmlString and read the response, the problem is the error which i am getting while posting the page in asp.net(using c#).
The XML string and the code is mentioned below :

string req = "<?xml version='1.0'?> ";
req = req + "<DEVISAUTO >";
req = req + "<MODE>TAR</MODE>";
req = req + "<CP>38300</CP>";
req = req + "<DPMC>01/01/2005</DPMC>";
req = req + "<SEXE>MA</SEXE>";
req = req + "<CSP>6</CSP>";
req = req + "<DNAIS>01/01/1960</DNAIS>";
req = req + "<DPERM>01/09/1980</DPERM>";
req = req + "<USAG>2</USAG>";
req = req + "<GTA>RE510 13</GTA>";
req = req + "<BONUS>0.7 2</BONUS>";
req = req + "<FORM>C</FORM>";
req = req + "<TGAR>BC</TGAR>";
req = req + "<CEXL>O</CEXL>";
req = req + "<MULDET>N</MULDET>";
req = req + "<NBENF>1</NBENF>";
req = req + "<PLAOBJ>0</PLAOBJ>";
req = req + "<PLAACC>0</PLAACC>";
req = req + "</DEVISAUTO>";

string msgBody = req;

HttpWebRequest request = (HttpWebRequest )WebRequest.Cre ate ("http://www.axeria-iard.fr/Sitetest/extranet/pushxml/receiver.asp?" + msgBody );
HttpWebResponse response = (HttpWebRespons e)request.GetRe sponse();
String ver = response.Protoc olVersion.ToStr ing();
StreamReader reader = new StreamReader(re sponse.GetRespo nseStream() );
string str = reader.ReadLine ();
while(str != null)
{
Response.Write (str);
str = reader.ReadLine ();
}


above is the code which i am using , please help

Thanks
Manish
Mar 1 '07 #6
ashish ranjan
15 New Member
Hi,

Ur problem can be because of the default HTML code in ur Web Page is appending to ur xml code .So Delete all html code(in source of web page) except the first line.

If it will work then inform me..]
Thanks,



http://www.axeria-iard.fr/Sitetest/extranet/pushxml/receiver.asp

Above is the URL on which i have to send a request in xmlString and read the response, the problem is the error which i am getting while posting the page in asp.net(using c#).
The XML string and the code is mentioned below :

string req = "<?xml version='1.0'?> ";
req = req + "<DEVISAUTO >";
req = req + "<MODE>TAR</MODE>";
req = req + "<CP>38300</CP>";
req = req + "<DPMC>01/01/2005</DPMC>";
req = req + "<SEXE>MA</SEXE>";
req = req + "<CSP>6</CSP>";
req = req + "<DNAIS>01/01/1960</DNAIS>";
req = req + "<DPERM>01/09/1980</DPERM>";
req = req + "<USAG>2</USAG>";
req = req + "<GTA>RE510 13</GTA>";
req = req + "<BONUS>0.7 2</BONUS>";
req = req + "<FORM>C</FORM>";
req = req + "<TGAR>BC</TGAR>";
req = req + "<CEXL>O</CEXL>";
req = req + "<MULDET>N</MULDET>";
req = req + "<NBENF>1</NBENF>";
req = req + "<PLAOBJ>0</PLAOBJ>";
req = req + "<PLAACC>0</PLAACC>";
req = req + "</DEVISAUTO>";

string msgBody = req;

HttpWebRequest request = (HttpWebRequest )WebRequest.Cre ate ("http://www.axeria-iard.fr/Sitetest/extranet/pushxml/receiver.asp?" + msgBody );
HttpWebResponse response = (HttpWebRespons e)request.GetRe sponse();
String ver = response.Protoc olVersion.ToStr ing();
StreamReader reader = new StreamReader(re sponse.GetRespo nseStream() );
string str = reader.ReadLine ();
while(str != null)
{
Response.Write (str);
str = reader.ReadLine ();
}


above is the code which i am using , please help

Thanks
Manish
Mar 5 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
8626
by: Steve | last post by:
I'm working in PHP, but am also using JavaScript, so perhaps there is a better way to do this using more PHP code...... I setup a search screen for my database, the user enters data and submits a form via POST From that I get a results list screen, based on data I submit via a form from the search screen In the results list screen, I...
7
2463
by: Larry Woods | last post by:
Could you give me an example of streaming a page to the client? Thanks. Larry Woods
7
13049
by: Robert Brown | last post by:
Hi All, I am creating an interface into a Payment Gateway. I need to access a URL (which is a perl script) with paramters attached. I will then get a response within 10 seconds with information I need to formulate into my pretty asp page. I didn't know where to start but I have read alot about adodb.stream. I setout to write some code...
11
26815
by: Russ | last post by:
My web app writes some binary data to a file at the client site via Response.Write and Response.BinaryWrite. This action is accomplished in response to a button click, with C# code behind as follows: private void SubmitButton_Click (object sender, System.EventArgs e) { // Set up the response to write the print file to the client...
1
1405
by: Nathan Sokalski | last post by:
I have retrieved data from a database using a SELECT statement that includes an INNER JOIN. The data seems to be retrieved to the DataSet OK, but I am having trouble getting the data from the DataSet. The code I am using is as follows: Private Sub btnDownloadDB_Click(ByVal sender As System.Object, ByVal e As...
8
8482
by: bryan | last post by:
Is there any way I can get the application path (the one returned by Request.ApplicationPath) in the Application_Start method in Global.asax? Request is not valid there. On a related note, is there a way to get it from a static method in an aspx page, or in the class (static) constructor for an aspx page? Thanks, Bryan
4
4487
by: R.Manikandan | last post by:
Hi In my code, one string variable is subjected to contain more amount of characters. If it cross certain limit, the string content in the varabile is automatically getting truncated and i am not getting the full data. Is there any max limit for an variable to store in javascript? Can anyone please help me to solve this prob?
4
4317
by: cbtechlists | last post by:
I have an ASP app that we've moved from a Windows 2000 to a Windows 2003 server (sql server 2000 to sql server 2005). The job runs fine on the old servers. Part of the app takes a recordset and response.writes out comma delimited strings so that the results are opened in Excel or saved to a flat file. Basically, it looks something like...
5
1503
by: rn5a | last post by:
A Web Form has a TextBox within a DataGrid wherein users are expected to enter only whole numbers. It should be validated so that the TextBox doesn't remain blank or any non-numeric data is entered in the TextBox. If the TextBox doesn't get validated, I want to display messages to the user which should be as precise as possible for the user...
1
1866
imrosie
by: imrosie | last post by:
Please help with this one,,,,,I've been trying everything in my arsenal to fix this one. I'm stumped.... I"ve got a unbound combo box (customername) that has two events (on click); AfterUpdate and NotInList. The AfterUpdate uses a 'me.recordsetclone' in order to display other data in controls associated with customerid/customername from the...
0
7876
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8310
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8180
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6563
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5681
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5366
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3832
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1409
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1144
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.