Sign in
|
Join PowerShell.com!
|
Help
Home
PowerTips
Ask the Experts
Forums
Webcasts
Blogs
eBookV2
Script Library
Twitter Grid
Modules
QuickClick
Scripts
Snippets
Videos
Library
»
Snippet Library
»
.Net
»
Access Web Service
Access Web Service
Share
|
Browse Library
Module Library
QuickClick Library
Script Library
Snippet Library
ADSI
Comparison
Conditions and Loops
.Net
Exception Handlers
Files and Folders
Functions
Headers
Includes
Network
Pipeline
PowerShell Internals
Registry
Samples
Script Functions Templates
Security
SQL Server
Templates
User Management
WMI
Video Library
Members Only
Tags
Find Class
Snippet
Snippets
VS Paths
Web Service
View more
Previous
|
Next
|
View all files
|
View Slideshow
Download
posted by
Richard Giles
02-17-2009
Downloads: 347
File size: 1.2kB
Views: 1,008
Embed
Access Web Service
<?
xml
version
=
"1.0"
?>
<CodeSnippets xmlns
=
"http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"
>
<CodeSnippet Format
=
"1.0.0"
>
<Header>
<Title>Access webservice<
/
Title>
<Shortcut
/
>
<Description>creates a Webservice proxy and uses webservice<
/
Description>
<Author
/
>
<SnippetTypes>
<SnippetType>Expansion<
/
SnippetType>
<
/
SnippetTypes>
<
/
Header>
<Snippet>
<Declarations>
<Literal>
<ID>param1<
/
ID>
<ToolTip>Webservice URL<
/
ToolTip>
<Default>http:
//
www.webservicex.net
/
WeatherForecast.asmx
<
/
Default>
<
/
Literal>
<Literal>
<ID>param2<
/
ID>
<ToolTip>Proxy source code name<
/
ToolTip>
<Default>WeatherForecast<
/
Default>
<
/
Literal>
<Literal>
<ID>param3<
/
ID>
<ToolTip>Instance name<
/
ToolTip>
<Default>weatherService<
/
Default>
<
/
Literal>
<
/
Declarations>
<Code Language
=
"PowerShell"
Kind
=
"59"
><
!
[CDATA[
wsdl.exe
'$param1$?WSDL'
csc
/
t:library
$param2
$.
cs
[
Reflection.Assembly
]::
LoadFrom
(
"$pwd\$param2$.dll"
)
$
$param3
$
=
new-object
$param2
$
$forecast
=
$
$param3
$.
GetWeatherByZipCode
(80526)
$forecast
]]><
/
Code>
<
/
Snippet>
<
/
CodeSnippet>
<
/
CodeSnippets>
Filed under:
Web Service
,
Snippets
Creates a Webservice proxy and uses webservice
Copyright 2011 PowerShell.com. All rights reserved.