• Post Reply Bookmark Topic Watch Topic
  • New Topic

Http Client and Rest commmunication  RSS feed

 
Gerald Amalraj
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have Junit test case in which I'm using Http Client to communicate with a web service. The Junit test case and the service endpoint of the web service were configured in the same workspace of eclipse.

There's no server of any kind is involved

When I execute the test case it connects with the service endpoint of the restful webservice

I'm using uri of http://localhost:8080/<projectname>/<servicename>; in the Http client

My question is :

how the service uri (http://localhost:8080/<projectname>/<servicename>;) is getting identified in the endpoint without the server.

will this host and port be configured inside any of the windows service ?

where I'm suppose to look ? I'm damn sure I wasn't using any explicit server

Regards
Gerald.J
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which HTTP client are you using? The one from Apache?

If your test is connecting to http://localhost:8080/... then there must be some server process that is listening on that port.

If you don't know what's listening on that port, then you can for example use the netstat command (on Windows) to find out what process is listening on that port.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!