tags:

views:

74

answers:

1

Hi all,

we have system architecture as so..

    WebApplication --> MediatorService ---> Service Provider --> Device

WebApplication --> which process input and inserts into database.

MediatorService --> is a WebService Application which is running on the same server where WepApplication is running or on the different server

Service Provider --> SMS Service Provider which route the messages send from the Mediator Service Application.

Device --> Which receive the Message from the Service Priovider and act's relavant to that message.

Technologies using:

Java/J2EE, Apache Tomcat Server, Struts2.0 framework

issues :

1 . How can i send the message from MediatorService Application Service Provider

   i used response.SendRedirect("Service Provider URL") , but strange its not 
   working , even though if it works its not the right solution bcoz in out scenaris URL 
   should not change .
     i,e : sendind SMS message to the Service Provider should be Back end processing
  1. And if i use response.SendRedirect("Service Provider URL") i cannot the response returned by Service Provider.

  2. Should use Requestdispatcher.Forward(request,response) or any thing....

    please let mo know your's thoughts on this ASAP.

    thanks in Advance,

    Mahesh

A: 

Correct me if I'm wrong... It sounds like your Web app is making a web service call to your mediator, and then the mediator has to forward the request to the service provider somehow. Normally a web-service call is an HTTP POST with an XML body, so I don't think doing a SendRedirect/Forward with the web app will be able to forward the request to the service provider.

Does your service provider expose a web service interface? If it does, your mediator should probably just make another web service call to the provider, and then the provider can respond back to the mediator with a normal HTTP response, which can then respond back to the web app.

Andy White