How to quickly edit multiple Web Service urls inside a InfoPath formA good way to communicate with SharePoint from within a InfoPath form is to use Web Services. Normally you will manage the data source type Web Service with the help of the Data Connection Wizard. To investigate the web service you often have to supply the wizard with some example parameters, especially when the web service doesn’t return any result with empty parameters. Providing those parameters can take quite some time if you have to update more as one web service.

One of my current projects included 5 InfoPath forms with each 6 web services. Clicking through the Data Connection Wizard to update the url would take quite some time and I only needed to change the location. My test environment used the same web service as in production, but because of the different server name I had to update the urls to make the InfoPath forms work.

I found some interesting instructions in the InfoPath documentation and I decided to take it to the test. It turned out to be a good and quick way to update the urls. If you are facing the same situation as me follow these steps:

  • Open your XSN file inside InfoPath
  • Choose “Save As Source Files…” from the File menu and select a location on your hard disk to store the source files
    Save xsn file as source files
  • Open the location on your hard disk with Windows Explorer. You will see all the files that are normally contained in the xsn file. One of these files is called manifest.xsf which contains information about the form like the urls from our web services
    The xml manifest file
  • Open the manifest.xsf file inside your favorite text editor like Notepad and do a search and replace for the url that needs to be changed
  • Save the edited manifest.xsf file
  • Open the manifest.xsf file again but now with InfoPath
  • Continue to edit your form or publish it again
  • That’s it! All urls are updated within a single minute

Take in mind that you cannot always use this method. If the structure of your Web Service changed you have to run the Data Connection Wizard again, but for changing only the urls this method will save you quite some time.