• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

On what port does java make web service calls?

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic