Skip to main content

This article discusses how to retrieve a WSDL file from Enterprise Server with Net Express 4.0 and 5.0.

Problem:

How can I retrive a WSDL file from Enterprise Server? I have the web service mapped and deployed using Net Express 4.0 and 5.0.

Resolution:

When a Web Service is mapped and deployed using Net Express or Server Express, a WSDL file is generated for it and deployed with it to Enterprise Server.  That WSDL file can be accessed through the same Enterprise Server Listener that is used for deployment, knowing the directory that the service was deployed to. Since the deployment directory names are generated randomly, it is usually not obvious which directory to look in. Look at the Package object in MFDS (Micro Focus Directory Server) Admin. Bring up Enterprise Server Administration and look for Packages under the Objects column for the running Enterprise Server. Click on the Details button. On the Details page for the Package, there is a Package Path. This is the location where the Web Service and its WSDL are deployed to. As an example, having deployed a Web Service named "MyService" and it's Package is located in C:\\Micro Focus\\Enterprise Server\\deploy\\MyService.kVCxpbUi\\

You need to know the port number for the Web Listener. From the Enterprise Server Admininistration screen, go into the Listeners Details by selecting the Details button next to Listeners in the Communications Processes column, selecting "All" from the dropdown list next to "Process", and look at the Address column for the "Web" listener, which is a basic HTTP web server. It is also the one used for deployment of a service. The number after the ":" is the port number for the Web Listener. If there is an "*" after the number, then it was dynamically assigned. It would be best to have a static port number (for instance, *:9080, or port 80 if no other web server is running on that machine) otherwise, a new port number will be used each time you start that particular Enterprise Server. To change the port number, first stop Enterprise Server if it is running, then change the Endpoint Address from *:* to *:9080 or some other port number and click the OK button before restarting the server.

Click the Edit button for the Web Listener and have a look at the Configuration Information. Under the [virtual paths] heading, make sure you see something such as: uploads=<ES>/deploy  

At runtime, the <ES> part is expanded to the location of the installation of Enterprise Server. In this example, the name "uploads" is the virtual name for C:\\Micro Focus\\Enterprise Server\\deploy\\ and is the subdirectory that contains the directory for the service (MyService.kVCxpbUi in this example). Knowing this, the URL that can be used to retrieve the WSDL file (MyService.wsdl in this example).

From a web browser, type the following URL to retreive the WSDL:

http://localhost:9080/uploads/MyService.kVCxpbUi/MyService.wsdl  

Replace localhost with the host name of the machine where Enterprise Server is installed. Now, either view or save the WSDL from the browser.

Typing in the URL without the WSDL name, a listing of the directory's contents can be seen which would include more than just the WSDL file. To avoid this, create a separate directory under Enterprise Server and copy just the WSDL files there. To do this, create a subdirectory under the Enterprise Server location, for instance, a WSDL subdirectory, and copy any .wsdl files there:  

C:\\Program Files\\Micro Focus\\Net Express\\Base\\WSDL (for a typical Net Express development installation)

or

C:\\Program Files\\Micro Focus\\Enterprise Server\\WSDL (for a typical stand-alone Enterprise Server installation)

From the Enterprise Server Admin screen, go back into the Listeners Details and click the "Edit" button for the "Web" Listener. Add a line to the [virtual paths] section of the Configuration Information, under such as WSDL=<ES>/WSDL. That Configuration information field should look something like:

[virtual paths]

cgi=<ES>/bin

uploads=<ES>/deploy

<default>=/dev/null

docs=<ES>/docs

WSDL=<ES>/WSDL

To use the following URL to get the WSDL file, or to see all files in that directory:  

http://localhost:9080/WSDL/MyService.wsdl

or

http://localhost:9080/WSDL/

The share name/virtual path ("WSDL" in this case) may be case-sensitive so be aware of that when typing the URL into the browser address field.

Old KB# 14154

#EnterpriseServer
#netexpress
#Server
#COBOL
#Enterprise