Problem:
Release:4.0
Redirecting output from the Generate Client using WSDL feature
This method was tested with Net Express 4.0 with All Websync WrapPack v4.0.008.
Resolution:
The Generate Client using WSDL option from the Service menu of the Net Express IDE will create a Web Service client program, proxy program, and copyfile, but it will place them in the project directory. To want to place these files in different locations, it may be better to use the imtkmake command line utility to do the job. The idea here is to create a batch file with the commands necessary to generate the files and move them to the locations where to have them to be. It can add this batch file as a Tool to the IDE (Integrated Development Environment).
As an example, the project directory is C:\\MyProject and there is a CBL subdirectory for source code, a CPY subdirectory for copyfiles, and a WSDL subdirectory for any .wsdl files, to place the appropriate files in those directories. Creating a batch file (named: genclient.bat) with the following commands:
imtkmake -genclientwsdl clientwsdl=C:\\MyProject\\WSDL\\SomeWebServiceDef.wsdl clientdir=C:\\MyProject\\CBL defaultstringsize=100 defaultarraysize=100
move C:\\MyProject\\CBL\\*-copy.cpy C:\\MyProject\\CPY
del C:\\MyProject\\WSDL\\*.!!*
The imtkmake command and it's options should be on one line.
The -genclientwsdl option of imtkmake generates a COBOL client program from WSDL. The clientwsdl option specifies the name and location of the .wsdl file using to generate the client from. The clientdir option is the location where to place the generated files. This would include the COBOL source files for the client and proxy programs, and the copyfile. The last 2 options specify the default string and array size. The second statement in the batch file is a move command to move the generated copyfile to another location. The copyfiles created by imtkmake have -copy.cpy appended to the end of the file name. The del command deletes any temporary files left behind by imtkmake. If these temporary files are left behind, to notice them at the location where the .wsdl file resides and they will have the same name as the .wsdl file, but with an extension that contains !! characters.
Adding this batch file to the Tools menu of the Net Express IDE, select the Options menu, Customize IDE... menu. Select the Tools tab and click the New Tool... button. Type in a name for the tool...use something to identify this tool as a way to generate a Web Service client from WSDL. In the Command field, type the name of the batch file. At this point, closing the Customize dialog box and using the tool from the Tools menu where it can be seen listed with the name typed in before.



