views:

823

answers:

3

We have a app which uses HttpWebBrokerBridge, it works fine in Delphi2006 but when I recompile using Delphi2009 I get EDOMParserError exception with message "XML document must have a top level element".

I don't have any clues as to what's causing this error.

Any clues as to what I should do?

Sandeep

A: 

https://forums.codegear.com/thread.jspa?messageID=96179&#96179

Remy Lebeau - TeamB
I am using Indy 10.2.5 and I have done changes to the HttpWebBrokerBridge but I am still getting the same error. Any other ideas?
+1  A: 

See How to build stand-alone SOAP web services using Delphi?

In particular,

People in Indy 10 and IdHTTPWebBrokerBridge with CBuilder 2009 posted modified version. For example, IdHTTPWebBrokerBridge.pas is by Jochanan van der Niet.

According to Robert Petek,

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.

eed3si9n
+1  A: 

Make sure you are using the latest 10.5.5 snapshot of Indy 10 from SVN's Tiburon branch. Changes to TIdCustomHTTPServer and TIdHTTPWebBrowserBridge were merged into that codebase awhile ago.

Remy Lebeau - TeamB