Announcement Announcement Module
No announcement yet.
Response - Network Interface Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Response - Network Interface


    I was unsure if this is a good place to post this. In fact, it may be that this deserves to be asked in a Tomcat forum, rather than Spring. In any case:

    I have a Spring-based web application (Spring 3.0, Spring-ws 2.0) running inside of Tomcat 7 in a Windows Server 2008 environment. I am using the MessageDispatcherServlet to map incoming requests on http://server/ws to my application.

    Recently, a new requirement for communicating with legacy applications has caused us to configure the server with 2 different network interfaces with IPs "" and "". Tomcat is set to listen on all interfaces, so the web application has no problem responding perfectly to requests made to either address.

    HOWEVER, it seems that with these legacy applications, it is necessary that my web app responds to their requests from the specific interface. In other words, if legacy app A makes a web service request to my application at "", I need to make sure that the response gets sent back to legacy app A from "". Right now, Windows either chooses a random interface, or whatever is defined in the routing tables as the preferred interface for these outbound calls. Consequently, sometimes it works, sometimes it doesn't.

    I have taken a look a the MessageDispatcherServlet class, as well as others, hoping to find some point in the chain that I can subclass to force the web service to respond over a particular interface depending on the initial request, but it seems that it does not go low-level enough, presumably depending on Tomcat/Java to take care of it.

    Is there a configuration in Spring that I can use to accomplish this?

  • #2
    Hi dougman82,

    it seems to me that will need to be configured on your servers. Your application is responding to the requests correctly and to me this is where Spring's work gets completed.

    However, just a thought why can't you use the ip directly from the legacy app, i.e
    instead of