Reputation: 10703
I have a C app running on a unix environment. I need to connect to a RESTful services, so far all my google'ing has shown how to connect to a soap service. To connect to a soap service I create the xml by hand and send that out. People have told me I need to wrap the REST service into a soap service and call the soap service to get to the REST services.
Is there a way I can just import a dll/module and connect to the REST service directly without having to write the SOAP wrapper?
Upvotes: 1
Views: 111
Reputation: 125017
People have told me I need to wrap the REST service into a soap service and call the soap service to get to the REST services.
Stop listening to those people. They don't seem to know what they're talking about.
Is there a way I can just import a dll/module and connect to the REST service directly without having to write the SOAP wrapper?
Read up on REST. Start with How I Explained REST to My Wife. The main idea is to use the HTTP commands/verbs like GET and POST to interact directly with another machine instead of having to wrap things up in complicated envelopes the way SOAP does. Accessing a RESTful server is as simple as making a HTTP request. The key is knowing what to say -- how do you construct an URL for that system that represents the data you want? You need to look to the specific service you're planning to access for that.
If you need help using HTTP from C, take a look at libcurl.
Upvotes: 2