Different source for the WSDL files

Author: i.sharp@pcisystems.co.uk (Iain Sharp)

When doing call in to uniface web services, the wsdl files are generally placed in <install_dir>\uniface\webapps\uniface\WEB-INF\wsdl When I am running different versions of our applications from the same machine, I can use different virtual folders and map them to the correct UST values in the web.xml file, e.g. 

-<servlet-mapping>
<servlet-name>srd</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>

-<servlet-mapping>
<servlet-name>srdt</servlet-name>
<url-pattern>/services_test/*</url-pattern>
</servlet-mapping>

-<servlet-mapping>
<servlet-name>srdd</servlet-name>
<url-pattern>/services_devel/*</url-pattern>
</servlet-mapping>

  Question :- Is there a parameter in here I am unaware of which can also redirect the path for the wsdl files above? I am currently having to be aware of what version the wsdl files relate to, and copy and paste to test the different versions.... 

5 Comments

  1. Hi lain, I feel you're looking for $signatureproperties(). It enables to programmatically change many options for each SOAP service: position of wsdl, timeouts, callout services, ... Have a look into your latest ULibrary. Gianni


    Author: gianni (gianni.sandigliano@unifacesolutions.com)
  2. Hi Iain, The SRD will always look for the WSDL in the sub-directory wsdl of /WEB-INF. But in theory it should be possible to copy a WSDL to another location within a virtual folder and access it from there. You just have to keep in mind that (in the WSDL) you need to replace the "@@UnifaceLocationPlaceholder@@" string in the element <soap:address> with the actual URL of the Web Service (e.g. http://serverName:8080/uniface/services). Hope this helps. Daniel


    Author: diseli (daniel.iseli@uniface.com)
  3. gianni said I feel you're looking for $signatureproperties().

    Hi Gianni,  That option is for calling the wsdl from within uniface. I do use that option (and am slowly backtracking through the various workarounds which came before it.).  I am more looking to control the methods and parameters available to an external source based on the version of our app they are connecting to, with more than one version installed on the same machine.  So, I have a development, testing and production version of our app all installed on the same server. I can control which one is called from the outside using the url-pattern to servlet-name map given above. Using a url containing uniface/services_devel will get routed (via a ust and urouter) to the development installation, uniface/services to production etc.  If I wish to introduce a new parameter to an existing method in development, I alter the uniface service, re-export the wsdl and get a new file with the new parameter in it. As Daniel says above however, there is only one place to put this wsdl, in the WEB-INF/wsdl folder, where it overwrites the one used by production (or testing) and neither of those can be used until their applications catch up.  I believe all of this processing happens before the uniface system even kicks in, so the config would perforce need to be in Apache Tomcat. 

    Daniel said But in theory it should be possible to copy a WSDL to another location within a virtual folder and access it from there. You just have to keep in mind that (in the WSDL) you need to replace the “@@UnifaceLocationPlaceholder@@” string in the element <soap:address> with the actual URL of the Web Service (e.g. http://serverName:8080/uniface/services).

    Not sure I understand, where do I put the actual wsdl file to register it with Tomcat? Is there a config somewhere which controls which folders it looks in other than WEB-INF/wsdl? Otherwise I have two filenames of the same format occupying the same space...  Iain


    Author: Iain Sharp (i.sharp@pcisystems.co.uk)
  4. Iain Sharp said
    Daniel said But in theory it should be possible to copy a WSDL to another location within a virtual folder and access it from there. You just have to keep in mind that (in the WSDL) you need to replace the “@@UnifaceLocationPlaceholder@@” string in the element with the actual URL of the Web Service (e.g. http://serverName:8080/uniface/services).
    Not sure I understand, where do I put the actual wsdl file to register it with Tomcat? Is there a config somewhere which controls which folders it looks in other than WEB-INF/wsdl? Otherwise I have two filenames of the same format occupying the same space...  Iain  

    You could put it into a sub-directory within your virtual folder. E.g. the virtual folder is called uniface and it contains a directory called wsdl:

    • http://serverName:8080/uniface/wsdl/svc1dlw.wsdl

    Now Tomcat will load the WSDL as a normal file (and it's not rerouted anymore through the SRD). And it should be possible to rename the WSDL to suit your needs for different versions of your application; e.g.

    • http://serverName:8080/uniface/wsdl/svc1_v1.wsdl => <soap:address>http://servername:8080/uniface/services/SVC1</soap:address/>
    • http://serverName:8080/uniface/wsdl/svc1_v2.wsdl => <soap:address>http://servername:8080/uniface/services_test/SVC1</soap:address/>

    Hope this makes sense. Daniel


    Author: diseli (daniel.iseli@uniface.com)
  5. Sorry, but the HTML editor of the forum is playing havoc with my answer. Confused


    Author: diseli (daniel.iseli@uniface.com)