Managing webservice endpoints

Dear all,

On a CAF app, how to manage webservice host address/port number for the deployment to different environments (such as QA and PD)?

Elaborating a bit more: in a CAF app, when you create a call to a web service, the Designer hardcodes the webservice’s hostname and portnumber. However, it is very common for having different environments during the software life cyle: a DEV, a QA and a PD. And in these environments, it is not unusual that the webservices will reside in other servers, thus getting different names.

Having this said, how to manage these configurations?

PS.: during the “webservice call” set up, I noticed a configuration dialog where it asks whether using the hostname or “endpoint”. Could this be a way to manage these configuration? And I could not find any documentation explaining how to configure or use these “endpoints”. (SAG guys: this is a topic you should explain in the documentation!)

Couldn’t find a way to define it in the deployer.

Had to go into Sysadmin interface and redefine it manually in the application configuration (the CAF app you deployed) on each server…

If someone knows of a better, automated way…

Best Regards

You may find this white-paper helpful.

White_Paper_-_CAF_Web_Service_Connector_Configuration-1.doc (405 KB)

Thank you Roy, that is exactly what I was talking about.

Unfortunately, this is not a good choice as a storage of environment definitions for automated deployments.

I am looking for something usable on the Deployer, similar to the IS packages properties which can be defined on deploy time.

How can those properties be defined separately from the code, so that you can apply a different set of values according to the target environment, on deployment time?

Best Regards,
Gerardo Lisboa

The Repository style project in Deployer has full support for modifying these values at deployment time. The Map step of the deployment presents the user with list of all of the entries in the application’s web.xml. These are the same variables editable from the CAF Application Runtime Configuration portlet.

I think that is a great suggestion Ron, but I have some trouble finding good documentation about the exact properties of the configuration of repository-based deployment.

Maybe I am looking on the wrong place. Where can I find more documentation? Are there any wiki entries or samples for further study?

Best Regards,

It’s not clear what information you are interested in when you “exact properties of the configuration”. If you are referring to the env-entry tags of the CAF/Task application’s web.xml? These are completely customizable by the designer. When generating a web service connector, there are several wsclient-* env-entry items are created. Are these the items you need more information about?

Hello,

Yes, I couldn’t really find any examples of a repository-based deployment.

To add a wsclient setting in the properties files, which file and setting should I write?

Best Regards,

When you add a web service connector to your CAF application, several wsclient-* environment variables are added by default.
If you wish to create new ones, you can edit the web.xml to declare the new variable and set it’s default value (using the existing wsclient-* entries as an example).
You would then modify the bindings of your web service connected to use this new environment variable value. The binding expression would look something like this: #{environment[“my-custom-env-var”]}

Yes, Ron, but what is the format of the map.xml file?

Thanks.

The web.xml is the standard Java EE web application descriptor. It is automatically created in your CAF/Task application in the \WebContent\WEB-INF subdirectory.

This file is thoroughly explained and documented as part of Java EE.
http://docs.oracle.com/javaee/5/tutorial/doc/geysj.html