Web services WSDL location
Author: i.sharp@pcisystems.co.uk (Iain Sharp)
For our test environment we need to support more than one version of the application on the same server. I can redirect the wdsl/userver paths using the web.xml file to point at different USTs for different virtual folders. Is there anything I can set up anywhere which gives the wsdl definition path. Sometimes we want to change the operations/parameters, and currently all the wsdls are stored in unface\webapps\uniface\WED-INF\wsdl. I would definitely prefer this problem to having to manage three or four tomcat installations, so please don't suggest multiple tomcat setups. Ideally, there would be a setting in the servlet or servletmapping sections of web.xml which passed in a wsdl source folder. I've had a look at the documentation, but I'm sure it's easier to find if you already know what it is called. regards, Iain
7 Comments
Local Administrator
Hi Iain, In my last project I have used $signatureproperties() to implement what you asked for; all SOAP connector options could be redirected by code using it. More informations are available into Uniface Library. Regards, Gianni
Author: gianni (gianni.sandigliano@unifacesolutions.com)
Local Administrator
Hi Iain, Why not define multiple virtual directories (or web apps) for the different versions? For this you could copy the uniface.xml in \common\tomcat\conf\Catalina\localhost and point the docBase to a different directory (so instead to \uniface\webapps\uniface). For example: * app_version1.xml => docBase="C:\Tomcat\webapps\app_version1" * app_version2.xml => docBase="C:\Tomcat\webapps\app_version2" Then you can copy the content of \uniface\webapps\uniface (except \common) to the different versions. And in the different web.xml config files (in \WEB-INF) you can define the appropriate network paths with the required USTs. For maintainability (i.e. when installing a patch) it's best to "reuse" the default \uniface\webapps\uniface\common. You can do this by creating a file in \common\tomcat\conf\Catalina\localhost called <web app>#common.xml (where <web app> is the name of the web app, like e.g. app_version1). And the docBase of all these files points to \uniface\webapps\uniface\common. For example let's say Uniface is installed in C:\Program Files (x86)\Uniface\Uniface 9.7.01\): * app_version1#common.xml => docBase="C:\Program Files (x86)\Uniface\Uniface 9.7.01\uniface\webapps\uniface\common" * app_version2#common.xml => docBase="C:\Program Files (x86)\Uniface\Uniface 9.7.01\uniface\webapps\uniface\common" Now each version of the application has its own WSDL directory. I hope this makes sense and helps. Kind regards, Daniel
Author: diseli (daniel.iseli@uniface.com)
Local Administrator
Hi Gianni, Yes, I'm using that for the call to the web-services. I can selectively call in to my web services as per the examples below. The problem is, that all versions of the same uniface service have to have one WSDL between them.
All use the web.xml found in installdir\uniface\uniface\webapps\uniface\WEB-INF\web.xml which is then configured as follows.
This sends the requests to the urouter(s) using different USTs, allowing me to access different versions of the system. However, there is nowhere I can find to define the internal, path used by tomcat to the actual WSDL file, so I have to have the same wsdl file for all versions of the same service. i.e. on call in it always looks for the wsdl file in installdir\uniface\uniface\webapps\uniface\WEB-INF\wsdl\pus_receipt_wsdlw.wsdl I'd like something in the web.xml file like
So each servlet could have it's own wsdl filder to store the wsdls in. $signatureproperties is only for call out from Uniface, I am talking about call in to uniface. I believe the path to the wsdl will be being used in wrd.jar, but I have no way of seeing whether theres anything in there which woudl switch the base folder.
Author: Iain Sharp (i.sharp@pcisystems.co.uk)
Local Administrator
There's a problem with the bottom bit, but on editing it gets all confused. Should be. c:\appdir\ resources\wsdl but without the space.
Author: Iain Sharp (i.sharp@pcisystems.co.uk)
Local Administrator
Hi Iain, You probably have not seen my reply (yet). But instead of defining different servlet-mappings you should use different virtual directories. E.g.
http:// serverurl:8080/uniface/services/pus_receipt_wsdlw.wsdl http:// serverurl:8080/uniface_devel/services/pus_receipt_wsdlw.wsdl http:// serverurl:8080/uniface_test/services/pus_receipt_wsdlw.wsdl
For the rest see my answer above. Daniel
Author: diseli (daniel.iseli@uniface.com)
Local Administrator
Thanks (I think) Daniel, this looks like it will do what I want, just with a lot more redundant files and folders that would be nice. I'll check it out. Regards, Iain
Author: Iain Sharp (i.sharp@pcisystems.co.uk)
Local Administrator
You are welcome. And the amount of redundant files should be manageable, since you can reuse the \common folder from \uniface\webapps\uniface\ (as described above). The rest of the files and folders are (more or less) application specific. Regards, Daniel
Author: diseli (daniel.iseli@uniface.com)