En el servicio web sin llamada de los clientes, ¿puedo enviar un archivo y realizar algunas operaciones?

In my application I want to send a source file of some programming language from client to the SOA WS, after this, WS will check for another connected clients, and if client is connected and has an appropriate compiler, my java client application will compile uploaded from WS files, and resends back to WS, after this, WS will resend results to the requested client, how to send files from WS to the client, without client's call, and call clients methods? Is it possible?

preguntado el 03 de mayo de 12 a las 20:05

2 Respuestas

Yes it is possible, but the requested clients must be registered with listener services that in turn receive the request.

In other words, you need to create a service at each client that registers itself and configures an endpoint web service to receive your requests.

Some patterns you could look at are publish/subscribe and factory patterns.

contestado el 04 de mayo de 12 a las 00:05

Could you please, give some examples, how to realize this. I couldn't imagine, how it can send file to the clients, and clients can receive files for compiling. I need a comunication service with clients, can you give some ideas? - test1604

You need to create a program on your client that runs like a web server and waits for incoming messages. Part of that interface for the incoming message would be possibly a file attachment and a command such as compile. - dulcefa

No, you cannot just have a web service, on the server side, push data to a client that isn't there. Web services are pull only.

However, you can have your code call a web service "on the client side", if that's possible, otherwise you'll just have to wait for them to call you.

contestado el 03 de mayo de 12 a las 21:05

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.