Hi On 10/05/12 04:37, Ted wrote:
thanks for the answer to my previous method Id problem, adding addResourceAndMethodIds worked great.I have a new problem now, I'm trying to use the JAXB to automatically convert parameters and response types to and from java/xml. The method parameter seems to be dissappearing, or I'm missing an annotation or something. All the examples I've seen and documentation seems to show that it should work... My service has the following : @XmlRootElement public static class TestCompositeObject { public int id = 23; public String name = "asdf"; } @PUT @Path("setTest3") @Produces("application/xml") @Consumes("application/xml") public TestCompositeObject setTest3(TestCompositeObject transfer) { logger.info(transfer); return(transfer); } The wadl generated looks a little off, it's missing the params : <resource path="/setTest3"> <method name="PUT" id="setTest3"> <request> <representation mediaType="application/xml" /> </request> <response> <representation mediaType="application/xml" /> </response> </method> </resource> As a result when I generate the stubs from the wadl, it comes out not quite right : @PUT @Consumes("application/xml") @Produces("application/xml") @Path("/setTest3") Response setTest3(); There's no method parameter, and I'm not quite sure if Response should be the return type of if it should have been mapped back to TestCompositeObject. I can't seem to find any documentation on any annotations or any configuration to sort this out.
The explanation is that TestCompositeObject has no any namespace bound to it, please add a namespace attribute to XMlRootElement and you should get the grammar and links properly generated
HTH Sergey
Anyone have any ideas?
-- Sergey Beryozkin Talend Community Coders http://coders.talend.com/ Blog: http://sberyozkin.blogspot.com
