The AD Service supports two methods: GetMyInfo and GetUserInfo. Here are steps to set up a sample form that queries GetUserInfo with a user-entered username string:
1. Start InfoPath
2. Choose Design a Form in left task pane
3. Choose New Blank Form from the right task pane
4. Tools->Data Connections->Add
5. Select Receive Data
6. Select Web service and click Next
7. Type in the URL for your ADService, for example
http://localhost/ADService/ADUserInfo.asmx) and click Next
8. Select GetUserInfo method and click Next
9. Click Next
10. Uncheck "Automatically retrieve data when form is loaded" and click Finish
11. Click Close
12. Navigate to Data Source in the task pane
13. Change Main in the dropdown to GetUserInfo (secondary)
14. Expand the queryFields node until you see "username"
15. Hit enter a couple times in the view
16. Drag "username" from the data source to the view
17. Expand dataFields until you see ADProp
18. Drag the ADProp node into the view and choose repeating table
19. Put the cursor under the Username label in the view
20. Navigate to Controls in the task pane
21. Click Button to add a Button control into the view
22. Double click the newly added button in the view
23. Click Rules
24. Click Add
25. Click Add Action
26. Select Query using a data connection from the dropdown
27. Click OK
28. Click OK until the dialogs go away
29. Click Preview
30. Enter the username for a user in your domain
31. Click Button
Voila! The UserInfo from your Active Directory should be displayed.
Patrick Halstead [InfoPath MVP]
InfoPathDev