web services - passing an Entity as a String With WriteXml and ReadXml

Posts   
 
    
mkamoski avatar
mkamoski
User
Posts: 116
Joined: 06-Dec-2005
# Posted on: 09-May-2006 18:50:52   

All--

Please help.

I have read a few longish threads there in the forums concerning web services.

I need a bit more detail.

It looks like there are at least 4 ways to pass an LLBLGen-generated entity back from a web service...

  1. Write Web Methods that return a DataSet. Then, convert from an Entity to a DataSet and pass the DataSet back.

  2. Write Web Methods that return an Entity. Run WSDL.exe and then hand-edit the proxy class output, changing from DataSet to EntityType as needed.

  3. Write Web Methods that return some kind of Data Transfer Object (DTO).

  4. Write Web Methods that return a String. Convert from the Entity to a String using WriteXml. Then, reconstitute the object on the caller's side using ReadXml.

I expect that there are more options; but, these seem to be a bit common.

My questions are about Option 4--

When one serializes and deserializes an LLBLGen-generated entity, is that object the same on both ends or is the process lossy?

Also, does the same thing apply to LLBLGen-generated TypedLists and View objects?

(FYI, I am using LLBLGen, .NET 1.1, ASP.NET, the LLBLGen Adapter templates, SQL Server 2000, and VB.NET. I am using Entity objects to hold and pass data. I am not using tracking in the objects. )

What do you think?

Please advise.

Thank you.

--Mark Kamoski

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39749
Joined: 17-Aug-2003
# Posted on: 10-May-2006 20:36:14   

llblgen pro's xml code is always targeted on the fact that teh DATA and the change tracking data has to be the same on both ends.

Frans Bouma | Lead developer LLBLGen Pro
mkamoski avatar
mkamoski
User
Posts: 116
Joined: 06-Dec-2005
# Posted on: 12-May-2006 18:59:28   

Otis wrote:

llblgen pro's xml code is always targeted on the fact that teh DATA and the change tracking data has to be the same on both ends.

OK. I think that I get it.

Would it then follow that as long as one uses the built-in LLBLGen serialization, namely the ReadXml() method and the WriteXml() method, that the change tracking data WILL be the same on both ends?

Please advise.

(Note that I am talking about a plain-vanilla, simple CRUD operations, where no fancy/advanced functionality in LLBLGen or elsewhere is being implemented.)

Thank you.

--Mark Kamoski

sparmar2000 avatar
Posts: 341
Joined: 30-Nov-2003
# Posted on: 13-May-2006 18:28:43   

Would it then follow that as long as one uses the built-in LLBLGen serialization, namely the ReadXml() method and the WriteXml() method, that the change tracking data WILL be the same on both ends?

I am not 100% sure what you mean by 'Change Tracking Data', but to date XML stream that I hav created using WriteXML has been OK at the other end as long as I use the same version of LLBL libraries when I do a ReadXML.

Hope this helps.

mkamoski avatar
mkamoski
User
Posts: 116
Joined: 06-Dec-2005
# Posted on: 15-May-2006 15:13:39   

sparmar2000 wrote:

I am not 100% sure what you mean by 'Change Tracking Data', but to date XML stream that I hav created using WriteXML has been OK at the other end as long as I use the same version of LLBL libraries when I do a ReadXML.

Hope this helps.

Yes, that does help.

(FWIW, I was using the term "change tracking data" just because Otis had used that term. I am not 100% what he means by it. I am hoping that he will chime-in.)

Anyway, it sounds like your experiments yeild the same result at mine-- that is, ReadXml and WriteXml work well together.

Thank you.

--Mark Kamoski