thobens
thobens

Reputation: 1731

Inspect REST request and response generated by jersey and jaxb

I have a method:

@PUT
@Consumes(MediaType.APPLICATION_XML)
@Produces(MediaType.TEXT_PLAIN)
public String createQueue(JAXBElement<Queue> queueElement) {
    // do some stuff here
    return "";
}

Now, when I call this service from my client java application, I would like to inspect the HTTP request that has been created. I want to see the XML (request body) that is created by jaxb. Is there a tool that can observe requests / responses that are made on a particular URL?

Thanks in advance, Andreas

Upvotes: 2

Views: 1260

Answers (3)

Franck
Franck

Reputation: 522

Charles has a much better UI than Fiddler Charles and Fiddler are proxy debuggers. If you just want to sniff the http traffic I recommend Wireshark since it sniff the traffic at the Ethernet level and there is no proxy settings to change

Upvotes: 0

Daniel Moses
Daniel Moses

Reputation: 5858

You can use a simple program that will act as a proxy and display the HTTP requests. There are plenty out there. Since you are using Java I suggest a simple TcpMon. If you use soap a lot also, you can use the built in monitor in soapui. If you also want to watch traffic from your browsers, you might consider fiddler.

Upvotes: 1

dma_k
dma_k

Reputation: 10639

For that I would use Firefox + Firebug, which has nice network panel.

Upvotes: 0

Related Questions