Hi,
Today web services are not new things. Lots of good examples are there in the internet which teaches us on how to consume a web service. But most of them are using .net, java or php for this. So today I tried to consume a web service using C language. If you know the SOAP messaging format, then it’s just another socket application. I used web service which is located in the http://www.w3schools.com/webservices/tempconvert.asmx . Program uses HTTP POST to call the web service method. In the package there are two projects which can be loaded from VS2010 and Dev-Cplus. For Dev-plus, you might have to link the “ws2_32.lib” from the project options. I know there are lots of very easy methods to consume web services from other languages. But I did this for fun . If you really want to use C, then you will have to use a XML parser library. I think with little changes this can be run in linux as well. Hope this will help you.
These are the reference that I have used for this
http://www.jmarshall.com/easy/http/ - A good tutorial on HTTP
Consuming a Webservice from C/C++
Consuming a Webservice from C/C++
Last edited by Neo on Mon May 30, 2011 10:47 am, edited 2 times in total.
Reason: Placed attachment to the post using "Place Inline" button.
Reason: Placed attachment to the post using "Place Inline" button.
Re: Consuming a Webservice from C/C++
I feel this is Great Friend.
But I don't know what is this? I just feel because You do Great works.
But I don't know what is this? I just feel because You do Great works.
Re: Consuming a Webservice from C/C++
Hi
Thanks Nipuna. You can find about it by visiting this URL
http://www.w3schools.com/webservices/tempconvert.asmx
Basically web service can expose functions to the out side world. So you can call them from your programs . You will find about it more when you are learning java. Also in BIT you have a subject that will tech you the SOAP messaging.
Thanks Nipuna. You can find about it by visiting this URL
http://www.w3schools.com/webservices/tempconvert.asmx
Basically web service can expose functions to the out side world. So you can call them from your programs . You will find about it more when you are learning java. Also in BIT you have a subject that will tech you the SOAP messaging.
Re: Consuming a Webservice from C/C++
Cool.
Thanks for sharing With Us.
Thanks for sharing With Us.
Re: Consuming a Webservice from C/C++
Enigma
You always being a great resource to our community and we all appreciate it very much. Sharing is the greatest thing in the world but unfortunately there is only few people who could understand it.
We were discussing about increasing the activity on ROBOT.LK. At the moment, very few people get the use of ROBOT.LK. This is an open invitation for you to join our team and work together on that. Our only aim is to provide help for people who are lacking access to knowledge resources mostly in rural areas. So they could also learn and practice technology to advance their day to day life.
We also have a Sinhala forum as you can see on the top. I have put that their to make it more Sri Lankan. I would start Tamil as well when we have a good Tamil speaking support member.
Here is a topic that some of us have discussed on this subject. Best ways to promote ROBOT.LK among local community.
Your ideas and suggestions are very important. Let's work together to take ROBOT.LK to more people.
Again, thanks for being a great member.
BR
Neo
You always being a great resource to our community and we all appreciate it very much. Sharing is the greatest thing in the world but unfortunately there is only few people who could understand it.
We were discussing about increasing the activity on ROBOT.LK. At the moment, very few people get the use of ROBOT.LK. This is an open invitation for you to join our team and work together on that. Our only aim is to provide help for people who are lacking access to knowledge resources mostly in rural areas. So they could also learn and practice technology to advance their day to day life.
We also have a Sinhala forum as you can see on the top. I have put that their to make it more Sri Lankan. I would start Tamil as well when we have a good Tamil speaking support member.
Here is a topic that some of us have discussed on this subject. Best ways to promote ROBOT.LK among local community.
Your ideas and suggestions are very important. Let's work together to take ROBOT.LK to more people.
Again, thanks for being a great member.
BR
Neo
Re: Consuming a Webservice from C/C++
Always glad to help Neo. I give my 100% for this. yeah sharing is a great thing. Also that makes a good knowledge flow among us.Sharing is the greatest thing in the world but unfortunately there is only few people who could understand it.
Sure I will post my suggestions and you have my full support for this. Yeh let's work together to take ROBOT.LK to more people.Here is a topic that some of us have discussed on this subject. Best ways to promote ROBOT.LK among local community.
Your ideas and suggestions are very important. Let's work together to take ROBOT.LK to more people.
Enigma
Re: Consuming a Webservice from C/C++
Yes. Enigma Is a Great Person. He Taught Some things of BIT.
He is a Well Suiting Member for EC.
He is a Well Suiting Member for EC.