You could do that or when you move from dev to production open the form, right click on the data connection, look at its properties and update the WSDL address. Now save your form and it will go against the prod environment.
But if you do that, the form will no longer work on the development server, you will get the "Error attempting to read from file..." error message.
Is there a way to dynamically set the correct soap address without modifying the form at all?
You can programmatically set the address but something has to tell the program which server you want to connect to. Do you have a flag or something on the form for this?
I was planning on doing this:
in a table in our database, it stores the server IP. in the development database, it stores development server's IP; in the production database, it stores production server's IP.
so, I thought I could make a query at the Render form service, and get that IP and put it in a hidden field on the form. Then, at the time the form is loaded, I can use a line of script to set the soapAddress like this:
That technique is OK ...what event do you have the script on? Put it on a button so you can see the execution and ensure that IPField is filled. Once you know the code is good put it on the Form Ready event.
Also make the target version of the form something less than 8.0 or else it will not allow you to change that setting (File/Form Properties/Defaults).
I just tried it again. I put it in the ready:form event, and set traget version to 6.
It worked fine when I have Acrobat Pro running. But it failed when I used Reader 8.1.2 !