Themuppeteer
Programmer
Hello,
I'm writing a sort of test program to use web-services in
visual C++.
I made a console application, and I have a server runnung that works fine. It has a service reboot() that I want to call. If that works, I'll see result immediately when the server is rebooting. The service takes no arguments.
I cant seem to get it working.
is the site I used.
The problem is I think that when I do a connect, I get 0 as result.
// console.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "iostream.h"
#import "msxml3.dll"
using namespace MSXML2;
#import "C:\Program Files\Common Files\MSSoap\Binaries\MSSOAP30.dll" exclude("IStream", "ISequentialStream", "_LARGE_INTEGER", "_ULARGE_INTEGER", "tagSTATSTG", "_FILETIME"
using namespace MSSOAPLib30;
int main(int argc, char* argv[])
{
CoInitialize(NULL);
ISoapSerializerPtr serializer;
ISoapReaderPtr reader;
ISoapConnectorPtr connector;
connector.CreateInstance(__uuidof(HttpConnector30));
char m[64]=" //myserver is a name in the windows 'host' file
//and stands for an ip on the lan.
cout<<m<<endl;
connector->Property["EndPointURL"]=m;
cout<<"result:"<<connector->Connect()<<endl;
connector->BeginMessage();
//Create the SoapSerializer
serializer.CreateInstance(__uuidof(SoapSerializer30));
//Connect serializer to the input stream of the connector
cin.get();
serializer->Init(_variant_t((IUnknown*)connector->InputStream));
//build the soap message
serializer->StartEnvelope("","",""
;
serializer->StartBody(""
;
serializer->StartElement("reboot","","","world"
;
serializer->EndElement();
serializer->EndBody();
serializer->EndEnvelope();
return 0;
Can someone help me out here please ? Greetz,
NOSPAM_themuppeteer@hotmail.com (for mails, remove the NOSPAM_)
Don't eat yellow snow...and don't mess with your fstab!
I'm writing a sort of test program to use web-services in
visual C++.
I made a console application, and I have a server runnung that works fine. It has a service reboot() that I want to call. If that works, I'll see result immediately when the server is rebooting. The service takes no arguments.
I cant seem to get it working.
is the site I used.
The problem is I think that when I do a connect, I get 0 as result.
// console.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "iostream.h"
#import "msxml3.dll"
using namespace MSXML2;
#import "C:\Program Files\Common Files\MSSoap\Binaries\MSSOAP30.dll" exclude("IStream", "ISequentialStream", "_LARGE_INTEGER", "_ULARGE_INTEGER", "tagSTATSTG", "_FILETIME"
using namespace MSSOAPLib30;
int main(int argc, char* argv[])
{
CoInitialize(NULL);
ISoapSerializerPtr serializer;
ISoapReaderPtr reader;
ISoapConnectorPtr connector;
connector.CreateInstance(__uuidof(HttpConnector30));
char m[64]=" //myserver is a name in the windows 'host' file
//and stands for an ip on the lan.
cout<<m<<endl;
connector->Property["EndPointURL"]=m;
cout<<"result:"<<connector->Connect()<<endl;
connector->BeginMessage();
//Create the SoapSerializer
serializer.CreateInstance(__uuidof(SoapSerializer30));
//Connect serializer to the input stream of the connector
cin.get();
serializer->Init(_variant_t((IUnknown*)connector->InputStream));
//build the soap message
serializer->StartEnvelope("","",""
serializer->StartBody(""
serializer->StartElement("reboot","","","world"
serializer->EndElement();
serializer->EndBody();
serializer->EndEnvelope();
return 0;
Can someone help me out here please ? Greetz,

NOSPAM_themuppeteer@hotmail.com (for mails, remove the NOSPAM_)
Don't eat yellow snow...and don't mess with your fstab!