0

I am new to webservices. i am working on a project. i am asked to call a rest ful webservice which takes xml as in put. below is the end point.

https://api-something.com/someLocation/status

HTTP method is POST

How can i pass the xml and call the above end point in Java/spring?

How to pass an XML file as an input to the specified end point?

Thanks!

user1016403
  • 12,151
  • 35
  • 108
  • 137

2 Answers2

0

If you want to use Spring, please take a look at Spring Data REST http://www.springsource.org/spring-data/rest#documentation

Here you will find your answer.

Please note that you can also take a look at Jersey (JAX-RS, Java EE standard): http://www.vogella.com/articles/REST/article.html

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
rmuller
  • 12,062
  • 4
  • 64
  • 92
0

If you're writing integration tests then take a look at rest-assured (very easy to use library for rest testing) and it's XML example

If you're writing production code take look at RestTemplate (it is a spring component)

Tomasz Krzyżak
  • 1,087
  • 8
  • 10