Before going into details of how to use explicit credentials, I want to make sure you are aware of the drawbacks. Users must have read permission to the UDCX in order to have permissions to use the credentials. This means that users will have permission to see the username/password if they discover the path to the udcx. You should use as restrictive an account as possible, preferrably read-only.
This is an example of using the UseExplicit:
<udc:Authentication>
<udc:UseExplicit CredentialType="Ntlm">
<udc:UserID>domain\userid</udc:UserID>
<udc:Password>plaintextpassword</udc:Password>
</udc:UseExplicit>
</udc:Authentication>
CredentialType can be Basic, CD, Digest, Kerberos, Ntlm or Sql (http://msdn.microsoft.com/en-us/library/dd945653(v=office.12).aspx)
If you don't mind reading a UDCX schema, the complete details are here:
http://msdn.microsoft.com/en-us/library/dd905058(v=office.12).aspx
Related threads:
http://www.infopathdev.com/files/folders/73113/download.aspx
http://www.infopathdev.com/forums/t/13010.aspx