Is there any way to force the JVM to use a specific source IP address when using the default, built-in java.xml.SOAPConnectionFactory? It appears the default ends up creating HttpSOAPConnection objects (sun private API), which then uses HttpURLConnection underneath the hood. I can't seem to find any system property to make HttpURLConnection use a specific source IP. There is a similar stackoverflow question, but I'm hoping someone else has more information, or a trick I can use.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- Multiple sockets for clients to connect to
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
Http Client from Apache Commons (http://hc.apache.org/httpcomponents-client-ga/) supports this:
"ConnRoutePNames.LOCAL_ADDRESS='http.route.local-address': defines a local address to be used by all default route planner. On machines with multiple network interfaces, this parameter can be used to select the network interface from which the connection originates. This parameter expects a value of type java.net.InetAddress. If this parameter is not set, a default local address will be used automatically."