0

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

Kara
  • 6,115
  • 16
  • 50
  • 57
  • While tracing through HttpWebBrokerBridge I get exception in method DoCommanGet on line lWebModule.DispatchAction(LRequest, LResponse) –  Jun 03 '09 at 00:58

2 Answers2

1

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

Jan Doggen
  • 8,799
  • 13
  • 70
  • 144
Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
1

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.

Community
  • 1
  • 1
Eugene Yokota
  • 94,654
  • 45
  • 215
  • 319