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

  • Response - Network Interface

    Hello,

    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 "10.0.0.20" and "10.0.0.21". 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 "10.0.0.21", I need to make sure that the response gets sent back to legacy app A from "10.0.0.21". 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
    http://10.0.0.21/ws
    instead of
    http://server/ws


    Cheers
    Kris

    Comment

    Working...
    X