• Post Reply Bookmark Topic Watch Topic
  • New Topic

Web service and HTTP Post method

 
akash kumar
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I want to understand the web services. I have gone thru some tutorials. But I got a doubt. Say If a Java program has to get some data like employee details from the .net system by passing employee code, it can be done using the HTTP post method isn't it?. One disadvantage of using HTTP Post method is both the systems should know what is to be sent and what to be received. No description of the method to be called. But the data is sent in key values pairs. Even binary data can be exchanged between the systems. Why do we need web services in this scenario? What is the advantage or disadvantage of using web services over HTTP post method? Hope I am making some sense here. Kindly excuse me and explain if not.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you're mixing a few different concepts and are getting confused as a result.

Firstly, an HTTP POST is not somehow an opposite of a WS. All WS use HTTP (hence the "W" in WS), and a POST would be a natural part of that (namely, if you want to alter data). If you want to receive data, an HTTP GET would be more natural in many circumstances.

Secondly, you mention name/value pairs - data comes in many shapes, and that's just one of them. There's tons of data that does not fit the name/value approach, which is why formats such as JSON and XML are more commonly used in WS.

Lastly, I'm not sure what you mean by "No description of the method to be called" - all WS need to know what parameters to send (otherwise you can't make a successful call) and what data gets sent back (otherwise you can't make sense of the results). Some WS may be stricter (or more complicated) in what they accept, and some more flexible in what they send, but those a design decision, not something that's integral to WS.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!