locked
Astoria control xml output format RRS feed

  • Question

  • Hi!

     

    Is it possible to control the outputformat of the xml returned by the query?

    We would like to use an attribute centric mapping.

     

    thx for any help,

    Michael

     

     

    Friday, December 7, 2007 12:45 PM

Answers

  • At present, no you cannot control the format of the output. Right now the system works by implemeting a fixed mapping between the data model being exposed by the service and the target serialization format (JSON or ATOM).  One benefit of having a mapping between the data model and serializations is that it enables code reuse in that you can write client libs, UI widgets, etc once that consume any Astoria-based service.  That said, we are considering allowing custom mapping of resource properties to fields in the payload for the ATOM serialization.  I assume you are after the ability to fully control the serialization output?  If so, I'd be interested to better understand your scenario....  

    Monday, December 10, 2007 9:59 PM

All replies

  • At present, no you cannot control the format of the output. Right now the system works by implemeting a fixed mapping between the data model being exposed by the service and the target serialization format (JSON or ATOM).  One benefit of having a mapping between the data model and serializations is that it enables code reuse in that you can write client libs, UI widgets, etc once that consume any Astoria-based service.  That said, we are considering allowing custom mapping of resource properties to fields in the payload for the ATOM serialization.  I assume you are after the ability to fully control the serialization output?  If so, I'd be interested to better understand your scenario....  

    Monday, December 10, 2007 9:59 PM

  • We try to develop a library on Compact Framework 3.5 to get data from an ado.net entity model.

    The goal would be to use the same classes as generated by the model on the mobile device and to have a service object, which is capable of retrieving the data via Webservice or WFC and automaticaly deserializes it according to it´s type.

     

     

     

    Tuesday, December 11, 2007 8:06 AM
  • Thanks for the reply.  We are looking at how we can interoperate between traditional WCF serializations and those used by Astoria, but dont have anything concrete to talk about yet.   

    Tuesday, December 18, 2007 7:16 AM
  • I'll add that I would like to produce straight XML that is compatible w/ Rails ActiveResource - in general, wrapping my data in the atom format is unnecessary.

     

    Thursday, February 14, 2008 12:24 AM