472,142 Members | 1,299 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,142 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 1388
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

Post your reply

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

Similar topics

1 post views Thread by Nathan Sokalski | last post: by
4 posts views Thread by R.Manikandan | last post: by
5 posts views Thread by rn5a | last post: by
reply views Thread by leo001 | last post: by

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.