Previous Topic Next topic Print topic


imtkmake command

Enables you to create and deploy a COBOL program-based service interface, and generate a client to access the deloyed service running on an enterprise server.

Syntax:

imtkmake -defmap          service=service-name
                          src=program-name
                          type=service-type
                         [directives=Compiler-directives] 
                         [settings=properties-filename]
imtkmake -generate        service=service-name
                          type=service-type
                         [appdir=directory-name]
                         [appserver=J2EE-application-server-name]
                         [bean=bean-name]
                         [classpath=pathname]
                         [ejbname=ejb-name]
                         [esruntime=esruntime-filename]
                         [exithandler=program-name]
                         [filename]...
                         [@filelistname]
                         [jarname=jar-filename]
                         [namespace=service-namespace] 
                         [package=package-name]
                         [serverHost=host-name]
                         [serverPort=port-number]  
                         [session={stateless|stateful}] 
                         [settings=properties-filename]
                         [style={doclit|rpcenc}]
                         [transaction={application|container}]
                         [url=ip-address]
imtkmake -query
imtkmake -queryAppServerList
imtkmake -deploy          type=service-type
                         [carname=car-filename]
                         [password=secure-password]
                         [server=server-name,deployer-name]
                         [settings=properties-filename]
                         [username=secure-username]
imtkmake -showlog         deploydir=deployment-directory
imtkmake -genclient       service=service-name
                          type=service-type     
                         [appserver=J2EE-application-server-name]
                         [clientdir=directory-name]
                         [j2eeVersion={1.3|1.4}]
                         [namespace=service-namespace]
                         [style={doclit|rpcenc}]
                         [url=ip-address]
imtkmake -genclientwsdl   clientwsdl=wsdl-filename
                         [clientdir=directory-name]
                         [defaultstringsize=string-size]
                         [defaultarraysize=array-size]
imtkmake -help

Parameters:

-defmap
Create a service interface using default mappings based on the COBOL program specified in the src= parameter.
-generate
Generate deployment files based on the parameters set, and generate a COBOL archive (.car) file containing the generated files for deployment to the enterprise server.
-query
List the enterprise servers available for deployment.
-queryAppServerList
List the J2EE application servers available.
-deploy
Deploy the .car file created with -generate parameter to the enterprise server. Execute imtkmake with the -deploy parameter from the servicename.deploy directory.
-showlog
Display the contents of the deployment log (deploylog.txt file).
-genclient
Generate a client from the service interface, according to the specified type, such as EJB or Web Services.
-genclientwsdl
Generate a COBOL client from WSDL.
-help
Display information about imtkmake functions and parameters.
appdir=directory-name
The path to the application files for the application running on the enterprise server.
appserver=J2EE-application-server-name
This is the name and version of the J2EE application server for which an EJB is generated and to which an EJB is deployed. This defines the deployment descriptors that are generated.

This is mandatory when generating EJBs and EJB clients. In other words, mandatory when using the -generate or -genclient functions with type set to EJB. The values must be within quotes since they contain spaces. For example:

  • "JBoss 4.2.3"
  • "WebSphere 6.0"

Note that this parameter must come after the other parameters.

See -queryAppServerList for how to list the available servers.

bean=bean-name
For EJB generation, the name of the bean to generate. Defaults to service-name.
carname=car-filename
The path to and name of the .car file to deploy. By default, this file is named service.car and is in the service.deploy directory. carname= is not required when you generate and deploy on the same command line.
classpath=pathname
For EJB generation, the classpath of the J2EE implementation classes on the J2EE application server. This is case sensitive. This is different for each J2EE application server and is the path to the following .jar files:
  • JBoss's jboss-j2ee.jar and servlet-api.jar
  • WebSphere's j2ee.jar
  • WebLogic's weblogic.jar
clientdir=directory-name
The directory in which to generate the client program. With the -genclientwsdl function, defaults to the WSDL file directory; otherwise defaults to the directory where the service is deployed
clientwsdl=wsdl-filename
The name of the WSDL file to generate the client program from which to generate it.
defaultarraysize=array-size
The default array size to use for unbounded arrays.
defaultstringsize=string-size
The default string size to use for unbounded strings.
deploydir=deployment-address
The URL of the deploylog.txt file. This URL is displayed by the -deploy function.
directives=Compiler-directives
The directives required for the program to compile correctly. Use a comma between directives.
ejbname=ejb-name
For EJB generation, the name of the EJB to generate. Defaults to service-nameEJB.
esruntime=esruntime-filename
The name of a file containing the run-time configuration settings to be applied when the deployed service is run. The file extension must be .rtc.
exithandler=program-name
For Web Services generation, the name of a user exit program to handle the exit points in the MFRHSOAP request handler.
@filelistname
The name of a file containing a list of additional files that need to be included in a .car file. Each file name must be on a new line.
filename
An additional file that needs to be included in a .car file. You can specify multiple additional files.
jarname=jar-filename
For EJB generation, the name of the .jar file to create. Defaults to service-name.jar.
namespace=service-namespace
For Web Services generation, EJB generation and client generation, the service namespace. Web Services generation and client generation defaults to http://tempuri.org/service-name. EJB generation defaults to service-name .
package=package-name
For EJB generation, the name of the package of Java classes to contain the bean. This is case-sensitive. Defaults to com.mypackage.service-name.
password=secure-password
The password to enable a service interface to be deployed to a secure server. This is required only when MFDS is configured to require it.
server=server-name,deployer-name
The destination of the deployment files. server-name is the enterprise server to which you want to deploy the service, and deployer-name is the name of a deployment service on that enterprise server. If you do not supply this parameter, the function lists the servers available for deployment and prompts you to choose one.
serverHost=host-name
The name of the host machine that is running the enterprise server for the J2SE Java bean.
serverPort=port-number
The port number of the enterprise server listener for the J2SE Java bean
service=service-name
The name of the service for mapping or generation.
session={stateless|stateful}
For EJB generation, the type of EJB to generate. Defaults to stateless.
settings=properties-filename
The name of a file containing the set properties for this service interface.
src=program-name
The program use for creating default mappings.
style={doclit | rpcenc}
The style to use for WSDL generation. The default is doclit.
transaction={application|container}
Specifies whether the service is application-managed or transaction-managed. The default is application.
type=service-type
The type of mapping to perform or type of client to generate (see defmapgenclient and generate above), where service-type can be one of the follwoing:
  • EJB
  • J2SE bean
  • WebService
url=ip-address
For Web Services and client generation, the IP address of the service. This is added to the WSDL document.
username=secure-username
The username that enables a service interface to be deployed to a secure server. This is required only when MFDS is configured to require it.

Comments:

  • Execute imtkmake from aNet Express command prompt in the directory that contains your COBOL program file.
  • This command performs several functions. You must execute the folloowing against the same program in the this order:
    • -defmap
    • -generate
    • -query (optional)
    • -deploy
    • -showlog (optional)
    • -genclient and/or -genwsdl (optional)
  • You can combine some functions on the same command line:
    • -defmap and -generate together, to create a service interface with default mappings and generate deployment files to be deployed at a later time.
    • -generate and -deploy together, to generate deployment files for an existing service interface, deploy them to an enterprise server.
    • -defmap, -generate, and -deploy together to perform all three functions.
    Note: When you combine two or more functions on the same command line, you do not need to repeat parameters that are common.
  • You can combine the use of the command line functions with the use of the Service Interfaces feature in Visual Studio. For example, you might create the service interface and customize it in Visual Studio. You could then use the command line to deploy the service interface.
  • If you use the Service Interfaces feature in Visual Studio to specify mapping properties for the service interface using the Mapping Properties dialog box, Visual Studio creates an XML file to hold the settings. You can specify this XML file to the -generate function using the settings=properties-filename parameter. The mapping properties XML file contains values for the optional parameters associated with the -generate function. If you specify any of those parameters on the command line, these override the values contained in the mapping properties XML file.
  • You can use () as delimiters around parameters rather than = before them, for example, src(book.cbl) instead of src=book.cbl.
  • When you deploy a service interface using imtkmake -deploy, imtkmake looks in the following places in the following order to find items to deploy, and uses the first instance of each deployable item found:
    • MFDS. If the deployment items are in MFDS, any configuration settings in the [destination] section are used. For example:
      [destination]
         server=ESDEMO
         listener=Web Services and J2EE
      
    • MFDS. If the deployment itemsare in MFDS, but there aren't any configuration settings, imtkmake uses the enterprise server that owns the service.

Examples:

The following command creates a service interface with default mapping for the program book.cbl:

imtkmake -defmap src=book.cbl service=wmapserv type=webservice

The following command generates a Web service for the wmapserv service interface:

imtkmake -generate service=wmapserv
                          type=webservice
                          exithandler=myhandler
                          namespace=http://corpuri.org/wmapserv

The following command generates an EJB for the JMapServ service interface:

imtkmake -generate service=JMapServ
                          type=ejb
                          bean=JMap
                          classpath=/usr/java131/lib/j2ee.jar
                          ejbname=JMapEJB
                          esruntime=jmapconf.rtc
                          jarname=JMap.jar
                          package=com.corp.jmap
                          session=stateful                          
                          appserver="WebLogic 9.0"

The following command generates a Web service for the wmapserv service interface and deploys it to the enterprise server ESDEMO. The additional data file data-files-path\bookfile.dat is deployed:

imtkmake -generate service=wmapserv type=webservice
         -deploy server=ESDEMO,Deployer data-files-path\bookfile.dat

The following command deploys a Web service that has already been generated in wmapserv.car to the enterprise server ESDEMO:

imtkmake -deploy carname=wmapserv.car server=ESDEMO,Deployer

This submit is a successful deployment, as indicated by the 202 return code, and the presence of the URL in the response message.

The following command displays the deploylog.txt file from the URL http://10.120.72.229:47704/uploads/cw_diYLq:

imtkmake -showlog deploydir=http://10.120.72.229:47704/uploads/cw_diYLq

The following command creates a COBOL client program for the service wmapserv:

imtkmake -genclient type=webservice service=wmapserv

The following command creates a COBOL client program for the service wmapserv using the service's WSDL file:

imtkmake -genclientwsdl clientwsdl=wmapserv.wsdl 
Previous Topic Next topic Print topic