Accessing a webservice using VC++.Net

D

dbradley

Hi, I am trying to access a webservice using VC++.Net. When I try and
add a webservice using Project/Add Webservice I get to messages: "No
Web References were found on this page" and "the request failed with
HTTP status 407:proxy Access Denied" Can anybody "baby step" me
through the procedure I need to follow in order to remedy this problem.

I just use C++ for its computational speed and am not a professional
programmer.
 
G

Guest

I prefer to write webserivce server and client via gSOAP toolkit.
Here is the steps to run its calc sample project.

steps to build the calc server:
compile the header to generate stubs with soapcpp2.exe
D:\3rd\gsoap-win32-2.7\soapcpp2.exe
D:\3rd\gsoap-win32-2.7\samples\calc\calc.h
create an empty VC project, rename calcserver.c to calcserver.cpp, add
calc.h, calcserver.cpp, soapC.cpp, soapServer.cpp,stdsoap2.cpp to this
project.
add a line to calcserver.cpp #pragma comment(lib,"wsock32.lib")
add path of stdsoap2.h to include directory of the project.
build the project.
start the server:
calcserver 1010


steps to build the cacl client:
compile the header to generate stubs with soapcpp2.exe
D:\3rd\gsoap-win32-2.7\soapcpp2.exe
D:\3rd\gsoap-win32-2.7\samples\calc\calc.h
create an empty VC project, rename calcclient.c to calcclient.cpp, add
calc.h, calcclient.cpp, soapC.cpp, soapClient.cpp,stdsoap2.cpp to this
project.
add a line to calcclient.cpp #pragma comment(lib,"wsock32.lib")
add path of stdsoap2.h to include directory of the project.
modify server string in calcclient.cpp
const char server[] = "http://127.0.0.1:1010/calcserver";
build the project.
start the client
calcclient add 1 2
start the client
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top