Getting user information through MOSS web services
There are a good few blog posts scattered around the web detailing how to retrieve information about a user by using the UserProfileService web service of MOSS in InfoPath (with and without writing code):
- Get the User Profile through MOSS Web Services (code)
- InfoPath – Get the current user without writing code (no code)
- How to display current user’s full name, email and other info in InfoPath? (troubleshooting tips)
Important:
The UserProfileService is a MOSS web service, which means that it is not available if you only have WSS installed. If you try to access it on a server where only WSS is installed, you will receive the following error in InfoPath:
InfoPath cannot find or cannot access the specified Web service description.
The file is not a valid XML file.
The form contains XML that cannot be parsed:
A string literal was expected, but no opening quote character was found.Line 19, Position 38
<TABLE class=”ms-main” CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH=”100%” HEIGHT=”100%”>
————————————-^
You can check whether the web service exists on your SharePoint server by going to the 12 hive (C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\), opening the ISAPI folder, and look for a file named UserProfileService.asmx.
Related Posts
Copyright: This article may not be used on web sites (whether personal or otherwise), copied, disseminated, altered, printed, published, broadcasted, or reproduced in any way without an expressed written consent of S.Y.M. Wong-A-Ton. Usage of techniques demonstrated in this article may be used within any Microsoft InfoPath project. This article is provided without any warranties. Copyright for this article is non-transferrable and remains with the author, S.Y.M. Wong-A-Ton.


