views:

81

answers:

2

Hi every one,

I am a new to Axis2 and SOAP. I recently working on a Axis2 SOAP project, I have create a SOAP server and SOAP client by using java and axis2 implementing session scope. The problem is when I send a request, it returns response back only once. I am unable to make web service keep publishing data periodically untill the session end. Can any body help me...

Thanks in advance

+1  A: 

I might be wrong, but I think since you work with HTTP you can't make the response permanent until you make your client perform calls permanently / periodically.

Permanent Requests --> Permanent Responses

KB22
+1  A: 

I echo KB22's response - HTTP has a request-response flow, so your service is receiving a single request and sending back a single response. Implementing session scope means that you have a logical session for multiple request/responses to be tied together. You have a few options here:

  • Make the client wait until you have all the data to send back in one response. However, if this takes too long you may well get timeout issues on the client.
  • Change your model, so that you send in multiple requests and get back the data in pieces.
  • Change your model to a polling style, where you keep sending requests (and receive empty responses) until all the data is ready to be sent back.
  • Change your protocol to something that is asynchronous (e.g. JMS) so that you send in a request to a queue and at some later time the response turns up on the queue for your client to read.
ajborley