Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What options are available to implement long polling in Delphi with SOAP?

I have a Delphi enterprise application that acts as a client for a Java backend (SOAP, Axis2). Some of my requests take an indeterminate or especially large amount of time to complete, and I would like to implement a long polling solution for SOAP requests.

To the best of my knowledge, I would typically use WS-Addressing for this. It seems, however, that the Delphi SOAP client (WCF) does not implement WS-Addressing.

I am locked into Java and Delphi. I use Axis 2 components, such as lifecycles, but it would be possible for me to transition to another web service engine. I control both the server and client side.

What are my options for implementing long polling in Delphi and Java?

like image 873
stephenwebber Avatar asked Oct 03 '14 22:10

stephenwebber


1 Answers

You say that Java is already used on the server side, and you are locked into Java there (if I understand correctly).

In this case I would first try to use any of the state-of-the-art SOAP implementations for Java EE to implement a Java client side protoype as a "proof-of-concept". The reason behind this advice is that it would give you some hands-on experience with the different options on the Java side (and in web services in general) to implement asynchronous processing.

Porting this proof of concept to Delphi would be the second step then.


Also after doing some research I can not see any reference to specific support for long polling with SOAP (through WS-Adressing or otherwise).

However, "asynchronous SOAP" processing is a common way to handle long running procedures since SOAP 1.2. It is supported for example in JBoss - (Asynchronous web services with JBoss WS).

Maybe you also can consider a different architecture, using a message broker. This is known as SOAP over JMS. There are free and commercial clients for Delphi which would allow to receive the SOAP response from a JMS system.

like image 100
mjn Avatar answered Nov 13 '22 12:11

mjn