Link a Form to a Web Service
Another way to use a shared data source with InfoPath is to link the form to a web service. You can’t just use any web service with InfoPath. If you try to use the Amazon or Google web services, for example, you’ll get the error shown in Figure 7-34.
Figure 7-34. InfoPath rejecting an RPC-encoded web service
The InfoPath SDK installs these examples that demonstrate how to write a web service that can be used by InfoPath forms:
Web services provide a way to link InfoPath forms to non- Microsoft databases.
To install the InfoPath SDK web service examples locally, you must be running Windows XP Pro with IIS installed.
How to do it
The SDK has pretty good instructions on how the sample web services work and how to use them from InfoPath. I won’t repeat those here, but to make your life a little easier, I’ve installed those services at http:// www.mstrainingkits.com/Excel and modified the sample forms to work with that location. This means that you can run the samples without installing the SDK (Figure 7-35).
Figure 7-35. SDK web service sample (modified)
In addition to changing the data source for the web ...