Well, I'm assuming that's what it's currently using to generate the XML it is, 
it's just that as wonderfully correct that XML is, I need to break it. I 
suppose I can create a DABustificatedXmlResponseWriter subclass, but I'm 
starting to question the wisdom of using the ERRest hammer on this particular 
bolt.

Dave
        
On Sep 1, 2010, at 10:50 AM, Martin Samm wrote:

> Dave,
> 
> haven't tried it (yet) but i think ERXAbstractRestResponseWriter (or the 
> subclass ERXXmlRestResponseWriter) might be what you're looking for.
> 
> 
> On 1 September 2010 15:40, David Avendasora <[email protected]> wrote:
> Hi all,
> 
> I know this is a Wonder question, but for some reason the source forge mail 
> servers tend to refuse my mail.
> 
> I'm trying to use ERRest to replace some existing XML service calls, the 
> problem is that the current formatting of the XML files produced is somewhat 
> arbitrary, as in it doesn't match the data model.
> 
> For example, we have two entities: Identity and Account. Each identity can 
> have multiple accounts, but in the XML, they are flattened into a "person" 
> node so we currently have:
> 
> <person>
>        <id>1928374</id>
>        <username>StrudelCutie4427</username>
>        <firstname>Heinz</firstname>
>        <lastname>Doofenshmirtz</lastname>
> </person>
> 
> ERRest is producing:
> 
> <Accounts type="Account" id="10201040013">
>        <userName>StrudelCutie4427</userName>
>        <identity type="Identity" id="1040013">
>                <id>1928374</id>
>                <firstname>Heinz</firstname>
>                <lastname>Doofenshmirtz</lastname>
>        </identity>
> </Accounts>
> 
> So I want to override not just what the entities are called (just for this 
> one request - not for all requests against Account and Identity) but I also 
> want to flatten some of the relationships and rename attributes.
> 
> I can't see any built-in way to do this kind of toying with the object graph, 
> unless I'm missing something.
> 
> So, if ERRest can't do it, what would be some suggestions on how to do it? 
> Create a non-EO class that manually flattens the information and have ERRest 
> vend that?
> 
> Dave _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/martin.samm%40aetopia.com
> 
> This email sent to [email protected]
> 
> 
> 
> -- 
> Martin Samm
> Aetopia Ltd
> +44 (0) 28 9099 8767
> ____________________________________________________________________________
> Aetopia Ltd is a limited company registered in Belfast, Northern Ireland,
> with registration number NI053321, having its principal place of business
> (and postal address) at ECIT Institute, Queens Road, BELFAST BT3 9DT
> and registered office at 1, Lanyon Quay, BELFAST BT1 3LG
> 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to