Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2007-06

Web Service Toolkit - Questions

4 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Johann Glaser

Hi!

Studying the WST Wiki page
http://wiki.freepascal.org/Web_Service_Toolkit I found that it seems not to be possible to serialize records. What is the difficulty implementing that?

How can I transport a record between two programs? I'd like to have the same memory footprint (because it is forwarded to an USB device), so it would be possible to pseudo-serialize the record into some byte stream before transport.

Thanks
Hansi

Johann Glaser Vienna University of Technology Electrical Engineering ____ http://www.johann-glaser.at/ ____

Reply by email

Michael Van Canneyt
to Johann Glaser
Johann Glaser wrote 6 lines
Hi! Studying the WST Wiki page http://wiki.freepascal.org/Web_Service_Toolkit I found that it seems not to be possible to serialize records. What is the difficulty implementing that?

None, I suppose, except that you must parse it :-)

How can I transport a record between two programs? I'd like to have the same memory footprint (because it is forwarded to an USB device), so it would be possible to pseudo-serialize the record into some byte stream before transport.

You could convert your record to a class and transport that. The class is only needed in the transportation step, the rest of the code does not need to see it.

I think WST would greatly benefit from switching to pparser in the FCL. It would put all types available.

Michael.

Reply by email

Johann Glaser
to Michael Van Canneyt

Hi!

Show quoted text 6 lines
> Studying the WST Wiki page > http://wiki.freepascal.org/Web_Service_Toolkit I found that it seems not > to be possible to serialize records. What is the difficulty implementing > that? None, I suppose, except that you must parse it :-)

I see. Are there any problems in the transport, i.e. does e.g. SOAP support structured data?

Show quoted text 8 lines
> How can I transport a record between two programs? I'd like to have the > same memory footprint (because it is forwarded to an USB device), so it > would be possible to pseudo-serialize the record into some byte stream > before transport. You could convert your record to a class and transport that. The class is only needed in the transportation step, the rest of the code does not need to see it.

Do I have to put every record field as a member variable of the class or is it enough to have one member variable of my record type?

I think WST would greatly benefit from switching to pparser in the FCL. It would put all types available.

Do you think of the ws_helper program to parse a Pascal interface?

Bye
Hansi

Reply by email

Michael Van Canneyt
to Johann Glaser
Johann Glaser wrote 11 lines
Hi! > > Studying the WST Wiki page > > http://wiki.freepascal.org/Web_Service_Toolkit I found that it seems not > > to be possible to serialize records. What is the difficulty implementing > > that? > > None, I suppose, except that you must parse it :-) I see. Are there any problems in the transport, i.e. does e.g. SOAP support structured data?

AFAIK, SOAP supports it.

Show quoted text 12 lines
> > How can I transport a record between two programs? I'd like to have the > > same memory footprint (because it is forwarded to an USB device), so it > > would be possible to pseudo-serialize the record into some byte stream > > before transport. > > You could convert your record to a class and transport that. The class > is only needed in the transportation step, the rest of the code does not > need to see it. Do I have to put every record field as a member variable of the class or is it enough to have one member variable of my record type?

No, you need a property per field.

Show quoted text 5 lines
> I think WST would greatly benefit from switching to pparser in the FCL. > It would put all types available. Do you think of the ws_helper program to parse a Pascal interface?

Yes. It now uses a separate unit to parse the pascal interface. I think it would be better to use the pparser unit: that unit supports the complete pascal interface.

Michael.

Reply by email