Dave Langley
9/4/2003 6:16:00 PM
Also tried:
vProxyServer.vt=VT_BSTR ;
vProxyServer.bstrVal=SysAllocString(L"192.168.1.2:808") ;
This doesn't cause the setProxy to crap out but the proxy redirection is
ignored...
"Dave Langley" <langley@mappingsolutions.com> wrote in message
news:%23Avxf6wcDHA.3708@tk2msftngp13.phx.gbl...
> Igor,
> Using CSoapMSXMLInetClient looks like it might work and I have a VB
> example working using MSXML4 library directly. However it seems to crap
out
> in VC++. The problem seems to be in passing in the name of the proxy
server.
> I'm using VARIANTS but do not seem to have any luck. Documentation for
VC++
> is non existent!!! Anyone got MSXML4 working in VC++ with proxy support?
>
>
> // m_spHttpRequest set correctly earlier in function
> IServerXMLHTTPRequest2 *pIServerXMLHTTPRequest=m_spHttpRequest ;
>
> VARIANT vProxyServer ;
> VARIANT vByPassList ;
>
> vByPassList.vt=VT_ERROR ;
> vByPassList.bstrVal=(BSTR)DISP_E_PARAMNOTFOUND ;
>
> vProxyServer.vt=VT_ARRAY|VT_BSTR;
> SAFEARRAY *psa;
> SAFEARRAYBOUND bounds={1,0};
> psa=SafeArrayCreate(VT_BSTR,1,&bounds);
> BSTR *bstrArray;
> SafeArrayAccessData(psa,reinterpret_cast<void**>(&bstrArray));
> bstrArray[0]=SysAllocString(L"192.168.1.2:808") ;
> SafeArrayUnaccessData(psa);
> vProxyServer.parray=psa;
>
> // craps out on this line.
>
pIServerXMLHTTPRequest->setProxy(SXH_PROXY_SET_PROXY,vProxyServer,vByPassLis
> t) ;
>
>
>
> Best Regards,
>
> Dave.
>
>
> "Simon Trew" <ten.egnaro@werts> wrote in message
> news:u6XMQ$scDHA.2412@TK2MSFTNGP09.phx.gbl...
> > Yes, I would certainly consider changing the template class just to see
if
> > it works (i.e. eliminate the fact that the proxy is incorrectly
configured
> > or auth details are incorrect). That being said, my experience is
> > thatCSoapMSXMLInetClient is not as fast as others as it has to do a lot
of
> > COM. In practice though this is not a major time consumer in the app as
a
> > whole.
> >
> > "Igor Tandetnik" <itandetnik@mvps.org> wrote in message
> > news:uaBoOMmcDHA.2632@TK2MSFTNGP12.phx.gbl...
> > > Consider using CSoapWininetClient client instead, then you have access
> > > to HINTERNET handles, in particular m_hInternet. Or
> > > CSoapMSXMLInetClient, then you have access to IServerXMLHTTPRequest
> > > interface pointer with its setProxy and setProxyCredentials methods.
> > > --
> > > With best wishes,
> > > Igor Tandetnik
> > >
> > > "For every complex problem, there is a solution that is simple, neat,
> > > and wrong." H.L. Mencken
> > >
> > > "Dave Langley" <langley@mappingsolutions.com> wrote in message
> > > news:uglWwEmcDHA.3044@TK2MSFTNGP11.phx.gbl...
> > > > I'm using VC++ to write an VC++ unmanaged client to communicate to a
> > > C#.NET
> > > > web service. I have the proxy class for the unmanaged client and it
> > > uses the
> > > > default CSoapSocketClientT<> template as it's HTTP connection. This
> > > works
> > > > fine until I start using a proxy server with authorization rather
than
> > > a
> > > > direct HTTP connection. I keep getting a 407 un-authorized response.
> > > I've
> > > > have looked at both the CNTLMAuthObject and CBasicAuthObject objects
> > > in
> > > > combination with the NegotiateAuth method but have had no luck.
> > > >
> > > > I have older VC++ clients that use the CInternetSession class and
I'm
> > > able
> > > > to set the proxy server authorization using the:
> > > >
> > > >
pTSConnection->SetOption(INTERNET_OPTION_PROXY_USERNAME,strLoginName,
> > > > lstrlen (strLoginName)) ;
> > > >
> > >
pTSConnection->SetOption(INTERNET_OPTION_PROXY_PASSWORD,strLoginPassword
> > > ,
> > > > lstrlen (strLoginPassword)) ;
> > > >
> > > > What I what is the CSoapSocketClientT<> equivalent of the
> > > > CInternetSession.SetOption(INTERNET_OPTION_PROXY_USERNAME) and
> > > > CInternetSession.SetOption(INTERNET_OPTION_PROXY_PASSWORD).
> > > >
> > > > Best Regards,
> > > >
> > > > Dave
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>