Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1062051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T18:33:55+00:00 2026-05-16T18:33:55+00:00

unit Unit2; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,

  • 0
unit Unit2;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient,
  IdHTTP, IdIOHandler, IdIOHandlerSocket, IdIOHandlerStack,
  IdIntercept, IdCookieManager, IdZLibCompressorBase, IdCompressorZLib, IdSSL,
  IdSSLOpenSSL;

type
  TForm2 = class(TForm)
    IdHTTP1: TIdHTTP;
    Button1: TButton;
    Memo1: TMemo; 
    IdCompressorZLib1: TIdCompressorZLib;
    IdCookieManager1: TIdCookieManager;
    IdConnectionIntercept1: TIdConnectionIntercept;
    IdIOHandlerStack1: TIdIOHandlerStack;
    IdSSLIOHandlerSocketOpenSSL1: TIdSSLIOHandlerSocketOpenSSL;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    procedure StringToStream(const Text: string; Stream: TStream);
  end;

var
  Form2: TForm2;

implementation

{$R *.dfm}

procedure TForm2.StringToStream(const Text: string; Stream: TStream);
begin
  Stream.Write(Text[1], Length(Text));
end;

procedure TForm2.Button1Click(Sender: TObject);
var
  temp:string;
  SendStream: TStream;
  ResponseStream: TStream;
begin
    SendStream := TMemoryStream.Create;
    ResponseStream := TMemoryStream.Create;


    temp:=  '<?xml version="1.0"?>
<methodCall>
   <methodName>weblogUpdates.ping</methodName>
   <params>
      <param>
         <value>%WEBNAME%</value>
         </param>
      <param>
        <value>%WEBADDREESS%</value>
      </param>
      </params>
   </methodCall>'; // copied from text file where I was loading this

    temp:= StringReplace(temp, '%WEBNAME%', 'Generic Website Title',[rfReplaceAll, rfIgnoreCase]);
    temp:= StringReplace(temp, '%WEBADDREESS%', 'http://www.testingwebsite.com',[rfReplaceAll, rfIgnoreCase]);

    memo1.Lines.Add(temp);
    StringToStream(temp, SendStream); // convert to a stream
    SendStream.Position := 0;

    idhttp1.Request.Accept := '*/*';
    idhttp1.Request.ContentType := 'text/xml';
    idhttp1.Request.Connection := 'Keep-Alive';
    idhttp1.Request.ContentLength := Length(temp);
    memo1.lines.Add(idhttp1.Post('http://ping.feedburner.com', SendStream));
{
if FHostPort = 80 then
          Session.Post('http://' + FHostName + FEndPoint, SendStream,
            ResponseStream)
        else
          Session.Post('http://' + FHostName + ':' + IntToStr(FHostPort) +
            FEndPoint, SendStream, ResponseStream);

      if FSSLEnable then
        Session.Post('https://' + FHostName + ':' + IntToStr(FHostPort) +
          FEndPoint, SendStream, ResponseStream);

}
end;

end.

on the DFM, I set under idHTTP1 the compressor, CookieManager, Intercept, and IOHandler.
I copies the required OpenSSL dll files to the project folder

Keep getting the error:
Failed to parse XML-RPC request: XML document structures must start and end within the same entity

Any ideas on how to fix this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T18:33:56+00:00Added an answer on May 16, 2026 at 6:33 pm

    that’s an xml parser exception, probably thrown server-side.

    as the xml you’re sending is valid (however you really should be using an xml library to build it!), the error most likely means that the stream the server is receiving is being truncated… in other words the content-length header is less than the bytes sent.

    my guess is as you’re using a unicode enabled version of delphi, your content-length will be set to half of the actual bytes sent; change the datatype of Text in StringToStream to AnsiString.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 539k
  • Answers 539k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Use the below code if you want to hide and… May 17, 2026 at 2:25 am
  • Editorial Team
    Editorial Team added an answer Change the test to: var firstInt32Property = property.PropertyType == typeof(int);… May 17, 2026 at 2:25 am
  • Editorial Team
    Editorial Team added an answer I added the following in my persistence file and it… May 17, 2026 at 2:25 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have to create an array and place all controls there in order to
With RttiContext.FindType('Classes.TStringList') I get RttiType of TStringList with no problem. But with RttiContext.FindType('MyUnit.TMyClass') I
I'm currently researching how to add the Unit of Work pattern to my existing
I've the following simplified code which describes my problem: public interface IMyUser { int
I'm currently trying to implement a StopWatch class. The interface is something like: interface
I've got the following code, and need to strip all non alpha numeric characters.
I have a popup menu that has a few items in it. Option 1
I have a string list (TStrings) that has a couple thousand items in it.
I've been asked to develop a new application that will work along side the
I've been looking at how to put a progress bar in a TListView in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.