BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Using XML & ASP.NET (or what do I *need* to know?)

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi XML
View previous topic :: View next topic  
Author Message
Karl
Guest





PostPosted: Sun Sep 25, 2005 3:55 pm    Post subject: Using XML & ASP.NET (or what do I *need* to know?) Reply with quote



D2005, update 3

I'm trying to learn an acceptable way to marshal complex data between an
ASP.NET web service and an ASP.NET web client. Initially, it will be
enough for the client to display the data from the service, but
eventually, I'll have to write a client that will allow for modification
of the data and return it to the service.

I gather from bits and pieces that I'm reading that I can convert the
data into an XML document and it is this document which is sent to the
client over an HTTP connection. Is this assumption correct?

If so, what's the best way to convert the data into XML? Specifically, I
have this class:

TMyClass = class
private
FNo: Integer;
FDate: TDateTime;
FValue1: Extended;
FValue2: Extended;
FNotes: String;
end;

and in turn, instances of this class are managed by an instance of
TObjectList, FMyObjectList

I've been fooling around with XmlSerializer (System.xml.serialization),
since that seems as if it will convert the "My.." class instances to
formatted XML. On the other hand, all the Microsoft docs talk about
writing the XML to a file, which is not what I want to do.

Can someone put me on the right track please? (Ultimately, do I want to
write a function [Webmethod] in the service which returns an XML
document? Is this even possible?)

TIA.
Back to top
Karl
Guest





PostPosted: Mon Sep 26, 2005 3:21 pm    Post subject: Re: Using XML & ASP.NET (or what do I *need* to know?) Reply with quote



Got it. I had not understood that .NET would automatically marshal complex
types. Though, I've not written a client to consume the service, I've
changed the WebMethod to return the TObjectList and all seems to be working.

"Karl" <kthompson (AT) nospam (DOT) pine-grove.com> wrote

Quote:
D2005, update 3

I'm trying to learn an acceptable way to marshal complex data between an
ASP.NET web service and an ASP.NET web client. Initially, it will be
enough for the client to display the data from the service, but
eventually, I'll have to write a client that will allow for modification
of the data and return it to the service.

I gather from bits and pieces that I'm reading that I can convert the data
into an XML document and it is this document which is sent to the client
over an HTTP connection. Is this assumption correct?

If so, what's the best way to convert the data into XML? Specifically, I
have this class:

TMyClass = class
private
FNo: Integer;
FDate: TDateTime;
FValue1: Extended;
FValue2: Extended;
FNotes: String;
end;

and in turn, instances of this class are managed by an instance of
TObjectList, FMyObjectList

I've been fooling around with XmlSerializer (System.xml.serialization),
since that seems as if it will convert the "My.." class instances to
formatted XML. On the other hand, all the Microsoft docs talk about
writing the XML to a file, which is not what I want to do.

Can someone put me on the right track please? (Ultimately, do I want to
write a function [Webmethod] in the service which returns an XML document?
Is this even possible?)

TIA.



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi XML All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.