473,782 Members | 2,436 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VC++ sproxy generated SOAP-requests support NTLM?

Hallo all, I have to find a bug in an existing software I have taken over
from someone that left our company. It's written in VC++ 7.1 using ATL and
connects to a webservice calling a method there. (It's a Windows Service
running in a DLL with svchost.exe using a thread that impersonates some
person using RpcImpersonateC lient() etc..)

The problem is that the SOAP request needs to connect with NTLM
authentication. With a network sniffer I found out that this doesn't work.
When I change in IIS the authentication mode to anonymous it works (cannot
remain like this).

The WebService call is made by the auto-generated function of the
sproxy-generated header file. I cannot find where to put authentication - or
should this work automatically? (If yes, what can I check to narrow the
bug?)

The only thing I found out, was this instruction from Microsoft:
http://msdn.microsoft.com/library/de...inetclient.asp
Is this the way to go? Do all by myself?

Any help apreciated.

Eric
Here's the auto-generated code of that function:
----
template <typename TClient>
inline HRESULT CTspiConnectT<T Client>::GetAll Lines(
BSTR passKey,
TspiLine** GetAllLinesResu lt, int* __GetAllLinesRe sult_nSizeIs
)
{
if ( GetAllLinesResu lt == NULL )
return E_POINTER;
if( __GetAllLinesRe sult_nSizeIs == NULL )
return E_POINTER;

HRESULT __atlsoap_hr = InitializeSOAP( NULL);
if (FAILED(__atlso ap_hr))
{
SetClientError( SOAPCLIENT_INIT IALIZE_ERROR);
return __atlsoap_hr;
}

CleanupClient() ;

CComPtr<IStream > __atlsoap_spRea dStream;
__CTspiConnect_ GetAllLines_str uct __params;
memset(&__param s, 0x00, sizeof(__params ));
__params.passKe y = passKey;

__atlsoap_hr = SetClientStruct (&__params, 1);
if (FAILED(__atlso ap_hr))
{
SetClientError( SOAPCLIENT_OUTO FMEMORY);
goto __skip_cleanup;
}

__atlsoap_hr = GenerateRespons e(GetWriteStrea m());
if (FAILED(__atlso ap_hr))
{
SetClientError( SOAPCLIENT_GENE RATE_ERROR);
goto __skip_cleanup;
}

__atlsoap_hr = SendRequest(_T( "SOAPAction :
\"http://blablabla/GetAllLines\"\r \n"));
if (FAILED(__atlso ap_hr))
{
goto __skip_cleanup;
}
__atlsoap_hr = GetReadStream(& __atlsoap_spRea dStream);
if (FAILED(__atlso ap_hr))
{
SetClientError( SOAPCLIENT_READ _ERROR);
goto __skip_cleanup;
}

// cleanup any in/out-params and out-headers from previous calls
Cleanup();
__atlsoap_hr = BeginParse(__at lsoap_spReadStr eam);
if (FAILED(__atlso ap_hr))
{
SetClientError( SOAPCLIENT_PARS E_ERROR);
goto __cleanup;
}

*GetAllLinesRes ult = __params.GetAll LinesResult;
*__GetAllLinesR esult_nSizeIs = __params.__GetA llLinesResult_n SizeIs;
goto __skip_cleanup;

__cleanup:
Cleanup();
__skip_cleanup:
ResetClientStat e(true);
memset(&__param s, 0x00, sizeof(__params ));
return __atlsoap_hr;
}
Nov 23 '05 #1
1 2168
I've started a new thread and have got a solution meanwhile.
See thread with subject
"How to call a WebService from VC++?"
just some days later.

Eric
Nov 23 '05 #2

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

Similar topics

0
2878
by: Rushikesh Joshi | last post by:
I have really no any idea how can i trace the error that are generated at runtime. Like invalide arguments, error in type conversion, user already registered, user deactive.. This fault strings are generated by server but i m unable to trake it using SOAP::Lite I have tried to... use SOAP::Lite +trace => 'debug';
0
2247
by: EagleRed | last post by:
I have written a Web service that I must access from a modified VC++ 6.0 console application. I am using the SOAP Toolkit version 2.0. I am using the HttpConnector, and the SoapSerializer to construct the SOAP envelope for the request. I am able to connect to the Web service and to invoke the call. In the ASP.NET (C# code) I can see the call be made from the client. However, all the input parameters are null. All the calls in the client to...
0
4203
by: Leonid | last post by:
Hello, Please help me to resolve next problem: I have Web service installed on the network and I can communicate with it via WSDL file from several applications including VC++6 application using SOAP Toolkit 2. After that I installed VC++ .NET 2003 and tried to generate proxy class using 'Add Web Reference .' menu (SProxy.exe). This wizard just failed to generate right proxy class because it always returns S_OK error code, but can't...
0
1750
by: Dan A | last post by:
I have a SOAP written in Java, and being served by Apache Axis - using the wrapped mode. I then used VS 2003 to generate C# client stubs. I have many complex types that are returned - and these work fine for the most part. The current problem I have (Which appears to be a bug with .NET - but I can't seem to find a place to report .NET bugs without paying money) is that when I call a method that returns an array of one of my own...
1
2196
by: Ben Crinion | last post by:
I dont think my generated classes are creating a correctly formatted soap envelope I have entered the WSDL into the WebServices Studio app (app is from here http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=65a1d4ea-0f7a-41bd-8494-e916ebc4159c) and used the Studio to invoke the service. It gives you the option to view the envelope and it looks like this:- <?xml version="1.0" encoding="utf-16"?>
2
2047
by: quortex | last post by:
Hi all, I have written a web service using the .net framework 2 and Visual Studio 2005. I consume the managed service by native C++ using the "add web reference" feature. This obviously shells out sproxy.exe to generate the proxy code. All well and good despite the fact sproxy seems seriously in need of an update and from what i can gather on other threads possible not going to. I am in a situation where I cannot use C++/CLI and the...
1
317
by: Frederiek | last post by:
Hi, I need to create a Windows service that has to access a web service through a SOAP interface. I am using Visual C++ 2005. Thus far I have not really created .NET applications. Up to now I used VC++ 2005 for creating non-CLR applications. However, it seems that the SOAP Toolkit has been deprecated, and the alternative is to use the .NET Framework. Knowing only very little about SOAP (and .NET) at this moment, I have a hard
4
2792
by: IanWright | last post by:
I'm trying to extend an existing soap webservice by adding in a couple of new methods, however I'm having a problem in getting the client to run the method calls and I'm not sure why. I've not had much soap experience so I've tried to replicate what is already working correctly, but presently I'm not sure where to look, or go about resolving the issue... This is what I've got (just a note, Client code is C#, Server code is C++) Client ...
0
1273
by: sskvp | last post by:
There are millions of samples in the internet explain how to insert a multi node SOAP Header. What I mean is that there are plenty of examples in the internet show how to do the following: <SOAP-ENV:Header> < Security > <Username>AUSER</Username> < Password >APassword</Password> </Security> </SOAP-ENV:Header> But what I want to do is ,
0
1357
by: sskvp | last post by:
There are millions of samples in the internet that explains how to insert a multi node SOAP Header. What I mean is that there are plenty of examples in the internet show how to do the following: <SOAP-ENV:Header> < Security > <Username>AUSER</Username> < Password >APassword</Password> </Security> </SOAP-ENV:Header>
1
10080
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9944
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8968
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7494
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6735
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5378
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4044
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2875
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.