Ben
Ben

Reputation: 62394

Is Jax-RS the right solution for communicating with web services?

I'm going to be beginning a project soon that will be written in Java and will communicate with a PHP based web service. I initially thought with what I was reading that Jax-RS would be the right solution because I thought that my Java side would need to be a Web Service. Since then I've learned it won't, but it'll have a lot of communicating to do with Java. Is Jax-RS a good solution if I'm sending requests and receiving responses? Is there another tool or just standard java?

Upvotes: 2

Views: 406

Answers (3)

yegor256
yegor256

Reputation: 105083

Try RestTester from rexsl-test client. It is a RESTful client with built-in assertion functionality. You make requests and run assertions on response using a simple fluent interface.

Upvotes: 0

Arjan Tijms
Arjan Tijms

Reputation: 38163

If you want to consume (RESTful) web services, then you could use a so-called client-API. Most JAX-RS implementations like Jersey or RESTEasy include one, e.g:

Consuming RESTful Web Services With the Jersey Client API

Do note that this isn't yet part of the JAX-RS standard, but it soon will be:

Upvotes: 2

Brian Roach
Brian Roach

Reputation: 76908

Standard Java: HttpUrlConnection

3rd Party: Apache HttpClient

Upvotes: 0

Related Questions