Question about WebService support

Posts   
 
    
chrisa23
User
Posts: 12
Joined: 04-Apr-2006
# Posted on: 04-Jun-2006 16:35:33   

Seems to be implemented in the Beta, and I have been trying to get things to work.

  • What can be passed:
    • Enitites/EntityCollections
    • Generic collections?
    • Entities with related collections?
    • Collections of entities with related collections?

I have a relatively small set of "items" that represent pieces of a job... They are somewhat complex, with multiple options and option details... All the pieces are very small, and there are very few total "items"...

I'm caching them on the client side, but I'd like to avoid having to disassemble them and reassemble them on the other side of the Webservce...

ie how best to send a small but complicated object graph...

sparmar2000 avatar
Posts: 341
Joined: 30-Nov-2003
# Posted on: 04-Jun-2006 17:54:27   

Hi

Please have a look at "Generated code - XML Webservices support" section of the manual. Feel free to come back if this does not answer to query.

Also, please be aware that there is no way of avoiding serializing/deserializing when webservices exchange data. I mention this because I am a bit uncertain what you mean by assemble/disassemble.

chrisa23
User
Posts: 12
Joined: 04-Apr-2006
# Posted on: 04-Jun-2006 18:06:34   

I have read that...

I have things passing... I have to update the proxy for EntityCollections on regeneration, but that's easy...

Basically I'm trying to figure out how to send a collection of ItemEntities that contain their sub collection of OptionEntities which in turn contains its sub collection of OptionDetailEntities...

I don't want to send all the individual objects across in sep collections and have to re-assemble on the other side... (hence what I mean by dis/assemble)

Generics seem to be a no...

I can pass regular entity collections fine... Just doesn't seem like they come across with the prefetched collections and sub collections...

This might partially be explained by the v2 Entity sub collections are generic...???

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39928
Joined: 17-Aug-2003
# Posted on: 04-Jun-2006 18:12:47   

When you serialize through a webservice a graph of entities with entitycollections (generic collections), the data inside the entitycollections is lost?

Frans Bouma | Lead developer LLBLGen Pro
chrisa23
User
Posts: 12
Joined: 04-Apr-2006
# Posted on: 04-Jun-2006 18:47:02   

Otis wrote:

When you serialize through a webservice a graph of entities with entitycollections (generic collections), the data inside the entitycollections is lost?

No... I'm just retarded...

I do seem to have some issues with my SchemaImporter... I have to replace DataSet with EntityCollection in the generated proxy references.cs... It does Entities fine in the proxy...

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39928
Joined: 17-Aug-2003
# Posted on: 05-Jun-2006 11:46:55   

Ah OK. I do remember that there was a problem with generic collections and WSDL. (same with SOAP formatter, also doesn't support them). So if you return an entity which contains entitycollections, it works OK, if you return an entitycollection from a webmethod, use the non-generic collection 'EntityCollection' instead of 'EntityCollection<T>'.

Frans Bouma | Lead developer LLBLGen Pro
chrisa23
User
Posts: 12
Joined: 04-Apr-2006
# Posted on: 05-Jun-2006 14:01:58   

Thanks for the clarification... I had read somewhere about web services having a problem with generic collections, and that they switched them to typed arrays for the return type...

This got me confused, but now I am cooking...