文件名称:mssoap30.dll
文件大小:493KB
文件格式:DLL
更新时间:2016-12-19 07:47:13
mssoap30
#include "stdafx.h"
#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; //你机器得安装SOAP Toolkit3.0 ,1.0时,用using namespace时报错
void query(char *EndPointURL,char *NameSpace,char *method,int argv_len,char* args[],char* argv[])
{
ISoapSerializerPtr Serializer;
ISoapReaderPtr Reader;
ISoapConnectorPtr Connector;
// Connect to the service
Connector.CreateInstance(__uuidof(HttpConnector30));
Connector->Property["EndPointURL"] = EndPointURL;//"http://localhost/WebService1/Service1.asmx";
Connector->Connect();//和服务器连接
// Begin message
Connector->Property["SoapAction"] = _bstr_t(NameSpace) + _bstr_t(method);//"http://xin.org/getIP";
Connector->BeginMessage();
Serializer.CreateInstance(__uuidof(SoapSerializer30));
// 将serializer连接到connector的输入字符串
Serializer->Init(_variant_t((IUnknown*)Connector->InputStream));
// 创建SOAP消息
Serializer->StartEnvelope("","","");
Serializer->StartBody("");
Serializer->StartElement(method,NameSpace,"","");//命名空间必须有
for(int i=0;i