Multiple RequestBodies

5 views
Skip to first unread message

Parul Jain

unread,
Mar 8, 2012, 11:26:55 AM3/8/12
to fornax-...@googlegroups.com
Dear All

We have a certain requirement to use multiple valueObjects in our resource method.

MyResource{
                     manyVos( String id1, @FirstVO vo1, String id2, @SecondVO vo2) PUT path="/planets/first/${id1}/second/${id2}"
}

Consequently it will generate multiple request bodies in generated method in ResourceBase.

Please guide what should be the right approach to handle such a case. Is there a way to create a composite VO ?

Thanks
parul





Patrik Nordwall

unread,
Mar 10, 2012, 9:50:17 AM3/10/12
to fornax-...@googlegroups.com
Is that supported by Spring?
I don't know if this could work:

     Resource MyResource {
    manyVos(String id1, @CompositeDTO c, String id2) PUT path="/planets/first/${id1}/second/${id2}";
    }

    DataTransferObject CompositeDTO {
    - @FirstVO first
    - @SecondVO second
    }

    DataTransferObject FirstVO {
    String foo
    }

    DataTransferObject SecondVO {
    String bar
    }

/Patrik
Reply all
Reply to author
Forward
0 new messages