How do I get the user full name using webservice? - InfoPath Dev
in

InfoPath Dev

How do I get the user full name using webservice?

Last post 06-28-2005 11:40 AM by peb0168. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 06-28-2005 11:40 AM

    • peb0168
    • Not Ranked
    • Joined on 06-28-2005
    • Canada
    • Posts 1

    How do I get the user full name using webservice?

    How do I get the user full name using Sharepoint webservice GetUserProfileByName?

    I have the following XML that gets generated creating a DataConnection to the Sharepoint webservice GetUserProfileByName (in receive data mode)

    <dfs:myFields xmlns:dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution" xmlns:s0="http://microsoft.com/webservices/SharePointPortalServer/UserProfileService" xmlns:s1="http://microsoft.com/wsdl/types/"><dfs:queryFields><s0:GetUserProfileByName><s0:AccountName>DEFAULTVALUE</s0:AccountName></s0:GetUserProfileByName></dfs:queryFields><dfs:dataFields><s0:GetUserProfileByNameResponse><s0:GetUserProfileByNameResult><s0:PropertyData><s0:Name></s0:Name><s0:Value></s0:Value></s0:PropertyData></s0:GetUserProfileByNameResult></s0:GetUserProfileByNameResponse></dfs:dataFields></dfs:myFields>


    I use the variable System.Environment.UserName to get the username, I then want to use it to fetch the user full name using the webservice.

    I'm using the following code which does not return the default value for the account name I have setup in my Data Connection:


    IXMLDOMNode userProfileInfo = thisXDocument.DataObjects["GetUserProfileByName"].DOM.selectSingleNode("/dfs:myFields/dfs:queryFields/s0:GetUserProfileByName/s0:AccountName");
Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.