InfoPath Form Services does not support claims based authentication
(that's what MS Support told us, when we faced a similar issue with
Nintex Workflow.asmx about a month back).
If you look in the IIS logs you will see that the calls to the
UserProfileService.asmx are getting made as
user instead of the currently logged in user. This happens because
FormServer when making the call to the WS is able to use only Basic or
Digest mode for passing credentials.
You can fix the issue temperorily by using the udcx:Authentication tag
of the udcx file, either by speciying a hard coded user name and
password or setting it up to use Secure store service. This fix works
because the GetProfileByName method does not require the the currently
logged in user to be imperonated when making the call.
But sooner or later you would come across a scenario in which you need
to make a call to a Web Service that requires that the call be made
using the logged in user's credentials (for eg:
GetRunningWorkflowTasksForCurrentUser method in Nintex
Workflow.asmx), which would fail if you are using InfoPath Form
Services in a Claims based environment
The SharePoint application and code described in this article will not
work if SharePoint is configured for forms-based authentication. To
work correctly, the web application that hosts this SharePoint
application must be configured to use classic-mode authentication.
For more information about configuring SharePoint authentication, see
Plan authentication methods (SharePoint Server 2010)".