当前位置:编程学习 > C#/ASP.NET >>

vc++6.0调用WEBSERVECE报错

新手,刚学c++没有多久,想用C++调用WEBSERVECE, 安装了SoapToolkit3.0,在网上查了代码,但是开始的时候就报错,请大家指教!


WebAPI.h
#ifndef _WS_WRAPPER_H_
#define _WS_WRAPPER_H_
 
#import "msxml4.dll" 
#import "C:\Program Files\Common Files\MSSoap\Binaries\MSSOAP30.dll"\exclude("IStream", "IErrorInfo", "ISequentialStream", "_LARGE_INTEGER",\"_ULARGE_INTEGER", "tagSTATSTG", "_FILETIME")
#include <string>
#include <Windows.h>

using namespace MSXML2;
using namespace MSSOAPLib30;  
using std::string;

class WebAPI
{
public:    
    WebAPI(const char *wsURL, 
        const char *wsNameSapce,
        const char *wsMethodName);
    virtual ~WebAPI();    
    string Hello(const string &strName);

private:
    const string _wsURL;
    const string _wsNameSapce;
    const string _wsMethodName;
};


#endif


在Login.cpp引用WebAPI.h的时候,报错了:
d:\软件二\adbit\webapi.h(5) : error C2017: illegal escape sequence
d:\软件二\adbit\webapi.h(5) : error C2017: illegal escape sequence
d:\软件二\adbit\debug\mssoap30.tlh(195) : error C2146: syntax error : missing ';' before identifier 'Dom'
d:\软件二\adbit\debug\mssoap30.tlh(195) : error C2501: '__missing_type__' : missing storage-class or type specifiers
d:\软件二\adbit\debug\mssoap30.tlh(195) : error C2501: 'Dom' : missing storage-class or type specifiers
d:\软件二\adbit\debug\mssoap30.tlh(197) : error C2146: syntax error : missing ';' before identifier 'Envelope'
d:\软件二\adbit\debug\mssoap30.tlh(197) : error C2501: '__missing_type__' : missing storage-class or type specifiers
中间省略一部分..
compilation
Generating Code...
Skipping... (no relevant changes detected)
ADbit.cpp
ADbitDlg.cpp
Error executing cl.exe.
Creating browse info file...
BSCMAKE: error BK1506 : cannot open file '.\Debug\Login.sbr': No such file or directory
Error executing bscmake.exe.

ADbit.exe - 103 error(s), 0 warning(s)

vc++6.0调用WEBSERVECE --------------------编程问答-------------------- 网上找了很多方法,都没办法解决,麻烦各位有解决过这类问题的帮忙解答下! --------------------编程问答-------------------- 没看明白,,, 调webservice引用服务引用不就可以掉了吗? --------------------编程问答-------------------- try
#import "msxml.dll" named_guids raw_interfaces_only
replace 
#import "msxml4.dll" --------------------编程问答--------------------
引用 3 楼 hdt 的回复:
try
#import "msxml.dll" named_guids raw_interfaces_only
replace 
#import "msxml4.dll"


问题依旧! --------------------编程问答--------------------
引用 2 楼 seominho 的回复:
没看明白,,, 调webservice引用服务引用不就可以掉了吗?


Visual c++ 6.0 没有想.net2005 .net2008那样有“添加webservice引用服务的
补充:.NET技术 ,  VC.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,