One of the most useful features of InfoPath, is the ability to easily set up and use data connections from so many sources. Using data connections to web services, InfoPath can be used to create a form that passes data onto a third party website where the data is acted upon in some way and a response passed back to the end user.
A simple, yet practical example of this is this simple text translator. This was built on the back of a customer request to have forms available in multiple languages. No code is used in this development, but we do make use of the “Rules” functionality by which Business Logic and in-form workflow can be built.
While the result of some InfoPath experimentation presented here will not be putting any multi-lingual technical translating staff out of business I’m sure you can think of other applications which could benefit from a Web Service interface such as this.

Ok – so how do you go about creating a translation form? It’s as simple as baking a loaf of bread, so let’s start by looking at the ingredients we will need!
Recipe for InfoPath Translator – Serves 5 ( English, German, Spanish, French and Italian!)
Ingredients:
- One InfoPath Designer Client
- One Web Service API URL ( I use the Microsoft Translation API in this example) http://api.microsofttranslator.com/V2/Soap.svc
- One Application ID (Sign up and Register with Bing for this) http://www.bing.com/toolbox/bingdeveloper/
-
A little bit of knowledge regarding the web service requirements (Follow the link below for all the information you need) http://msdn.microsoft.com/en-us/library/ff512435.aspx
Instructions
- In InfoPath 2010 Designer create a new Blank Form and create a table with six rows and two columns
-
Create a Data Connection – Not built one of these before? – Don’t worry a wizard makes this really simple!
- From the ribbon select Data / From Web Service /From SOAP Web Service and enter in the web service URL as below:

3.Now from the list of Services select Translate

4. On the next screen you will see a list of Parameters that are used by the web service – Enter your Bing Application ID here by using the Set Value button (You do have an app id don’t you? If not, sign up at http://www.bing.com/toolbox/bingdeveloper/) In the content type and category parameters set the values to ‘text/plain’ and ‘general’ respectively

5. The next screen should be skipped – hit the Next button

6. Now we are on the final screen for our data connection set up. Deselect the “Automatically retrieve data when form is opened” check box – Best practice for forms is to only use data connections when needed, and we will only be calling this service when a button is clicked









