![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | SOAP webclient Greetings all, I am new to the world of SOAP but have a little understanding of psh and, to a lesser extent, dotnet. I'm a little lost as to which dotnet class(es) actually need to be used. I have seen a couple of references to System.Net.HttpWebRequest and s.n.HttpWebResponse (not that I understood them a great deal within the VB.NET context). I am also intreagued by system.net.webclient - the name sort of gives it away. Does anyone have an example of how I might use psh to interact with a SOAP service? Any clues on how to use a client certificate within the process would also be greatly welcomed. Cheers! n |
My System Specs![]() |
| | #2 (permalink) |
| | Re: SOAP webclient Try this http://keithhill.spaces.live.com/blo...3A97!512.entry Brandon Shell --------------- Blog: http://www.bsonposh.com/ PSH Scripts Project: www.codeplex.com/psobject NC> Greetings all, NC> NC> I am new to the world of SOAP but have a little understanding of psh NC> and, to a lesser extent, dotnet. NC> NC> I'm a little lost as to which dotnet class(es) actually need to be NC> used. I have seen a couple of references to NC> System.Net.HttpWebRequest and s.n.HttpWebResponse (not that I NC> understood them a great deal within the VB.NET context). I am also NC> intreagued by system.net.webclient - the name sort of gives it away. NC> NC> Does anyone have an example of how I might use psh to interact with NC> a SOAP service? Any clues on how to use a client certificate within NC> the process would also be greatly welcomed. NC> NC> Cheers! NC> n |
My System Specs![]() |
| | #3 (permalink) |
| | Re: SOAP webclient On Oct 10, 4:17 pm, "Neil Chambers" <n3lly...@xxxxxx> wrote: Quote: > Greetings all, > > I am new to the world of SOAP but have a little understanding of psh and, to > a lesser extent, dotnet. > > I'm a little lost as to which dotnet class(es) actually need to be used. I > have seen a couple of references to System.Net.HttpWebRequest and > s.n.HttpWebResponse (not that I understood them a great deal within the > VB.NET context). I am also intreagued by system.net.webclient - the name > sort of gives it away. > > Does anyone have an example of how I might use psh to interact with a SOAP > service? Any clues on how to use a client certificate within the process > would also be greatly welcomed. > > Cheers! > n http://www.nivot.org/2007/08/07/NewI...owerShell.aspx usage: PS> $service = .\get-webservice.ps1 -anonymous -url http://www.example.com/service.asmx PS> $service | get-member It can handle more complex services (multi-document basic profile 1.1) than many other posh scripts floating around, as it was built around reverse-engineering how visual studio builds proxies using wsdl.exe - Oisin / x0n |
My System Specs![]() |
| | #4 (permalink) |
| | Re: SOAP webclient On Oct 10, 5:15 pm, Oisin Grehan <ois...@xxxxxx> wrote: Quote: > On Oct 10, 4:17 pm, "Neil Chambers" <n3lly...@xxxxxx> wrote: > > > > > Quote: > > Greetings all, Quote: > > I am new to the world of SOAP but have a little understanding of psh and, to > > a lesser extent, dotnet. Quote: > > I'm a little lost as to which dotnet class(es) actually need to be used. I > > have seen a couple of references to System.Net.HttpWebRequest and > > s.n.HttpWebResponse (not that I understood them a great deal within the > > VB.NET context). I am also intreagued by system.net.webclient - the name > > sort of gives it away. Quote: > > Does anyone have an example of how I might use psh to interact with a SOAP > > service? Any clues on how to use a client certificate within the process > > would also be greatly welcomed. Quote: > > Cheers! > > n > You could do a lot worse than start here: > > http://www.nivot.org/2007/08/07/NewI...eProxyGenerato... > > usage: > > PS> $service = .\get-webservice.ps1 -anonymous -urlhttp://www.example.com/service.asmx > PS> $service | get-member > > It can handle more complex services (multi-document basic profile 1.1) > than many other posh scripts floating around, as it was built around > reverse-engineering how visual studio builds proxies using wsdl.exe > > - Oisin / x0n- Hide quoted text - > > - Show quoted text - certificate to the request via: PS> $cert = get-item cert:\store\certname PS> $service.ClientCertificates.Add($cert) PS> $result = $service.WebMethod(...) (where WebMethod is a remote soap method) "Cert:" is a special drive in powershell that maps to the local certificate store. Hope this helps, - Oisin / x0n |
My System Specs![]() |
| | #5 (permalink) |
| | Re: SOAP webclient Superb! My thanks to Brendon and Oisin :-) n "Oisin Grehan" <oising@xxxxxx> wrote in message news:1192052349.784554.317000@xxxxxx Quote: > On Oct 10, 5:15 pm, Oisin Grehan <ois...@xxxxxx> wrote: Quote: >> On Oct 10, 4:17 pm, "Neil Chambers" <n3lly...@xxxxxx> wrote: >> >> >> >> >> Quote: >> > Greetings all, Quote: >> > I am new to the world of SOAP but have a little understanding of psh >> > and, to >> > a lesser extent, dotnet. Quote: >> > I'm a little lost as to which dotnet class(es) actually need to be >> > used. I >> > have seen a couple of references to System.Net.HttpWebRequest and >> > s.n.HttpWebResponse (not that I understood them a great deal within the >> > VB.NET context). I am also intreagued by system.net.webclient - the >> > name >> > sort of gives it away. Quote: >> > Does anyone have an example of how I might use psh to interact with a >> > SOAP >> > service? Any clues on how to use a client certificate within the >> > process >> > would also be greatly welcomed. Quote: >> > Cheers! >> > n >> You could do a lot worse than start here: >> >> http://www.nivot.org/2007/08/07/NewI...eProxyGenerato... >> >> usage: >> >> PS> $service = >> .\get-webservice.ps1 -anonymous -urlhttp://www.example.com/service.asmx >> PS> $service | get-member >> >> It can handle more complex services (multi-document basic profile 1.1) >> than many other posh scripts floating around, as it was built around >> reverse-engineering how visual studio builds proxies using wsdl.exe >> >> - Oisin / x0n- Hide quoted text - >> >> - Show quoted text - > Oops, forgot about client certificates - you can attach a client > certificate to the request via: > > PS> $cert = get-item cert:\store\certname > PS> $service.ClientCertificates.Add($cert) > PS> $result = $service.WebMethod(...) > > (where WebMethod is a remote soap method) > > "Cert:" is a special drive in powershell that maps to the local > certificate store. > > Hope this helps, > > - Oisin / x0n > |
My System Specs![]() |
| | #6 (permalink) |
| | Re: SOAP webclient I guess you meant Brandon ![]() Shay http://scriptolog.blogspot.com Quote: > Superb! > > My thanks to Brendon and Oisin :-) > > n > > "Oisin Grehan" <oising@xxxxxx> wrote in message > news:1192052349.784554.317000@xxxxxx > Quote: >> On Oct 10, 5:15 pm, Oisin Grehan <ois...@xxxxxx> wrote: >> Quote: >>> On Oct 10, 4:17 pm, "Neil Chambers" <n3lly...@xxxxxx> wrote: >>> >>>> Greetings all, >>>> >>>> I am new to the world of SOAP but have a little understanding of >>>> psh >>>> and, to >>>> a lesser extent, dotnet. >>>> I'm a little lost as to which dotnet class(es) actually need to be >>>> used. I >>>> have seen a couple of references to System.Net.HttpWebRequest and >>>> s.n.HttpWebResponse (not that I understood them a great deal within >>>> the >>>> VB.NET context). I am also intreagued by system.net.webclient - the >>>> name >>>> sort of gives it away. >>>> Does anyone have an example of how I might use psh to interact with >>>> a >>>> SOAP >>>> service? Any clues on how to use a client certificate within the >>>> process >>>> would also be greatly welcomed. >>>> Cheers! >>>> n >>> You could do a lot worse than start here: >>> >>> http://www.nivot.org/2007/08/07/NewI...ceProxyGenerat >>> o... >>> >>> usage: >>> >>> PS> $service = >>> .\get-webservice.ps1 -anonymous >>> -urlhttp://www.example.com/service.asmx >>> PS> $service | get-member >>> It can handle more complex services (multi-document basic profile >>> 1.1) than many other posh scripts floating around, as it was built >>> around reverse-engineering how visual studio builds proxies using >>> wsdl.exe >>> >>> - Oisin / x0n- Hide quoted text - >>> >>> - Show quoted text - >>> >> certificate to the request via: >> >> PS> $cert = get-item cert:\store\certname >> PS> $service.ClientCertificates.Add($cert) >> PS> $result = $service.WebMethod(...) >> (where WebMethod is a remote soap method) >> >> "Cert:" is a special drive in powershell that maps to the local >> certificate store. >> >> Hope this helps, >> >> - Oisin / x0n >> |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Using System.Net.WebClient and no cache | PowerShell | |||
| Problems using webclient and Powershell | PowerShell | |||
| Q: System.Net.WebClient | PowerShell | |||
| WebClient, don't want Escape | PowerShell | |||
| System.Net.WebClient and XML | PowerShell | |||