[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ftpapi] [EXTERNAL] Re: Asynchronous XML Request



Hi,

 

HTTPAPI is a http client with some web service consumer functionality built-in. But in order for your callback approach to work you’d need to use both the client and the server end, because you’d need to set up a web service at both ends that agreed on what to send. So while HTTPAPI can handle the consumer part, the web service part of such a callback is not something HTTPAPI can help you with.

 

An example:

  1. You consume a web service that stores a sales order creation request on a queue at the remote end and the reply provides an id for this sales order request. This you store at your end in your corresponding purchase order.
  2. The remote end processes your sales order request in a batch process. At some point in time it then proceeds to consume a web service on your end with the information about what could be delivered and what couldn’t for example. The payload includes the id you were given in the reply when you consumed the original web service in 1). That way you know which purchase order has been processed and can update it accordingly.

 

The point is that you’d need to set up a corresponding set of web services and web service consumers. HTTPAPI in itself can only help you with the web service consumer part. The web service part is something that needs to be set up on a web server (Apache/IIS/Ngx etc.).

 

 

 

Fra: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx <ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx> På vegne af Randy Susanto
Sendt: 6. februar 2020 07:14
Til: FTPAPI/HTTPAPI mailing list <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Emne: [EXTERNAL] Re: [Ftpapi] Asynchronous XML Request

 

Peder,

 

Thanks for your suggestion.

But there is still a job that need to do both send request and wait respond.

If I want to have more than one message request at one time, it only can process one message at one time (need to wait the respond before can process other message request).

What I want to achieve is the job can send request without waiting the reply so it can process and send other requests.

I read in internet there is "callback" function, is there some function in HTTPAPI that have the same usage as "callback"?

 

Thanks and Regards,

Randy

 

Pada Rabu, 5 Februari 2020 19.05.48 WIB, Udesen, Peder <peder.udesen@xxxxxxxxxxxxxxx> menulis:

 

 

One way of doing it could be to have two data queues – one for request and one for replies.

 

Then you have one ( or more jobs ) listening to the request data queue and send the request to whatever
target and wait for the results to be returned. When it is returned the result is sent to the result data queue.

This means this program handles the communication with the target.

 

The other program or programs send the request to the request data queue continues processing and at some point

checks if any data are returned in the data queue for replies.

If you are using the job information from the job where this job is running as a key then you can distinguish between

the different jobs sending requests when waiting for the reply having the matching key.

 

Take a look in the documentation for QSNDDTAQ, QRCVDTAQ and CRTDTAQ.

I actually made something similar with data queues 25 years ago.

 

Regards

Peder

 

Fra: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx <ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx> På vegne af Randy Susanto
Sendt: 4. februar 2020 15:46
Til: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Emne: [Ftpapi] Asynchronous XML Request

 

Hi All,

 

Is it possible to implement Asynchronous Request XML with Scott's HTTPAPI?

What I mean with "Asynchronous" is sending request and receiving the reply with different job/session.

So, the sending request session not need to wait the reply, and can process other requests. 

Other session will specifically handle that reply.

 

Thanks and Regards,

Randy

 

This email and any files transmitted with it may be confidential and intended solely for the use of the individual or entity to which they are addressed. If you have received this email in error please notify the sender.

--
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi

-- 
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi