• Post Reply Bookmark Topic Watch Topic
  • New Topic

On what port does java make web service calls?

 
Johann Dobbins
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using java stubs to make calls to a web service and would like to capture the actually soap requests for debugging purposes. I am trying to use Fiddler2. But none of my requests from java code are captured in Fiddler2. I assume this is because my Fiddler2 is configured to listen for requests on port 8088, which I assume is not the port being used by java. What port does java use?

Thank you.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's not what port Java uses, it's what port the piece of software uses. For web services, you'd generally pass in the URL, which contains the port (unless it's the default port 80). If you're not explicitly passing in the URL, have a look through the source code of the stubs you're using - the URL (and the port) are bound to be in there.
 
Johann Dobbins
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:It's not what port Java uses, it's what port the piece of software uses. For web services, you'd generally pass in the URL, which contains the port (unless it's the default port 80). If you're not explicitly passing in the URL, have a look through the source code of the stubs you're using - the URL (and the port) are bound to be in there.


The piece of software? meaning the webserivce? the webservice is running on port 80, I have tried configuring Fiddler to listen on port 80, but to no avail. It seems I would want to configure fiddler to listen to requests FROM a certain port on my client machine?
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems I would want to configure fiddler to listen to requests FROM a certain port on my client machine?

No. The port from which the request is sent is likely different on every single call. The way proxies work is that the client software accesses the proxy instead of the server, and then the proxy forwards the request to the server. So you should alter the client to access port 8088, and then run Fiddler to listen on port 8088 and forward to port 80.
 
Johann Dobbins
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:
It seems I would want to configure fiddler to listen to requests FROM a certain port on my client machine?

No. The port from which the request is sent is likely different on every single call. The way proxies work is that the client software accesses the proxy instead of the server, and then the proxy forwards the request to the server. So you should alter the client to access port 8088, and then run Fiddler to listen on port 8088 and forward to port 80.


My client is currently calling testserver:80. And I should change my client to call localhost:8088. And then set Fiddler to forward to testserver:80? Any chance you are familiar with fiddler and can advise how to set up this forwarding? I've been looking through documentation, but have been unable to find an example of how to do this.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!