用C调用Web服务 [英] calling webservice with C
本文介绍了用C调用Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
谁能告诉我如何通过linux使用C语言调用网络服务?
我对此一无所知
我只知道如何将肥皂请求写入Web服务.
can any one tell me how to call webservice using C language through linux ?
i have no idea about that
i only know how to write soap request to web service
推荐答案
您将需要使用套接字编程来连接到服务,并构造自己的HTTP请求响应处理程序以管理协议.从Windows/Solaris到Solaris/Linux,我都是自己做的,所以我知道这是一个可行的主意.使用Google查找有关这两个主题的资源.
You will need to use socket programming to connect to the service, and construct your own HTTP request response handler to manage the protocol. I have done this myself in the past from Windows/Solaris to Solaris/Linux, so I know it is a feasible idea. Use Google to find resources on both these subjects.
如果您使用VS IDE,只需添加Web Refrence,VS就会为您创建代理
If you use the VS IDE, just add Web Refrence , VS will create the proxy for you
您总是可以使用一个库,但我知道 gSOAP [ ^ ].该库使与C/C ++的连接相对简单(但请先阅读所有文档!).
You can always use a library for this, off the top of my head, I know gSOAP[^]. The library makes the interfacing into C/C++ relatively simple (but please, read all the documentation FIRST!).
这篇关于用C调用Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文