473,320 Members | 1,846 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,320 software developers and data experts.

Not Getting Response from a URL while posting XML Data

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>RE51013</GTA>";
req = req + "<BONUS>0.72</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.UrlEncode("xmlString=" + xmlString.Text);

xmlString is a textbox

Please suggest me .
Mar 1 '07 #1
6 1483
dorinbogdan
839 Expert 512MB
Which is the error description?
Mar 1 '07 #2
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 Expert 512MB
Strange error, it looks like a user-defined message....
Mar 1 '07 #4
kenobewan
4,871 Expert 4TB
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
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>RE51013</GTA>";
req = req + "<BONUS>0.72</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.Create ("http://www.axeria-iard.fr/Sitetest/extranet/pushxml/receiver.asp?" + msgBody );
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
String ver = response.ProtocolVersion.ToString();
StreamReader reader = new StreamReader(response.GetResponseStream() );
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
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>RE51013</GTA>";
req = req + "<BONUS>0.72</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.Create ("http://www.axeria-iard.fr/Sitetest/extranet/pushxml/receiver.asp?" + msgBody );
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
String ver = response.ProtocolVersion.ToString();
StreamReader reader = new StreamReader(response.GetResponseStream() );
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
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...
7
by: Larry Woods | last post by:
Could you give me an example of streaming a page to the client? Thanks. Larry Woods
7
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...
11
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...
1
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...
8
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...
4
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...
4
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...
5
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...
1
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...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.