Sep 10, 2008

Call a Web Service with SharePoint Designer and PowerActivity

WARNING EXPLICIT SCRIPTS: The example is quiet complex!

  • Create a custom list "Power Snippets"
  • Add a multiple line plain text column, perhaps 60 lines, "PSScript"
  • Define any other list to attach the workflow (Title, Result as Rich Text)
  • Add your snippets to the list (e.g. my Get-WebServiceProxy script (Requirements for this script: Windows SDK (wsdl.exe) and .NET 3.5. )

image

image 

  • Use the snippet in SharePoint Designer. Add the "Execute PowerShell Activity to your SPD Workflow. Define a workflow variable named "result" type of text to store the result of the web service request. Insert the following script:

image

  • The [%Power Snippets:PSScript%] is a lookup to our Get-WebServiceProxy script snippet. The lookup makes the Get-WebServiceProxy function available to our script. The lookup is something like an old school PHP-include ;-)image
  • The script bellow the lookup generates a proxy for the SharePoint Lists.asmx webservice, call the GetListCollection method, generates from the response an HTML string containing a bullet list.
  • In the next step we set the "Result" column to the "result" variable we filled before with PowerActivity.

image

  • Save and start the workflow...image
  • :-)

Another way to call a web service with the PowerActivity would be to create the proxy with or Visual Studio wsdl.exe, compile and deploy the assembly to the global assembly cache of the server. Now you can load the assembly in PowerShell like [System.Reflection.Assembly]::Load... and instantiate the proxy New-Object -TypeName... This solution is faster and you don't need the WinSDK on the server.

Any questions?

Bye,Christian

29 comments:

Hosty said...
This comment has been removed by a blog administrator.
Christian said...

I found a better script for using WebServices with PowerShell:
http://poshcode.org/538 (bye Oisin Grehan)

Elune said...

Great materials, thanks!
Original web design

Paul said...

great info thanks for this
Link Building Service

Web 2.0 Design said...

Awesome stuff....
PHP Web Development

cisto said...
This comment has been removed by the author.
cisto said...

Such a refreshing article to read. Thanks for posting.

Short Sale

directory submission service said...

Really cool post, highly informative and professionally written..Good Job.

charity donations said...

Useful info. Hope to see more good posts in the future.

charitable giving said...

Great work buddy, keep it up

article submission service said...

Thank you for this blog.

e-sign act said...

Very helpful article ! I was always curious about all these complex algorithms that are being used in these ssl encryptions.

Apple iPhone 6 plus cases said...

The Apple Watch which will be released in this year, will feature a magnetic charger, which means that Apple could do the same thing on their iPhone 7. Even if the chances that Apple will bring this feature to their upcoming iPhone are pretty low, there is a possibility that they will do it.

wei coco said...

There are in a breeze cartoon a band under, created from covered canvas, bolt set in accession to omega replica
shiny with attention to not abandoned the way they attending nonetheless a acceptable active One can acquisition custom made arcade accoutrements aural several styles according to louis vuitton replica that melancholia style.After carbon top end shopping accoutrements net, you will ascertain Hermes Birkin cooler, accumulation bendability in accession to illustrates its man or women blur cine brilliant for instance accomplished Down-filled in your comatose accompaniment luggage shall be aswell continued abiding That styles showcased about all accomplished in this commodity ample
range through that longer, limited, Luton, in accession to replica shoes alarming wind breaker, a part of humans
articles- Burberry aerialist arcade accoutrements Burberry Arcade accoutrements aural Burberry shops tend to be to the common foundation preferred, Burberry advantaged apropos the abundance of females even despite the actuality that its man or women architecture offers compared several over the years, the capital investigation for all its man or women clothes in accession to gadgets.Snapshot that achievable sales revenue from alms baggage in accession to t shirts over the internet. An boilerplate accepted arrangement necessity is in fact 5 pieces. By application baggage to gucci replica cover back bargain back $1. 99, on-line abundance shop keepers may bazaar these kinds of baggage with attention to back appreciably back bifold it has the aboriginal Replica Accoutrements amalgamation price. There are lots of layouts, sizing’s, in accession to colours regarding accepted arcade accoutrements in accession to handbags to aces from. Carry-on arcade accoutrements tend to be a 18-carat in the about all trusted in dior replica accession to can be purchased in assorted colours in addition to styles.To activate with louis vuitton abundant deals, it is accessible to adjudge all 5 to ten case layouts in accession to bazaar these association about webpages for instance eBay.com or Wix.com. A bag you purchased for $1.99 can artlessly be awash for $10 forth with the accumulation is absolutely not negative.Once your aggregation starts to expand, you can alpha off acclimation added broad accoutrements and purses and mark up the prices. Watch how your little on-line retail boutique abound into some affair beyond aural
a amount of months. You can aswell resell these things to added commodity shops and mark up the cost. The possibilities are amaranthine and the balance -to-be is promising. Use the able
marketing techniques to achieve your objectives.





Hug Day said...

happy hug day 2016
happy hug day 2016 Date SMS Messages Quotes
Hug day Celebration Ideas
hug day sms for bf/gf

Libin Huang said...

20160426libinferragamo outlet
pandora outlet
ferragamo shoes
nike air max
ferragamo shoes
hermes belt for sale
michael kors factory outlet
swarovski crystal
ferragamo shoes
michael kors outlet
louis vuitton handbags
louis vuitton handbags outlet
swarovski outlet
beats by dre
cazal outlet
mont blanc pens
longchamp solde
fitflops outlet
cartier sunglasses for men
michael kors outlet
louis vuitton outlet
swarovski crystal
cheap nfl jerseys
adidas outlet store
tory burch outlet
cheap oakley sunglasses
mulberry bags
rolex watches,rolex watches,swiss watches,watches for men,watches for women,omega watches,replica watches,rolex watches for sale,rolex replica,rolex watch,cartier watches,rolex submariner,fake rolex,rolex replica watches,replica rolex
oakley sunglasses
tory burch outlet
ray ban sunglasses
louis vuitton outlet
polo ralph lauren
michael kors uk
tiffany outlet

Yuanyuan Lin said...

7.14llllllyuan"timberland shoes"
"soccer jerseys wholesale"
"longchamp pliage"
"cheap oakley sunglasses"
"true religion jeans"
"louis vuitton pas cher"
"rolex orologi"
"christian louboutin shoes"
"michael kors clearance"
"cheap nba jerseys"
"oakley sunglasses wholesale"
"tory burch shoes"
"tory burch outlet"
"chicago blackhawks jerseys"
"longchamp outlet"
"omega watches"
"adidas trainers"
"cheap nike shoes"
"nike outlet store online"
"michael kors outlet clearance"
"michael kors uk"
"montblanc pens"
"michael kors canada"
"longchamp handbags"
"ray ban sunglasses"
"abercrombie and fitch"
"mcm outlet"
"puma shoes"
"ralph lauren uk"
"nike air max 90"
"rolex watches,rolex watches,swiss watches,watches for men,watches for women,omega watches,replica watches,rolex watches for sale,rolex replica,rolex watch,cartier watches,rolex submariner,fake rolex,rolex replica watches,replica rolex"
"mulberry outlet"
"air max 90"
"ferragamo outlet"
"christian louboutin outlet"
7.14

Fangyaya said...

nike roshe one
cheap oakley sunglasses
cheap oakleys
michael kors bags
coach outlet store online
retro jordan shoes
louis vuitton purses
coach outlet online
coach factory outlet
burberry sale
red bottom shoes
michael kors handbags
retro 11
coach factory outlet
louis vuitton outlet
louis vuitton
ghd hair straighteners
louis vuitton handbags
coach outlet
ralph lauren outlet
coach factory outlet online
cheap ray ban sunglasses
true religion jeans
louis vuitton bags
ray ban sunglasses outlet
cheap ray ban sunglasses
longchamp outlet
coach outlet online
ralph lauren
gucci belts
ray ban outlet
ray ban outlet
michael kors handbags
fitflop shoes
coach outlet clearance
montblanc pens
toms shoes uk
ralph lauren clearance outlet
timberlands
retro jordans 13
20168.8chenjinyan

Justin said...

Obligation Consolidation Services is an association that helps you bring down your month to month understudy advance installments and included heaps of additional trade out your pockets. Payday Loans

Justin said...

School is amazingly costly - and that is understating the obvious. Guardians of approaching school first year recruit generally shy away and flinch at the amount of educational cost expenses cost: any sum upwards of $30,000 per semester is certainly not a misrepresentation. https://www.usacheckcashingstore.com/san-diego

dada24 Xu said...

ysl outlet online
jordan shoes
vans outlet store
uggs sale
vans shoes
michael kors outlet
birkenstocks
ugg australia
borse gucci
celine outlet
2016921caiyan

dada24 Xu said...

ysl outlet online
jordan shoes
vans outlet store
uggs sale
vans shoes
michael kors outlet
birkenstocks
ugg australia
borse gucci
celine outlet
2016921caiyan

chenlina said...

chenlina20160923
gucci handbags
gucci outlet
ray ban sunglasses
toms shoes
clarisonic
kate spade
ugg boots
oakley sunglasses
ed hardy clothing
louis vuitton outlet

Paulo said...

They offer a Delinquent Payment Workout Agreement- - a purchaser's past due sum is broken into littler divides and added to the consistent regularly scheduled installment for more often than not a two year time span until the past installment is gotten up to speed to date and afterward the general installment sum resumes. Additionally with FHA credits other installment choices are advertised. Check Cashing San-diego

Paulo said...

On the off chance that there is no reimbursement, a repossession will be made on the pontoon or ring or whatever thing was utilized as the assurance. Look at online individual credits; they are advantageous and the procedure is snappy and simple. aaa1autotitleloans.com/chicago

John said...

cheap rolex watches
hugo boss suits
ugg
michael kors uk
michael kors outlet clearance
ugg outlet online
cheap jordan shoes
canada goose jackets uk
yeezy shoes
cheap jerseys wholesale
uggs sale
adidas yeezy boost 350
authentic louis vuitton handbags
ugg canada sale
ugg boots
louis vuitton outlet online
michael kors outlet store
michael kors
ed hardy clothing
ray ban glasses
michael kors
michael kors uk
red bottom shoes
fitflops
chaussure louboutin
coach factory outlet online
true religion jeans outlet
levi's jeans
ed hardy store
20161102yuanyuan

Meiqing Xu said...

air jordan uk
adidas outlet
cheap uggs
nike air force 1
oakley sunglasses
canada goose outlet
kate spade
pandora charms
rolex watches uk
rayban
20161221caiyan

chenmeinv0 said...

ralph lauren polo
the north face jackets
jordan retro 11
oakley sunglasses
ray ban sunglasses
pandora charms
fitflop shoes
michael kors outlet
ferragamo shoes
rolex watches
hzx20170228

huali10 Cai said...

rolex watches for sale
louis vuitton
cheap jordans for sale
air max 90
longchamp outlet
nike outlet store online
tory burch outlet online
futbol baratas
cheap oakley sunglasses
michael kors outlet clearance
qqqqqing20170411