com.ibm.cics.gen.api
Class Factory

java.lang.Object
  extended bycom.ibm.cics.gen.api.Factory

public class Factory
extends java.lang.Object

The factory class for generating instances of the Interfaces needed for calling the CICS Web services assistant. This API is only supported for use on z/OS and Microsoft Windows and requires the use of Java 1.4 or above. In order to use the API you will need to have the following jar files on your classpath. The locations specified are relative to the top of the CICS HFS installation location:

    /lib/wsdl/common.jar
    /lib/wsdl/common.resources.jar
    /lib/wsdl/dfjwsdl.jar
    /lib/wsdl/ecore.change.jar
    /lib/wsdl/ecore.jar
    /lib/wsdl/qname.jar
    /lib/wsdl/wsdl4j.jar
    /lib/wsdl/xsd.jar
    /lib/wsdl/xsd.resources.jar
    /lib/wsdl/xsd.test.jar
    /lib/dfjcdmn.jar

Here is some example code for calling the Web services assistant's API:

IAssistantParameters params = Factory.createAssistantParameters();
 params.setParamLANG(IAssistantParameters.LANG_COBOL);
 params.setParamPDSLIB("c:\\test\\langstructs");
 params.setParamPGMINT(IAssistantParameters.PGMINT_COMMAREA);
 params.setParamPGMNAME("EXPROG");
 params.setParamREQMEM("EXPRG01.cbl");
 params.setParamRESPMEM("EXPRG02.cbl");
 params.setParamURI("/myURI/EXPROG");
 params.setParamWSBIND("c:\\test\\bindfiles\\EXPROG.wsbind");
 params.setParamWSDL("c:\\test\\wsdl\\EXPROG.wsdl");
 params.setParamLOGFILE("c:\\test\\logfiles\\EXPROG.log");

{
   ICICSWebServicesAssistant cwsa = Factory.createCICSWebServicesAssistant();
   IAssistantResponse ar = cwsa.DFHLS2WS(params);
   System.out.println(
    "DFHLS2WS:AssistantResponse.getReturnCode():" + ar.getReturnCode());
   System.out.println("----AssistantResponse.getMessages()----");
   String[] msgs = ar.getAllMessages();
   for (int i = 0; i < msgs.length; i++)
   {
    System.out.println(msgs[i]);
   }
}


Constructor Summary
Factory()
           
 
Method Summary
static IAssistantParameters createAssistantParameters()
          This method returns an instance of a class that implements the IAssistantParameters interface.
static ICICSWebServicesAssistant createCICSWebServicesAssistant()
          This method returns an instance of a class that implements the ICICSWebServicesAssistant interface.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Factory

public Factory()
Method Detail

createAssistantParameters

public static IAssistantParameters createAssistantParameters()
This method returns an instance of a class that implements the IAssistantParameters interface. This in turn can be used to populate the parameters object used to pass parameters to the CICS WebServices assistants.

Returns:
an IAssistantParameters instance
See Also:
IAssistantParameters

createCICSWebServicesAssistant

public static ICICSWebServicesAssistant createCICSWebServicesAssistant()
This method returns an instance of a class that implements the ICICSWebServicesAssistant interface. This in turn can be used to programmatically execute an instance of the CICS WebServices assistants.

Returns:
an ICICSWebServicesAssistant instance
See Also:
IAssistantParameters