Thursday, October 6, 2011

How to Read a XML file From Nexus repository

Here I am using the jsersey client library to read xml file from nexus

Specify the URL of the XML

        String BASE_URI = "http://localhost:8080/Nexus";
        WebResource r = c.resource(BASE_URI);
        ClientResponse response = r.get(ClientResponse.class);
        System.out.println( response.getStatus() );
        System.out.println( response.getHeaders().get("Content-Type") );
        String   = response.getEntity(String.class);
        System.out.println(entity);

Thats Done.. It ll display the All XML contents.. 


--
Thank you.


Regards,
Kaleeswaran.S

No comments:

Post a Comment