Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Experts,

A very Good Morning.

I have a web application, where user enter the data and it is stored in my local database (MySQL). I have a SOAP Webservice provided by my customer. I heard REST is new and very reliable and easy to understand. Now my question is I want to use REST Principles with my Customer's SOAP webservices to transfer the data from MySQL to their webservice. Can anyone in here help me out in understanding how to start? I have read about REST Principles and how they work. But Programmatically I have no clue how to start the whole idea (I am new to Dotnet).
Posted

1 solution

You could use REST principles with SOAP, but there's no need to do so.

SOAP provides a means to access specific object methods and properties through XML. REST allows you to specify what to do with an object's methods or properties based on the verb of the request you're making.

So you could build a SOAP service that says, "Here is an envelope that passes some data to a given object, but does not specify a method. Instead, if the request verb is PUT, then set the value of the specified property. If it's GET, then get the value of the property." etc., etc.

But that's kinda silly. You're already encumbering the overhead of processing an XML document when you build a SOAP service. What's the harm in one more node, that explicitly calls the required method?

Although, I suppose, if you wanted to be super-duper sure your client requests are calling the right thing, you could check the request verb and make sure it matches the method in the SOAP request.
 
Share this answer
 
Comments
sudevsu 29-Dec-14 10:55am    
Thank you Doug. So you mean to say "when you can directly go in one step, why you need to take two steps?". Is this what you exactly mean?
Doug Vanderweide 29-Dec-14 15:05pm    
Yes.
sudevsu 29-Dec-14 15:29pm    
Got It. Thank you
sudevsu 29-Dec-14 11:14am    
http://apps.test.tire-hq.com/thq/services
This is my webservice that I want to Consume. So when I add this to my solution using Add web reference, It throws me an error. Can you tell me why.
Doug Vanderweide 29-Dec-14 15:06pm    
Not without knowing what error message you get, no.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900