473,396 Members | 1,853 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to call a WebService from VC++?

I need to call a function in a WebService from a VC++ 7.1 project. The
WebService requires NTLM authentication and should be the user of the
calling program. How should this be done?

I have found this article from Microsoft:
http://msdn.microsoft.com/library/de...entication.asp
But it looks that it's very low-level. Even if I copy the code generated by
the sproxy.exe program and manually change it; then there still are calls to
CSoapWininetClient::SendRequest (defined in atlsoap.h) which indirectly call
HttpSendRequest, mentioned in the article. Does this mean that I have to
change / write all the code in atlsoap.h by myself too?

And even then; in this article is described how to set the username and
password manually by calling InternetSetOption (although it didn't work for
me). But I don't want the user to enter the data again; he is logged in
already in Windows. I just want to send his credentials to the WebService
like Internet Explorer does this too (when the option User Authentication /
Logon / "Automatic logon only in Intranet zone" or "Automatic logon with
current username and password" is set).

How can I do this?

Eric

P.S. Sorry if I'm in the wrong newsgroup; it's a little difficult for this
subject.
Nov 23 '05 #1
1 5705
Problem solved for me.
In either way a call to HttpSendRequest is made. That function automatically
makes requests with the correct authentication (Kerberos) if the calling
process is being impersonated correctly.
My problem was that I thought the calling process was impersonated and the
WebService requires NT Integrated Login. That was wrong. The calling process
is always running anonymous (probably Local System or so) and the setting
for the WebService was wrong and should have been Anonymous Login.
Authentication checks are made somewhere else.

Eric
"Eric" <ba********@kull.ch.nospam.me.com> wrote in message
news:dc**********@news.hispeed.ch...
I need to call a function in a WebService from a VC++ 7.1 project. The
WebService requires NTLM authentication and should be the user of the
calling program. How should this be done?

I have found this article from Microsoft:
http://msdn.microsoft.com/library/de...entication.asp
But it looks that it's very low-level. Even if I copy the code generated
by the sproxy.exe program and manually change it; then there still are
calls to CSoapWininetClient::SendRequest (defined in atlsoap.h) which
indirectly call HttpSendRequest, mentioned in the article. Does this mean
that I have to change / write all the code in atlsoap.h by myself too?

And even then; in this article is described how to set the username and
password manually by calling InternetSetOption (although it didn't work
for me). But I don't want the user to enter the data again; he is logged
in already in Windows. I just want to send his credentials to the
WebService like Internet Explorer does this too (when the option User
Authentication / Logon / "Automatic logon only in Intranet zone" or
"Automatic logon with current username and password" is set).

How can I do this?

Eric

P.S. Sorry if I'm in the wrong newsgroup; it's a little difficult for this
subject.

Nov 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Thijs | last post by:
Hi, I am developing both a webservice and a Windows Forms webservice client. After I've deployed my webservice to the webserver I update my webservice reference in my client application, but the...
1
by: shailesh | last post by:
Hi All, I have created a ASP.NET web service with a web method. This method retrives data from SQL Server and returns it as an XML string. Now I have added a web reference to this web service...
1
by: dbradley | last post by:
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...
4
by: Tim Gallivan | last post by:
Hello group, I'm trying to develop a proof of concept webservice which asynchronously calls a function in a DLL. The function raises an event when it is finished, and works when used as part of...
2
by: Call Web service dynamically. | last post by:
I have VC++.NET application which takes the Webservice URL at the runtime from the user and it should call the webservice method based on what the user has supplied.
5
by: AliR | last post by:
Hi Everyone, I have a Visual C++ MFC program, and I am trying to use a webservice written in C#. When I add the webservice to my project using Add Web Reference the sproxy compiler complains...
0
by: Sathya | last post by:
Hi, I have a vb.net webservice which takes XMLDocument as a parameter and returns bool. Signature of the method is some thing like this AddXmlEmpDetails(xmlEmp as XMLDocument) as Boolean. I...
0
by: Standist | last post by:
vs.net 2003 I create a webservice using vc.net.In the webservice invoked a method in a dll from third party. I compile and link the program without any error.But I got a error when I debug it,I...
2
by: jojoba | last post by:
Hello to all! I have a fairly simple webservice running in asp.net ajax under c# (vs 2008). I built the service and it runs just dandy when i test it by itself in visual studio. However, to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.