Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - Proxy authentication required error when calling wsdl.exe

Reply
 
Old 12-26-2006   #1 (permalink)
sundanceca


 
 

Proxy authentication required error when calling wsdl.exe

Hi... I'm trying to get some wsdl for ws call from powershell (weather
service example from keith hill's blog)... The code looks like this:

PoSH 1> wsdl.exe http://www.webservicex.net/WeatherForecast.asmx?WSDL
PoSH 2> csc /t:library WeatherForecast.cs
PoSH 3> [Reflection.Assembly]::LoadFrom("$pwd\WeatherForecast.dll")
PoSH 4> $weatherService = new-object WeatherForecast
PoSH 5> $forecast = $weatherService.GetWeatherByZipCode(80526)
PoSH 6> $forecast

I run that and get:

Error: There was an error processing
'http://www.webservicex.net/WeatherForecast.asmx?WSDL'.
- There was an error downloading
'http://www.webservicex.net/WeatherForecast.asmx?WSDL'.
- The request failed with HTTP status 407: Proxy Authentication Required.


Disclaimer: I'm behind a corporate firewall. Everything here uses a proxy...

How do I set up the proxy in Powershell?

Thanks,

Steve.

My System SpecsSystem Spec
Old 12-27-2006   #2 (permalink)
Keith Hill [MVP]


 
 

Re: Proxy authentication required error when calling wsdl.exe

"sundanceca" <sundanceca@discussions.microsoft.com> wrote in message
news:01897E14-A0EF-4FE0-9BBD-3B9A0909684A@microsoft.com...
> Hi... I'm trying to get some wsdl for ws call from powershell (weather
> service example from keith hill's blog)... The code looks like this:
>
> PoSH 1> wsdl.exe http://www.webservicex.net/WeatherForecast.asmx?WSDL
> PoSH 2> csc /t:library WeatherForecast.cs
> PoSH 3> [Reflection.Assembly]::LoadFrom("$pwd\WeatherForecast.dll")
> PoSH 4> $weatherService = new-object WeatherForecast
> PoSH 5> $forecast = $weatherService.GetWeatherByZipCode(80526)
> PoSH 6> $forecast
>
> I run that and get:
>
> Error: There was an error processing
> 'http://www.webservicex.net/WeatherForecast.asmx?WSDL'.
> - There was an error downloading
> 'http://www.webservicex.net/WeatherForecast.asmx?WSDL'.
> - The request failed with HTTP status 407: Proxy Authentication Required.
>
>
> Disclaimer: I'm behind a corporate firewall. Everything here uses a
> proxy...


Yeah the first time I run it from home WLOC pops up a dialog asking me if I
want to unblock wsdl.exe. I unblocked it and on the second attempt I was
able to retrieve the WSDL.

--
Keith


My System SpecsSystem Spec
Old 12-27-2006   #3 (permalink)
sundanceca


 
 

Re: Proxy authentication required error when calling wsdl.exe

a firewall block and a proxy denial are two different things, right?



"Keith Hill [MVP]" wrote:

> "sundanceca" <sundanceca@discussions.microsoft.com> wrote in message
> news:01897E14-A0EF-4FE0-9BBD-3B9A0909684A@microsoft.com...
> > Hi... I'm trying to get some wsdl for ws call from powershell (weather
> > service example from keith hill's blog)... The code looks like this:
> >
> > PoSH 1> wsdl.exe http://www.webservicex.net/WeatherForecast.asmx?WSDL
> > PoSH 2> csc /t:library WeatherForecast.cs
> > PoSH 3> [Reflection.Assembly]::LoadFrom("$pwd\WeatherForecast.dll")
> > PoSH 4> $weatherService = new-object WeatherForecast
> > PoSH 5> $forecast = $weatherService.GetWeatherByZipCode(80526)
> > PoSH 6> $forecast
> >
> > I run that and get:
> >
> > Error: There was an error processing
> > 'http://www.webservicex.net/WeatherForecast.asmx?WSDL'.
> > - There was an error downloading
> > 'http://www.webservicex.net/WeatherForecast.asmx?WSDL'.
> > - The request failed with HTTP status 407: Proxy Authentication Required.
> >
> >
> > Disclaimer: I'm behind a corporate firewall. Everything here uses a
> > proxy...

>
> Yeah the first time I run it from home WLOC pops up a dialog asking me if I
> want to unblock wsdl.exe. I unblocked it and on the second attempt I was
> able to retrieve the WSDL.
>
> --
> Keith
>
>
>

My System SpecsSystem Spec
Old 12-27-2006   #4 (permalink)
Keith Hill [MVP]


 
 

Re: Proxy authentication required error when calling wsdl.exe

"sundanceca" <sundanceca@discussions.microsoft.com> wrote in message
news:030DFB69-9FAE-4617-B50E-D66A8E2A179B@microsoft.com...
>a firewall block and a proxy denial are two different things, right?
>


If you have those sort of privileges, then check out the WSDL parameters:

/username:<username>
/password:<password>
/domain:<domain>
The credentials to use when connecting to a server that
requires authentication. Short forms are '/u:', '/p:' and '/d:'.

/proxy:<url>
The url of the proxy server to use for http requests.
The default is to use the system proxy setting.

/proxyusername:<username>
/proxypassword:<password>
/proxydomain:<domain>
The credentials to use when the connecting to a proxy server that
requires authentication. Short forms are '/pu:', '/pp:' and '/pd:'.

--
Keith


My System SpecsSystem Spec
Old 12-27-2006   #5 (permalink)
Jeffrey Snover [MSFT]


 
 

Re: Proxy authentication required error when calling wsdl.exe

The weatherForecast object instance appearsh have the ability provide this
info:
PS> $weatherService = new-object WeatherForecast
PS> $weatherService |gm -membertype property


TypeName: WeatherForecast

Name MemberType Definition
---- ---------- ----------
AllowAutoRedirect Property System.Boolean AllowAuto...
ClientCertificates Property System.Security.Cryptogr...
ConnectionGroupName Property System.String Connection...
Container Property System.ComponentModel.IC...
CookieContainer Property System.Net.CookieContain...
Credentials Property System.Net.ICredentials ...
EnableDecompression Property System.Boolean EnableDec...
PreAuthenticate Property System.Boolean PreAuthen...
Proxy Property System.Net.IWebProxy Pro...
RequestEncoding Property System.Text.Encoding Req...
Site Property System.ComponentModel.IS...
SoapVersion Property System.Web.Services.Prot...
Timeout Property System.Int32 Timeout {ge...
UnsafeAuthenticatedConnectionSharing Property System.Boolean UnsafeAut...
Url Property System.String Url {get;s...
UseDefaultCredentials Property System.Boolean UseDefaul...
UserAgent Property System.String UserAgent ...
--
Jeffrey Snover [MSFT]
Windows PowerShell Architect
Microsoft Corporation
This posting is provided "AS IS" with no warranties, no confers rights.


My System SpecsSystem Spec
Old 12-27-2006   #6 (permalink)
Brandon Shell


 
 

Re: Proxy authentication required error when calling wsdl.exe

Keith/Jeffrey,

How hard do you think it would be to "re-create" wsdl.exe in strait
powershell. I think this could be very powerful. Effectively this could
provide powershell with a generic SOAP client. This SOAP client could be
used for web services. I think this would be seriously useful.

"Keith Hill [MVP]" <r_keith_hill@mailhot.moc.nospam> wrote in message
news:%23RPFlvYKHHA.3668@TK2MSFTNGP02.phx.gbl...
> "sundanceca" <sundanceca@discussions.microsoft.com> wrote in message
> news:030DFB69-9FAE-4617-B50E-D66A8E2A179B@microsoft.com...
>>a firewall block and a proxy denial are two different things, right?
>>

>
> If you have those sort of privileges, then check out the WSDL parameters:
>
> /username:<username>
> /password:<password>
> /domain:<domain>
> The credentials to use when connecting to a server that
> requires authentication. Short forms are '/u:', '/p:' and '/d:'.
>
> /proxy:<url>
> The url of the proxy server to use for http requests.
> The default is to use the system proxy setting.
>
> /proxyusername:<username>
> /proxypassword:<password>
> /proxydomain:<domain>
> The credentials to use when the connecting to a proxy server that
> requires authentication. Short forms are '/pu:', '/pp:' and '/pd:'.
>
> --
> Keith
>


My System SpecsSystem Spec
Old 12-27-2006   #7 (permalink)
Keith Hill [MVP]


 
 

Re: Proxy authentication required error when calling wsdl.exe

"Brandon Shell" <tshell.mask@gmail.com> wrote in message
news:ekZpOXeKHHA.3872@TK2MSFTNGP06.phx.gbl...
> Keith/Jeffrey,
>
> How hard do you think it would be to "re-create" wsdl.exe in strait
> powershell. I think this could be very powerful. Effectively this could
> provide powershell with a generic SOAP client. This SOAP client could be
> used for web services. I think this would be seriously useful.


Unfortunately unlike tlbimp.exe it appears that this exe isn't a thin
wrapper around some .NET Framework type that does the bulk of the work. It
appears to be all coded into wsdl.exe. Still, you could just use WSDL.exe
and throw an error if it isn't available on a machine which instructions on
how to download the relavent SDK to get. It would be a nice feature to
have.

--
Keith


My System SpecsSystem Spec
Old 12-27-2006   #8 (permalink)
Jeffrey Snover [MSFT]


 
 

Re: Proxy authentication required error when calling wsdl.exe

> How hard do you think it would be to "re-create" wsdl.exe in strait
> powershell. I think this could be very powerful. Effectively this could
> provide powershell with a generic SOAP client. This SOAP client could be
> used for web services. I think this would be seriously useful.


I spoke to the Web Services team about doing just this. We concluded that
it would be pretty straightforward to do but we were both too busy to get it
done given our priorities/customer feedback. If this is something that
people want, please request it.


--
Jeffrey Snover [MSFT]
Windows PowerShell Architect
Microsoft Corporation
This posting is provided "AS IS" with no warranties, no confers rights.


My System SpecsSystem Spec
Old 12-27-2006   #9 (permalink)
Brandon Shell


 
 

Re: Proxy authentication required error when calling wsdl.exe

via connect?

"Jeffrey Snover [MSFT]" <jsnover@ntdev.microsoft.com> wrote in message
news:F1109A46-1657-498B-9A9E-01E5910BC02D@microsoft.com...
>> How hard do you think it would be to "re-create" wsdl.exe in strait
>> powershell. I think this could be very powerful. Effectively this could
>> provide powershell with a generic SOAP client. This SOAP client could be
>> used for web services. I think this would be seriously useful.

>
> I spoke to the Web Services team about doing just this. We concluded that
> it would be pretty straightforward to do but we were both too busy to get
> it done given our priorities/customer feedback. If this is something that
> people want, please request it.
>
>
> --
> Jeffrey Snover [MSFT]
> Windows PowerShell Architect
> Microsoft Corporation
> This posting is provided "AS IS" with no warranties, no confers rights.
>
>


My System SpecsSystem Spec
Old 12-27-2006   #10 (permalink)
Brandon Shell


 
 

Re: Proxy authentication required error when calling wsdl.exe

Ok... maybe I should proactively ask this.

How does one go about "Suggesting" something officially. I do not see a
connect for Powershell. Maybe I am missing something.

"Jeffrey Snover [MSFT]" <jsnover@ntdev.microsoft.com> wrote in message
news:F1109A46-1657-498B-9A9E-01E5910BC02D@microsoft.com...
>> How hard do you think it would be to "re-create" wsdl.exe in strait
>> powershell. I think this could be very powerful. Effectively this could
>> provide powershell with a generic SOAP client. This SOAP client could be
>> used for web services. I think this would be seriously useful.

>
> I spoke to the Web Services team about doing just this. We concluded that
> it would be pretty straightforward to do but we were both too busy to get
> it done given our priorities/customer feedback. If this is something that
> people want, please request it.
>
>
> --
> Jeffrey Snover [MSFT]
> Windows PowerShell Architect
> Microsoft Corporation
> This posting is provided "AS IS" with no warranties, no confers rights.
>
>


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
error 480 authentication required Vista mail
407 Proxy Authentication Required Vista General
Proxy Authentication error PowerShell
Proxy Authentication Vista networking & sharing


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46