This will be a multi-part post about using the UserProfileService web service with InfoPath. I am using InfoPath 2010 and SharePoint 2007.
Part One: Connecting to the UserProfileService web service in InfoPath
- In InfoPath 2010, click on Manage Data Connections at the bottom of the Fields panel:
- The Data Connections dialog will display. Click ADD:
- Under Create a new connection to:, select Receive data and then click NEXT:
- Under From where do you want to receive your data?, select SOAP Web service and then click NEXT:
- Enter in the address for the UserProfileService, which will be: yourSite/_vti_bin/UserProfileService.asmx. Click Next:
- Under Select an operation, choose GetUserProfileByName and then click NEXT:
- On the next screen that displays, keep the defaults and click NEXT:
- Click NEXT on the screen that displays.
- On the final screen, keep the default name for the data connection, GetUserProfileByName, check the box next to Automatically retrieve data when the form is opened, and then click FINISH:
- The new data connection will now display in the data connections list:
Stay tuned for Part Two: Using the GetUserProfile web service to auto-fill fields