Mar 20, 2011

Sharecamp 2011 - born2share.

I’m happy to announce the ShareCamp 2011. It will be at the weekend from 14th to 15th May at the Microsoft Headquarter in Munich. The ShareCamp is a BarCamp about SharePoint. Our slogan is born2share. (spoken born to SharePoint). We did it for for the first time last year in April and were very curious if it would be a success or not. And it was a great success! We got really amazing feedback and actually I would say it has become THE SharePoint community event in Germany!

ShareCamp 2011

The idea for this kind of event arise from the insight that the commercial events often tend to be one-sided, uncreative and boring. Always the same sessions, same speakers and novice session levels. So the ShareCamp was born! As I mentioned earlier the ShareCamp is a special kind of an unconference, a such called BarCamp. The base idea is that there are no predefined time schedules, sessions and speakers. Everyone should contribute! It doesn’t matter if you are an end user, admin, manager, developer, novice, expert, speaker, geek or MVP if you have something to say, say it!

Sounds crazy, doesn’t it? But it works! Be part of it and register now! (The attendance is for free but the seats are limited!)

12324_112736402080637_106328299388114_195378_3341434_n[1]12324_112650775422533_106328299388114_194872_8035884_n[1]12324_113178885369722_106328299388114_197446_8382896_n[1]12324_112736405413970_106328299388114_195379_1647201_n[1]

12324_112736508747293_106328299388114_195386_6397476_n[1]12324_112650752089202_106328299388114_194867_5136680_n[1]12324_112736532080624_106328299388114_195388_1902471_n[3]12324_112736545413956_106328299388114_195390_1254104_n[1]

Mar 19, 2011

Call a Web Service Action (Advanced SharePoint Designer 2010 Workflow Actions)

With this custom SharePoint Designer Action you are able to call web services from SPD workflows. The action is included in my Advanced SharePoint Designer 2010 Workflow Actions release on CodePlex. The source code is available too. Let’s go!

1. Add “Call a Web Service” Action to a SharePoint Designer 2010 Workflow

image

2. Configure the Action

image
  • URL: The URL of the Web Service
  • SOAP Version: The SOAP Version of the request (1.1. or 1.2)
  • Action: The SOAP Action for the request
  • SOAP Request Envelope: The SOAP Envelope for the request (http://schemas.xmlsoap.org/soap/envelope/). The request will be UTF8 encoded. You can use two special tokens in the request that can not be inserted via the UI: [WebUrl] and [WorkflowInstanceId].
  • User: The user name for requests that needs authentication e.g. “Contoso\Administrator”. Instead of using user name and password you can use Secure Store Credentials.
  • Password: The password for the user. Unfortunately there isn’t a masked text box :-( You could either specify the password  in clear text or encrypted like described here: Encrypt Passwords for SharePoint Designer Workflow Actions
  • AppId: The The Secure Store Application ID. The Secure Store App have to define 2 Fields. One of type “User Name” and one of type “Password”. The Field Name doesn’t matter, important is the Field Type! You have to map the credentials of the SharePoint Service Accounts (AppPool/owstimer.exe). The secure store option will only works with SharePoint Server not with Foundation!

3. Example

Create a new List with the SharePoint Lists.asmx Web Service.
image

Configuration of “Call Web Service”

  • URL: http://[siteurl]/_vti_bin/Lists.asmx
  • SOAP Version: SOAP 1.2
  • SOAPAction: not needed for SOAP 1.2
  • Response: The response will be stored in the variable “Response”
  • User: empty
  • Password: empty
  • Secure Store AppId: Instead of using user name and password we use the secure store app with the ID test. The app defines “User Name” and Password. The format of the user name for windows user should be “Domain\username”.
  • SOAP Request Envelope:
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<AddList xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<listName>[%MyList:Title%]</listName>
<description>Created by iLSP action</description>
<templateID>100</templateID>
</AddList>
</soap12:Body>
</soap12:Envelope>
For the title of the list we use the title of the current list item that runs the workflow. To figure out how the request should looks like you could inspect request with fiddler. I often create a WCF service proxy with Visual Studio, execute the call and inspect the request and result XML with fiddler.

Next we extract the ID of the new list.from the resulting XML. To do this you can use the “Query XML” action that is also included in the package.

Configuration of “Query XML”

  • XML: The XML of the SOAP-Reponse that has been stored in the Variabe “Response”
  • XPath: //*[local-name()='List']/@ID
  • Output: The output (List Id) will be stored in the Variable “ListID”

Write the “ListID” to the history log

image
download | documentation