There are two ways which this question could be answered:
1. Fix the problem causing the error so that the .udcx file can be created in the traditional way on our SharePoint 2013 environment, OR
2. Workaround the error and create the needed .udcx file some other way.
My answer will be the latter approach, a workaround.
1. Fix the problem causing the error so that the .udcx file can be created in the traditional way on our SharePoint 2013 environment
Some thoughts on the former approach. Unfortunately, the SharePoint “team” at my job consists of the Web Applications Manager and me—and I’m actually just a desktop support helpdesk technician that assists the Web Apps Manager one day a week. In short, we cannot figure out why we’re getting the “The specified location does not exist or could not be opened. Choose a data connection library on a server running Microsoft SharePoint Server and specify a valid filename,” error. We don’t have enough time to dedicate to the problem. We’ve already spent several hours on it, and we have a hunch that it’s due to a problem with the Desktop Experience in our environment.
Desktop Experience is installed. It’s turned on. Necessary services are installed. All the settings are correct, yet it still doesn’t work. Digging in some forums and making some connections, my Web Apps Manager thinks that this problem is the root of my problem with creating the .udcx file—during creation SharePoint or InfoPath need to “see” in Explorer. We can’t open anything from SharePoint or InfoPath (so far as any form is connected to our SharePoint) in Explorer.
So I had to come up with some other solution.
2. Workaround the error and create the needed .udcx file some other way
It’s fortunate for me that we’re still migrating from a SharePoint 2010 intranet to a SharePoint 2013 intranet. The 2010 environment is still live. So basically I created the .udcx file I needed following the traditional method in our 2010 environment, opened that file in Komodo Edit, changed the xml code to match our 2013 environment, uploaded the edited .udcx file to the Data Connection Library in the 2013 environment, then created a data connection directly to this new file in InfoPath (for a form to an item list in the 2013 environment needing GetUserProfileByName). Let me go through that step-by-step and show you what the xml code looks like in case you’re in a similar situation with no way to create the actual .udcx file other than manually.
a. Follow "To create a SharePoint Data Connection Library" section instructions steps 1-4 on both my SP 2010 environment and my SP 2013 environment.
Browse to an SharePoint Server 2010 site on which you have at least Design permissions. If you are on the root site, create a new site before you continue with the next step.
On the Site Actions menu, click More Options.
On the Create page, click Library under Filter By, and then click Data Connection Library.
On the right side of the Create page, type a name for the library, and then click the Create button.
b. Follow "To create a new data connection file in InfoPath" section instructions steps 2-5.
- Open InfoPath Designer 2010, click Blank Form, and then click Design Form.
Note that you can do this with a blank form from either environment or just use the actual form you need the data connection file for in the first place. The form isn’t really the important thing in this section—it’s that we get the data connection created with the correct settings.
On the Data tab, click Data Connections, and then click Add.
In the Data Connection Wizard, click Create a new connection to, click Receive data, and then click Next.
Click the kind of data source that you are connecting to, such as Database, Web service, or SharePoint library or list, and then click Next.
Complete the remaining steps in the Data Connection Wizard to configure your data connection, and then click Finish to return to the Data Connections dialog box.
I’m wanting a SOAP Web service connection to connect to User Profile Service, so that’s what I choose during step 4, and then enter [address of my SP 2013 home] followed by “/_vti_bin/UserProfileService.asmx” when prompted for a location. When prompted to Select an operation, I choose GetUserProfileByName. I leave the next few screens at default setting and click through until Finish.
c. Follow "To create a new data connection file in InfoPath" section instructions steps 6-8 using the SP 2010 environment’s Data Connection Library created in previous step a. I had to use this and not the SP 2013 library, because my issue was that I can’t get these steps to work in my SP 2013 environment.
In the Data Connections dialog box, click Convert to Connection File.
In the Convert Data Connection dialog box, enter the URL of the data connection library that you previously copied (delete "Forms/AllItems.aspx" and anything following it from the URL), enter a name for the data connection file at the end of the URL, and then click OK. It will take a few moments to convert and save the data connection file to the library.
Confirm that the data connection was converted successfully by examining the Details section of the Data Connections dialog box while the name of the converted data connection is selected.
Now we have a working data connection file.
d. Make necessary edits, save .udcx
file locally.
The original instructions talk about setting the Approval Status of this file to Approved. This isn’t really necessary at this point, because we’re not going to use this file in the SP 2010 environment. Instead, download it and open it with a code editor like Komodo. This is the good stuff:
We want to look at the <udc:WsdlUrl>
tag, make sure that it’s set to [address of my SP 2013 home]/_vti_bin/UserProfileService.asmx?WSDL
We want to make sure that <udc:ServiceUrl>
under <udc:SelectCommand>
is set to [address of my SP 2013 home]/_vti_bin/UserProfileService.asmx
Delete what’s there and make the changes if necessary.
It should look like this:
<udc:ConnectionInfo Purpose="ReadOnly" AltDataSource="">
<udc:WsdlUrl>[address of my SP 2013 home]/_vti_bin/UserProfileService.asmx?WSDL</udc:WsdlUrl>
<udc:SelectCommand>
<udc:ListId/>
<udc:WebUrl/>
<udc:ConnectionString/>
<udc:ServiceUrl UseFormsServiceProxy="false">[address of my SP 2013 home]/_vti_bin/UserProfileService.asmx</udc:ServiceUrl>
<udc:SoapAction>http://microsoft.com/webservices/SharePointPortalServer/UserProfileService/GetUserProfileByName</udc:SoapAction>
<udc:Query/>
</udc:SelectCommand>
<udc:UpdateCommand>
<udc:ServiceUrl UseFormsServiceProxy="false"/>
<udc:SoapAction/>
<udc:Submit/>
<udc:FileName>Specify a filename or formula</udc:FileName>
<udc:FolderName AllowOverwrite=""/>
</udc:UpdateCommand>
<!--udc:Authentication><udc:SSO AppId='' CredentialType='' /></udc:Authentication-->
Save the (edited) file to your desktop and maybe name it something like dataconnectionlibrary-SP13.udcx to differentiate it from the original.
e. Upload dataconnectionlibrary-SP13.udcx to SP 2013 Data Connection Library.
f. Open the InfoPath form that needs the data connection file in Designer. In the Data ribbon, choose Data Connections. Click Add. Choose Search for connections on a Microsoft SharePoint Server and click Next.
On the next screen, the Site we want is the address of the Data Connection Library on the SP 2013 environment. If it’s not in the dropdown, click Manage Sites and add it. Once it’s selected you’ll see an expandable section and the .udcx file we just uploaded. Note it’ll be named by the Title in the library and not the name; it might not be called dataconnectionlibrary-SP13; SharePoint automatically titled my file GetUserProfileByName
, so that’s what I see.

At this point, the problem is solved. The result is the creation of a data connection that’s exactly the same as if we’d followed all the instructions on this article and traditionally created a .udcx file.
.
Here’s the full XML for a basic .udcx file with default settings for a SOAP call to GetUserProfileByName
:
<?xml version="1.0" encoding="UTF-8"?>
<?MicrosoftWindowsSharePointServices ContentTypeID="0x010100B4CBD48E029A4ad8B62CB0E41868F2B0"?>
<udc:DataSource MajorVersion="2" MinorVersion="0" xmlns:udc="http://schemas.microsoft.com/office/infopath/2006/udc">
<udc:Name>GetUserProfileByName</udc:Name>
<udc:Description>Format: UDC V2; Connection Type: WebService; Purpose: ReadOnly; Generated by Microsoft InfoPath 2010 on [date] at [time] by ADS\[user].</udc:Description>
<udc:Type MajorVersion="2" MinorVersion="0" Type="WebService">
<udc:SubType MajorVersion="0" MinorVersion="0" Type=""/>
</udc:Type>
<udc:ConnectionInfo Purpose="ReadOnly" AltDataSource="">
<udc:WsdlUrl>[home address]/_vti_bin/UserProfileService.asmx?WSDL</udc:WsdlUrl>
<udc:SelectCommand>
<udc:ListId/>
<udc:WebUrl/>
<udc:ConnectionString/>
<udc:ServiceUrl UseFormsServiceProxy="false">[home address]/_vti_bin/UserProfileService.asmx</udc:ServiceUrl>
<udc:SoapAction>http://microsoft.com/webservices/SharePointPortalServer/UserProfileService/GetUserProfileByName</udc:SoapAction>
<udc:Query/>
</udc:SelectCommand>
<udc:UpdateCommand>
<udc:ServiceUrl UseFormsServiceProxy="false"/>
<udc:SoapAction/>
<udc:Submit/>
<udc:FileName>Specify a filename or formula</udc:FileName>
<udc:FolderName AllowOverwrite=""/>
</udc:UpdateCommand>
<!--udc:Authentication><udc:SSO AppId='' CredentialType='' /></udc:Authentication-->
</udc:ConnectionInfo>
"How To: Create and Use a Data Connection Library." Office Development SharePoint SharePoint 2010 SDK Documentation SharePoint Server 2010 General Reference Application Services InfoPath Forms Services Working with Data Connections How To: Create and Use a Data Connection Library. Microsoft, 2 Apr. 2010. Web. 27 Oct. 2014. MSDN.
"Universal Data Connection V2.0 Reference and Schema." Office Development SharePoint SharePoint 2010 SDK Documentation SharePoint Server 2010 General Reference Application Services InfoPath Forms Services Working with Data Connections Universal Data Connection V2.0 Reference and Schema. Microsoft, 7 Aug. 2013. Web. 27 Oct. 2014. MSDN.