You are here:

"xml document must have a top level element" error

Robert Petek on 03-Dec-08 08:18:

I had the same problem, when I tested a web service with the client.

I used Delphi 2009 with Indy 10 and modified IdHTTPWebBrokerBridge.pas a bit. It looks the problem is in the TIdHTTPAppRequest.GetStringVariable function where Content property is filled with FRequestInfo.UnparsedParams. This is empty when it gets a POST command. I've debugged the code and saw the contents is in the FRequestInfo.PostStream.

Try to set the result for the Content property to the PostStream contents when FRequestInfo.CommandType is hcPOST. You will also need to fix the result value for the ContentLength property. It worked for me.


Robert Petek
0 Replies
Status: Unmoderated
New Reply
Copyright © 2006 by CodeGear Contact Us  |  Legal Notices  |  Privacy Statement