cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Wilton" <>
Subject trying to use XSLTJaxbProvider with WebClient (JAX_RS)
Date Fri, 03 Jul 2009 14:27:08 GMT

I am trying to use the new XSLTJaxbProvider as a provider for the JAX-RS

I am getting some null pointer exceptions thrown inside the
createTemplates() method of the provider , due to the 

ui.getPathParameters()  and  the ui.getQueryParameters()   both
returning null


Below is some test code (not spring wired) - is there something I am
missing, that would ensure the MessageContext creates a UriInfo object
correctly?   - or is this simply a bug...    if possible do you have an
example of using XSLTJaxbProvider  with WebClient (HttpCentric) to
consume a webservice.


Thanks, Paul


    WebClient webClient;



    public void setup(){          


        Map<String,String> mediaTemplates = new



        XSLTJaxbProvider xsltJaxbProvider = new XSLTJaxbProvider();



        xsltJaxbProvider.setInParameters(new HashMap<String,Object>());


        List<Object> providers = new ArrayList<Object>();



        webClient = WebClient.create(STORY_SERVICE_URL, providers);   //
= URL to RESTful webservice to consume

        StoryClient = new StoryClient();






    public void getStory() {

        // assume Story object is annotated to be unmarshalled with JAXB
on the transofrmed XML




        Story story = webClient.get(Story.class);



        // assert more stuff


This e-mail (and any attachments) is confidential and may contain personal views which are
not the views of the BBC unless specifically stated. If you have received it in error, please
delete it from your system. Do not use, copy or disclose the information in any way nor act
in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received. Further communication will signify
your consent to this

This e-mail has been sent by one of the following wholly-owned subsidiaries of the BBC:
BBC Worldwide Limited, Registration Number: 1420028 England, Registered Address: BBC Media
Centre, 201 Wood Lane, London, W12 7TQ
BBC World News Limited, Registration Number: 04514407 England, Registered Address: BBC Media
Centre, 201 Wood Lane, London, W12 7TQ
BBC World Distribution Limited, Registration Number: 04514408, Registered Address: BBC Media
Centre, 201 Wood Lane, London, W12 7TQ

  • Unnamed multipart/alternative (inline, 7-Bit, 0 bytes)
View raw message