Best way to post an order data Http post and Context object

we are working on prototype application. If I post order data using http://server:port/invoke/getOrderdata URL, the reply is comming back with in 3 sec. If I post this order data using
Context object(webmethods) the reply is comming back with in 2 sec. I would like to know which way is better to post the data?. which protocol is better?.

“Better” is subjective. If speed is your only concern, then what you’ve found is that using the IS API is better. If independence to switch your application from IS to another integration tool is more desirable, then using HTTP post is better. It comes down to what set of issues do you want to live with? Each option has its pros and cons.

Thanks for your reply Rob, my question was “Http post or
context object”.

Hi Rob Thanks for your reply. Could you please explain me some pros and cons of these two methods.

The Context object is part of the wM IS API.

HTTP post is supported by a wide variety of development tools. The Context object requires coding to the wM IS API.

HTTP post allows your application to easily switch to another server, if desired. Using the wM IS API locks you into IS.

HTTP post is a well known activity, the code for which (in Java code, forms, etc.) is understood by a number of developers. Using the wM IS API requires a slight learning curve.

With HTTP post you can use exising libraries and methods that can be leveraged from various tools or your own libraries. Using the wM IS API will most certainly require new development.

As you’ve seen in your testing, using the Context object results in faster transfers (I’m assuming you measured everything from the connect to the transfer to the close) than with HTTP post.

HTH

HI Rob,

Many thanks for your reply. Personally which method you suggest?

A JMS-based queue, if your environment can support queues between your app and IS. HTTP post would be next on the list. Using wM IS API is at the bottom of my list of preferred connectivity approaches, simply because it requires wM IS-specific knowledge/coding and cannot be leveraged for anything else…

hi

give simple senario of using http.

A web browser is a simple example of using http. :slight_smile:

Please refer to the pub.client:http section of the Built-In services guide for your answer to this very basic question.