Solved

Using HttpURLConnection/Apache Http Client on particular outbound port

Posted on 2009-04-13
2
920 Views
Last Modified: 2013-11-21
Hi,
    I use HttpURLConnection and Apache HttpClient in program which submits data to the web server. Whenever the http connection is established b/w client program and web server. the client uses different outbond port on client side. Is there a way for fixed outbond port. B'cos client machine is behind firewall which restricts the random outbond port used by program.
Regards,
Nirav Pradhan

0
Comment
Question by:Nirav_Pradhan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 16

Expert Comment

by:The--Captain
ID: 24128754
If you don't see it in the documentation for the API, then no, you probably cannot specify the source port.  I'm guessing there might be lower-level TCP/IP APIs you could access to get this done (if this is a web applet, the security manager might be annoying (is that a problem anymore?)  I haven't written java code in over a decade), but you might end up having to re-invent the wheel (or at least become a serious code-scavenger) in order to implement HTTP protocol functionality while being able to specify a source port.

Does that help at all?

Cheers,
-Jon
0
 

Accepted Solution

by:
Nirav_Pradhan earned 0 total points
ID: 24128813
Dear Jon,

      You're telling its not possible to do so. Even if its possible, I might have to develope myself. I like to do, but the time doesnt permit so. If you get some idea suggest me. I have one solution, that is using proxy server at client machine. Is it correct? The server application runs on particular port, why cant it be possible for the client? If it is, pls suggest how its done.

Regards,
Nirav Pradhan
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question