I am trying to post the below xml to https://apps.quickbooks.com/j/AppGateway and all I keep getting is the error: The remote server returned an error: (400) Bad Request. Does anyone have any ideas what I am doing wrong? See below for the C# code that I am using to post the xml.
Thanks, -Jeff
UPDATE: To add more to my question, I am thinking that the (400) Bad Request error is indicating that I have something grossly wrong with the xml or with the way I am posting the xml. So that is why I am asking this question... what am I missing here?
<?xml version="1.0" encoding="utf-8" ?>
<?qbxml version="7.0"?>
<QBXML>
<SignonMsgsRq>
<SignonDesktopRq>
<ClientDateTime>7/20/2009 12:36PM</ClientDateTime>
<ApplicationLogin>APP_LOGIN</ApplicationLogin>
<ConnectionTicket>CONNECTION_TICKET</ConnectionTicket>
<Language>English</Language>
<AppID>APP_ID</AppID>
<AppVer>1</AppVer>
</SignonDesktopRq>
</SignonMsgsRq>
<QBXMLMsgsRq>
<CustomerQueryRq requestID="2" />
</QBXMLMsgsRq>
</QBXML>
WebRequestObject = (HttpWebRequest)WebRequest.Create(requestUrl);
WebRequestObject.Method = "POST";
WebRequestObject.ContentType = "application/x-qbxml";
WebRequestObject.AllowAutoRedirect = false;
string post = XmlText.Text;
WebRequestObject.ContentLength = post.Length;
swr = new StreamWriter(WebRequestObject.GetRequestStream());
swr.Write(post);
swr.Close();
WebResponseObject = (HttpWebResponse)WebRequestObject.GetResponse();