Several weeks ago, I provided a quick and dirty MID Server Background script that allows you to pull a WSDL from a remote location behind a customer’s firewall.

This works just fine unless you have a complex WSDL that uses “Import” statements. When this is the case, other important parts of the WSDL are located separate files and they need to all be read in order to bring in all of the important information on the Web Service.

The following update set will allow you to load remote WSDL’s, flatten them, and generate SOAP Message Functions all from a convenient UI Action on the SOAP Message form.

When this UI Action is clicked, we issue a request on the MID Server to load a MID Server Script Include and get the WSDL from the remote location, parse it, grab all import urls and embed them into the WSDL, and finally generate the SOAP Message Functions based off of the remote URL’s.

By default the utility will query the first Active MID Server it can find to attempt to retrieve the WSDL. If you have MID Servers in different networks, you can force the tool to use a specific MID Server by setting the following property:

“com.snc.integration.soap.defaultMidServer”

Give it the MID Server name that you want it to use.

I did it this way so that we don’t modify the SOAP Message form out of the box. This way, if ServiceNow makes additional changes to the SOAP Message UI in the future, you can get them automatically without any conflicts.

Download the Update Set

Remote WSDL Flattener