soap toolkit3.0无法安装,微信安装不上怎么回事事

vc6控制台程序利用SoapToolkit3.0调用WebService - 清清飞扬 - 博客园
vc6控制台程序利用SoapToolkit3.0调用WebService
1. 首先要安装SoapToolkit3.0安装包并安装(我的安装目录为:D:\Program Files\MSSOAP\)
2. 新建vc控制台程序(空项目),项目名称:WinConsole6InvokeWebService,添加一个c++源文件(main.cpp),将SOAP安装目录下的lib文件D:\Program Files\MSSOAP\Lib\mssoap30.lib复制到项目文件夹下。
3。添加源代码:
#include &stdio.h&
#include &iostream&
#include &vector&
#import "msxml4.dll"
using namespace MSXML2;
#import "C:\Program Files\Common Files\MSSoap\Binaries\MSSOAP30.dll" \
exclude("IStream", "IErrorInfo", "ISequentialStream", "_LARGE_INTEGER", \
"_ULARGE_INTEGER", "tagSTATSTG", "_FILETIME")
using namespace MSSOAPLib30;
void query(char* EndPointURL, char* Namespace, char* method, vector&string&& v)
ISoapSerializerPtr S
ISoapReaderPtr R
ISoapConnectorPtr C
// Connect to the service
Connector.CreateInstance(__uuidof(HttpConnector30));
Connector-&Property["EndPointURL"] = EndPointURL;
// 接口位置
Connector-&Connect();
// 和服务器连接
// Begin message
Connector-&Property["SoapAction"] = _bstr_t(Namespace) + _bstr_t(method);
Connector-&BeginMessage();
Serializer.CreateInstance(__uuidof(SoapSerializer30));
// 将serializer连接到connector的输入字符串
Serializer-&Init(_variant_t((IUnknown*)Connector-&InputStream));
// 创建SOAP消息
Serializer-&StartEnvelope("soap", "", "");
Serializer-&StartBody("body");
Serializer-&StartElement(method, Namespace, "", ""); // 命名空间必须有
for(vector&string&::iterator it = v.begin(); it != v.end(); it++)
Serializer-&StartElement("username", Namespace, "", "");
Serializer-&WriteString(it-&c_str());
Serializer-&EndElement();
Serializer-&EndElement();
Serializer-&EndBody();
Serializer-&EndEnvelope();
Connector-&EndMessage();
// Send the message to the web service
// 读取响应
Reader.CreateInstance(__uuidof(SoapReader30));
Reader-&Load(_variant_t((IUnknown*)Connector-&OutputStream), "");
printf("Answer: %s\n", (const char*)Reader-&RpcResult-&text); // Reader-&RpcResult-&Gettext()等效
int main(int argc, char* argv[])
CoInitialize(NULL);
char* EndPointURL = "http://192.168.0.100/WebService1/Service.asmx";
char* Namespace = "http://tempuri.org/";
vector&string& v1, v2;
v2.push_back("JoeBlack");
query(EndPointURL, Namespace, "Hello", v2);
CoUninitialize();
getchar();
这样,程序就完成了,运行起来就可以得到WebService的服务了。
其中的WebService服务是用ASP.NET2005(C#)开发的,源码如下:
using System.W
using System.Web.S
using System.Web.Services.P
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class Service : System.Web.Services.WebService
public Service () {
//如果使用设计的组件,请取消注释以下行
//InitializeComponent();
[WebMethod(Description = "Let's say \"Hi\"")]
public string Hi()
return "Hello World, Happy New Year!";
[WebMethod(Description = "Hello JoeBlack")]
public string Hello(string username)
return username + ", Happy New Year!";
[WebMethod(Description = "求和的方法")]
public double addition(double i, double j)
return i +
[WebMethod(Description = "求差的方法")]
public double subtract(double i, double j)
return i -
[WebMethod(Description = "求积的方法")]
public double multiply(double i, double j)
return i *
[WebMethod(Description = "求商的方法")]
public double division(double i, double j)
if (j != 0)
return i /
调用的Hello方法,其调用方式如下:
以下是 SOAP 1.2 请求和响应示例。所显示的占位符需替换为实际值。
POST /WebService1/Service.asmx HTTP/1.1
Host: localhost
Content-Type: text/ charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/Hello"
&?xml version="1.0" encoding="utf-8"?&
&soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&
&soap:Body&
&Hello xmlns="http://tempuri.org/"&
&username&string&/username&
&/soap:Body&
&/soap:Envelope&
HTTP/1.1 200 OK
Content-Type: text/ charset=utf-8
Content-Length: length
&?xml version="1.0" encoding="utf-8"?&
&soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&
&soap:Body&
&HelloResponse xmlns="http://tempuri.org/"&
&HelloResult&string&/HelloResult&
&/HelloResponse&
&/soap:Body&
&/soap:Envelope&
以下是 SOAP 1.2 请求和响应示例。所显示的占位符需替换为实际值。
POST /WebService1/Service.asmx HTTP/1.1
Host: localhost
Content-Type: application/soap+ charset=utf-8
Content-Length: length
&?xml version="1.0" encoding="utf-8"?&
&soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"&
&soap12:Body&
&Hello xmlns="http://tempuri.org/"&
&username&string&/username&
&/soap12:Body&
&/soap12:Envelope&
HTTP/1.1 200 OK
Content-Type: application/soap+ charset=utf-8
Content-Length: length
&?xml version="1.0" encoding="utf-8"?&
&soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"&
&soap12:Body&
&HelloResponse xmlns="http://tempuri.org/"&
&HelloResult&string&/HelloResult&
&/HelloResponse&
&/soap12:Body&
&/soap12:Envelope&
以下是 HTTP POST 请求和响应示例。所显示的占位符需替换为实际值。
POST /WebService1/Service.asmx/Hello HTTP/1.1
Host: localhost
Content-Type: application/x-www-form-urlencoded
Content-Length: length
username=string
HTTP/1.1 200 OK
Content-Type: text/ charset=utf-8
Content-Length: length
&?xml version="1.0" encoding="utf-8"?&
&string xmlns="http://tempuri.org/"&string&/string&关于请教Microsoft SOAP Toolkit 3.0安装失败原因?的搜索推荐 -Web-TryCatch
>> 相关推荐
关于的搜索推荐
我的系统为win2000serverpack4(版本5.0内部版本号2195:serverpack4) 安装了visualstudio.net简体中文专业版。 近来我想安装MicrosfotSOAPToolkit3.0,结果出现以下错误提示,安装失败。请问什么原因,怎样解决?谢谢
Thereisaproblemwiththiswindowsinstallerpackage. Aprogramrunaspartofthesetupdidnotfinishas expected.Contactyoursupportpersonnelorpackage vendor.
问题已解决。 到微软下软mircsoftsoaptoolkit3.0安装搞掂。
好像还出了sp了
在WIN2000中安装VF8时,总是提示Microsoft SOAP Toolkit 3.0安装不上去是什么原因?简体win2000+PACK4
------------
出e信息?我安装VF8就完了,]有安装^Mi...
如题,请问如何解决!自己下了一个安装,还是不行!
------------
请参考:FAQ - &安装vfp8.0时,Soap Toolkit 3.0 怎么有时安装不上,如何解决?&http:...
在安装Microsoft SOAP Toolkit 3.0时,出现如下错误提示,不知应该如何解决?安装环境win2000 server,几台服务器上都试过,均出现如下错误码。我本机win2000pro...
安装过程中出现 an error occurred during the installation of assembly component {303994ba-6487-47ae-af1d-7af6088eebdb}, hresult:0x 点击OK,就退...
我用Microsoft Soap Toolkit3.0提供的方法去调用WEBSERVICE,不用代理可以调用,设代理以后怎么都不能成功,总是出错,代理的用户名和密码肯定是对.我IE通过这个代理...
经过测试,如果客户机上不安装Microsoft
3.0就会报"运行时发生错误 429,ActiveX控件无法创建"错误,也就是无法调用webservice有没有朋友帮忙...
我有个VB的代码如下:Set SoapClient = CreateObject("MSSOAP.SoapClient30")'Initialize the SOAP Client object, specifying it's locationCall SoapClien...
------------
错误显示:Cannot initialize SoapClient.WSDLReader:XML Parser failed at linenumber 0,lineposition 0,reason is:系统未找到指定的对象。
谁试过Microsoft SOAP Toolkit 3.0 Samples中的Attach Application?我按照里面的文档配置以后,运行Attach\Client\Rpc\Vb下的AttachCliRpcVb应用程序时总是报...
用high-level api可以吗?
------------
一个 SOAP 实例在下面的例子中,一个 GetStockPrice 请求被发送到了服务器。此请求有一个 StockName 参数,而在响应中则会返回一个 Price 参数。此功能的命名空间...
以下是完整的出错信息:Run-time error '372':Failed to load control 'CommonDialog' from comdlg32.ocx.Your version of comdlg32.ocx may be outdated. M...
------------
According to this:/downloads/default.asp?URL=/code/sample.asp?url=/msdn-files/027/001/580/msdncompositedoc.xmlS...
我从微软上下载了 Soap Toolkit3.0后,使用 InstallShield 打包,可我打包后在其他机器上运行就是发现错误“Automantion 错误”然而再其他机器上安装SOAP SDK后,...
我们现在使用Soap toolkit做项目,底层模块是COM。在使用的过程中产生了一些疑问。
用WSDL Generator可以自COM中生成一些Web Services方法。问题就是是不是要生...microsoft SOAP Toolkit 3.0是什么_百度知道
microsoft SOAP Toolkit 3.0是什么
提问者采纳
本文介绍了如何使用 Microsoft SOAP Toolkit 2。SOAP Toolkit 3.0 支持基于 IIS 安全基础结构的 Internet 安全性SOAP作为一种协议,SOAP Toolkit3。在这两种方案中,安全性都是建立可靠服务的重要因素.0是基于COM的一套SOAP开发组件.0 建立安全解决方案,同服务端Web Service进行通讯.0 提供一个灵活的框架,可以为各种 Intranet 和 Internet 解决方案构建可伸缩的 Web 服务。
Microsoft SOAP Toolkit 3。微软提供了SOAP协议的SDK。 简言之使用 Microsoft SOAP Toolkit 3
提问者评价
其他类似问题
您可能关注的推广
soap的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁

我要回帖

更多关于 lol不能安装怎么回事 的文章

 

随机推荐