code migration (having webservices) to other environment.

Hello,
I am using the third party wsdl in my webMethods services/packages. I have created a webservice connector to use these webservices. now, I want to migrate my packages to QA from development and then to Prod. the QA and Prod instances of third party webservices are differrent. I am looking for suggestion as how to migrate the package without minimal chage to tested code in previour environment. placing the URL of webservices in properties file will not help in this case.
Thanks, Mandar.

How are these web services different? Is it only the endpoint URL or are there other differences? If the services are different what is the value of testing them in QA?

Mark

I agree with mark.

Normally the things that change from Env to Env is server address (moslty the server IP/Domainname. The relative location will remain the same).

you can have a simple flow service which gives you the server address depending on the environment you are using.

there is a sample service in the wmSamples ‘sample.serverInfo.getServerInformation’, which gives you the name of the server on which the service is currently running.

you can have a branch on this and depending on it’s value get the target server address and map the pipeline value to the address parameter of the webService connector (http/s call)

HTH
PRY

Thanks for the solution, Branch on getServerInformation will be better option so I dont have to use properties file or change properties file as I migrate between different environments.
In one case, I was getting SAXException while running the webservice directly. So, I generated jar files using wsdl2java and have a small java service calling those objects. As the webservice url changes, I need to change the jar files? and if I change jar files, there is a risk of untested code being migrated.

we do the same in our project (branch on getServerInformation)…

good it helped you!

PRY

In the case of jar files generated from wsdl2java, how can we change the jars to point to different web service. right now, I am generating the jar again and placing in the developer java service. Is it possible to use similar to getServerInformation ? Thank you.

actually the getServerInformation, which is a java service uses some of the server API’s.

So if we can associate/calling these API’s in the generated JAR files then it would be posssible.

HTH
PRY

if on account of capacity planning, production servers are added/changed, and we have a branch on getServerInformation, we have to change the branch statements in code, involving re-migration.

if servers are added you need just a patch release of the single flow service (containing the getServerInformation service call).

This is pretty simple.

HTH
PRYWM

creating patch release, testing will need development effort, do we have any configurable approach?

its just a flow service with addition of maps steps for the new servers (literrally adding diffeerent values to the server pipeline variable based on brach conditions).

I dont quite understand why this would be development cost (not atleast considarable).

other way is

  1. create a dummy Table in DB with a Env(for value returned by getServerInformation) and server(For the webService URL for the target system).
  2. inside the flow service call the getServerInformation to get the Env value for DB.
  3. Make a query to DB (using JDBC Adapter for temp DB table) to get the Server column value based on the Env (got from the getServerInformation)
  4. Pass this value to the webService calling URL to call the appropriate target server based on which webMethods environment u r using.

All you need to do in case of extra servers added is to update the db table with the new rows for ENV and Sserver fields.

HTH
PRY