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

  • Home
  • SEARCH
  • 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 894423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T14:23:04+00:00 2026-05-15T14:23:04+00:00

I use Delphi 7 and import from a WDL file to create a SOAP

  • 0

I use Delphi 7 and import from a WDL file to create a SOAP client. Delphi generates interface code with the published functions from the WSDL and the types (classes) of parameters for those functions.

Delphi has determined that something like this

  Message = class(TRemotable)
  private
    FMessageID: Int64;
    Ftimestamp: TXSDateTime;
    Fevent: eventType;
    FmagicNumber: WideString;
    FDataPart: DataPart;
  published
    property MessageID: Int64 read FMessageID write FMessageID;
    property timestamp: TXSDateTime read Ftimestamp write Ftimestamp;
    property event: eventType read Fevent write Fevent;
    property magicNumber: WideString read FmagicNumber write FmagicNumber;
    property DataPart: DataPart read FDataPart write FDataPart;
  end;

should be send as a TByteDynArray …

function  sendMessage(const theMessage: TByteDynArray; 
                      const data: DataPart): WideString; stdcall;

which necessitates me converting an object to a TByteDnyArray, which – beings Delphi n00b – I am doing this by

  theMessageArray := TByteDynArray(theMessage);

When I look at the object in the debugger, then it contains pointers (to the Ftimestamp and Ftimestamp), and when I look in the TByteDynArray I see the self same pointer values. So, it seems that “cast” is not what I wanted. How do convert my object to the TByteDynArray which is required? (and which, presumably “inlines” the objects pointed to by pointers)

I presume that there is a standard approach for 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-15T14:23:05+00:00Added an answer on May 15, 2026 at 2:23 pm

    Look in the parent class for a way to stream the data. objectinstance.savetostream or so. It probably will iterate over the published membes and write them to a stream.

    Use this to write it to a memory stream, which is roughly a class around a memory block (like tdynbytearray). Then use memorystream.size and setlength to allocate the tbytedynarray to the proper size, and copy the bytes from the memorystream to the newly created array:

     // (Untested)
    
     memstream:=TMemoryStream.Create;
     objectinstance.SaveToStream(memstream);
     setlength(mybytearray,memstream.size);
     if memstream.size>0 then
        move (pansichar(memstream.memory)^,mybytearray[0],memstream.size);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to use Delphi 2009's refactoring to extract an interface from a
Can I use Delphi to program to the Java Native Interface ? From reading
How would I be able to use Delphi to remove data from a memo
What is the normal way people writing network code in Delphi use Windows-style overlapped
Trying to use GnuPG with Delphi (Win32). I need to sign some file with
When I use Delphi directives in code, like: {$IFDEF something} . . . {$ENDIF}
I use Delphi and last year I upgraded from D5 Enterprise to Delphi 2010
We currently use Delphi 2005, and import Crystal Reports 10 ActiveX controls as a
I need to import some XML schemas. In Delphi, I would use the the
I want to use HttpOpenRequest to download a file from internet using GET. I

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.