请问VC++6.0能否连接webservice?应该如何设置
2005-09-02 14:37
537 查看
B:
VC6的开发环境没有提供像VS.NET里的Add Web reference的向导程序,如果您在VC6中开发的程序要连接webservice,通常都是使用SOAP Toolkit SDK来手工添加必须的相关代码,关于SOAP协议的详细信息和VC6的示例程序,请您参考下面的链接:
Web Services Interoperability and SOAP
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnarxml/html/soapinteropbkgnd.asp
SOAP Client Using Visual C++
http://www.codeguru.com/Cpp/COM-Tech/complus/soap/article.php/c3945/
Soap client for C++
http://www.codeproject.com/webservices/SoapClient_CPP.asp
A:谢谢你的帮助
B:很高兴为你解决问题
A:您好,还有点问题
我将SOAP Toolkit 3.0安装后,并且编译了提供的例子
有如下错误:
“
e:/develop/cppsoapclient/soapclient.cpp(6) : error C2772:
#import referenced
a type from a missing type library; '__missing_type__'
used as a placeholder
e:/develop/cppsoapclient/debug/mssoap1.tlh(373) : error
C2061: syntax error
: identifier '__missing_type__'
e:/develop/cppsoapclient/debug/mssoap1.tlh(413) : error
C2061: syntax error
: identifier '__missing_type__'
e:/develop/cppsoapclient/debug/mssoap1.tlh(579) : error
C2146: syntax error
: missing ';' before identifier 'DOM'
...
”
我想和操作系统是否有关?我使用的是WinXp sp2,文档说明中是在
win2000下运行成功的
B:
您好,
编译时错误应该跟您开发所使用的平台无关,由于我推荐给您的示例程序原来用的是老版本的SOAP Toolkit SDK,不知道您有没有参照作者在原文下的注解,里面有在使用SOAP Toolkit SDK下的更新过的程序代码:
Code Update, to use with MSXML4, and, MSSOAP3
http://www.codeguru.com/Cpp/COM-Tech/complus/soap/comments.php/c3945/?thread=48222
您好!
感谢您使用微软合作伙伴新闻组技术支持!很高兴能和您一起讨论问题!
下面这篇文章是关于如何在Native Code(MFC)中调用 Web Service服务,希望对您有所帮助。
Title: Calling webService(managed C# webservice) From MFC(unmanaged) Application by retaining the session using Cookies Conatiner.
URL: http://www.codeproject.com/useritems/CoolWebServiceClient.asp#xxxx
该文章中自带的Sample编译有点问题,我已经帮您修改过了,现在已经能够正常运作,我将在附件中将相关代码发给您。在运行Client(MFC)程序前,首先必须使用IIS建立一个firstwebservice的虚拟目录,在虚拟目录中将用C#开发的WebService导入。Client(MFC)程序将使用http://localhost/firstwebservice/firstwebservice.asmx 去访问WebService服务(服务的调用顺序是:首先通过SetValue设置值,再使用Add方法去计算两数之和)。
VC6的开发环境没有提供像VS.NET里的Add Web reference的向导程序,如果您在VC6中开发的程序要连接webservice,通常都是使用SOAP Toolkit SDK来手工添加必须的相关代码,关于SOAP协议的详细信息和VC6的示例程序,请您参考下面的链接:
Web Services Interoperability and SOAP
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnarxml/html/soapinteropbkgnd.asp
SOAP Client Using Visual C++
http://www.codeguru.com/Cpp/COM-Tech/complus/soap/article.php/c3945/
Soap client for C++
http://www.codeproject.com/webservices/SoapClient_CPP.asp
A:谢谢你的帮助
B:很高兴为你解决问题
A:您好,还有点问题
我将SOAP Toolkit 3.0安装后,并且编译了提供的例子
有如下错误:
“
e:/develop/cppsoapclient/soapclient.cpp(6) : error C2772:
#import referenced
a type from a missing type library; '__missing_type__'
used as a placeholder
e:/develop/cppsoapclient/debug/mssoap1.tlh(373) : error
C2061: syntax error
: identifier '__missing_type__'
e:/develop/cppsoapclient/debug/mssoap1.tlh(413) : error
C2061: syntax error
: identifier '__missing_type__'
e:/develop/cppsoapclient/debug/mssoap1.tlh(579) : error
C2146: syntax error
: missing ';' before identifier 'DOM'
...
”
我想和操作系统是否有关?我使用的是WinXp sp2,文档说明中是在
win2000下运行成功的
B:
您好,
编译时错误应该跟您开发所使用的平台无关,由于我推荐给您的示例程序原来用的是老版本的SOAP Toolkit SDK,不知道您有没有参照作者在原文下的注解,里面有在使用SOAP Toolkit SDK下的更新过的程序代码:
Code Update, to use with MSXML4, and, MSSOAP3
http://www.codeguru.com/Cpp/COM-Tech/complus/soap/comments.php/c3945/?thread=48222
您好!
感谢您使用微软合作伙伴新闻组技术支持!很高兴能和您一起讨论问题!
下面这篇文章是关于如何在Native Code(MFC)中调用 Web Service服务,希望对您有所帮助。
Title: Calling webService(managed C# webservice) From MFC(unmanaged) Application by retaining the session using Cookies Conatiner.
URL: http://www.codeproject.com/useritems/CoolWebServiceClient.asp#xxxx
该文章中自带的Sample编译有点问题,我已经帮您修改过了,现在已经能够正常运作,我将在附件中将相关代码发给您。在运行Client(MFC)程序前,首先必须使用IIS建立一个firstwebservice的虚拟目录,在虚拟目录中将用C#开发的WebService导入。Client(MFC)程序将使用http://localhost/firstwebservice/firstwebservice.asmx 去访问WebService服务(服务的调用顺序是:首先通过SetValue设置值,再使用Add方法去计算两数之和)。
相关文章推荐
- 一个长文档里,包括封面、不同的章节,如果我想封面不设置页眉页脚,每个章节的页眉都不同,请问应该如何设置页眉页脚?
- linux下用ftp命令连接到ftp服务器应该如何查看服务器上的目录文件数
- 请问在Delphi里如何用ADO连接数据库,请大哥们讲解详细点
- jquery应该如何来设置改变按钮input的onclick事件
- 404页面返回状态码应该如何设置呢
- WebService推送数据,数据结构应该如何定义?
- 请问表格纵向滚动时首行首列保持不动,冻结窗口该如何设置?
- linq如何设置连接数据库的字符串
- 无线网络连接不上怎么回事,应该如何解决?
- 如何设置Windows 7远程桌面连接
- Socket中如何设置连接超时
- 今天的问题:请问我这样部署我的Servlet,应该如何修改web.xml啊?
- 如何设置Master页的图像连接
- 请问在C/S系统中如何设置配置文件
- PHP-FPM子进程数量应该如何设置?
- 如何在Webstorm/Phpstorm中设置连接FTP,并快速进行文件比较,上传下载,同步等操作
- WebService CXF 如何设置 timeout
- 如何在Http连接中设置超时?
- socket测试远程地址能否连接并为连接设置超时(转)
- Oracle设置和修改system和scott的口令,并且如何连接到system和scott模式下