/sto

Export interface definitions to integrate call-in from various types of middleware, or generate Java files for Java call-in, or generate C call-out stub code.

/sto   /mwr=Middleware | lan=Language   {OptionalSubswitchesAndParameters}

Common Switches

Common Parameters

  • SignatureList—space-separated list of one or more component signatures for which files need to be generated. Each signature must have an implementation.
  • Path—path where the output will be written. If not supplied, the output will be written in the current working directory.

Export Interface Definitions for Web Service Call-In

The interface export facility creates an interface WSDL file for each of the specified Uniface signatures, and an XSD (XML Schema Definition) file for each complex data type.

The names of exported WSDL files have the suffix dlw added to the end of the Uniface signature name, for example mysignaturedlw.WSDL.

If complex data types such as Uniface Entity and Occurrence data types are used in the Uniface service, it also generates XSD files (XML Schema Definition) for each complex data type used in the web service.

The name of each XSD file is constructed using the name of an entity represented by a complex data type. The file name is the concatenation of the entity’s model (if specified) and the name of the entity, for example mymodelmyentity.XSD.

/sto  /mwr=ws   {/rpcencoded}   SignatureList

  • /mwr=ws—export web service definitions (WSDL).
  • /rpcencoded—sets the binding style of the exported WSDL file to RPC/Encoded. If omitted, the binding style is Document/Literal Wrapped.
  • SignatureList—space-separated list of signatures of Uniface services for which WSDL files will be generated. At least one service must be specified.

For more information, see WSDL and Exporting WSDL and Schema Files for Web Services Call-In.

Export Interface Definitions to a DLL for COM Call-In

The interface export facility creates an interface DLL DLLFile containing the interface definitions for each of the specified Uniface signatures.

/sto  /mwr=com   /cfg=ConfigFile   DLLFile SignatureList

  • /mwr=com—specifies the COM middleware connector.
  • /cfg=ConfigName—name of a configuration definition that specifies the Uniface environment in which you want to execute the services. You can create this definition using the Uniface COM Configuration tool, by which you specify different combinations of .ini, .asn, and application shells.
  • DLLFile—name of the self-registering COM interface DLL that is created.
  • SignatureList—space-separated list of signatures of Uniface services for which an interface DLL will be generated. At least one service must be specified.

For example, the following command line exports the interface definition of a signature MyService with a 4GL implementation into a COM object:

/sto /mwr=com myservices.dll myservice

For more information, see Enabling COM Call-In.

Generate Java files for Java Call-In

The The /sto /lan=c command generates Java files from Uniface signatures which can then be used to enable Java call-in.

For each signature, /sto generates the Java source files Signature.java, SignatureBean.java, and SignatureBeanBeanInfo.java.

It also generates a manifest file FileName.mf and a batch file FileName.bat. You must subsequently run the .bat file to compile the Java source files and build the Java archive file named FileName.jar.

/sto  /lan=jav   {/pth=Path}   {/pkg=Package}   FileName   SignatureList

  • /lan=jav—generate files for Java call-in
  • /pth=Path—location of the generated files. If not specified, the current working directory is used.
  • /pkg=Package—complete package name to be used for the wrapper files. This determines the directory structure where the generated files are located and the package name specified in the wrapper files themselves.
  • FileName—name (without suffix) to be used for the generated file and manifest file. You can subsequently use the script file to compile and archive the generated Java sources.
  • SignatureList—space-separated list of signatures of Uniface services, separated by spaces.

For example:

  • Generate Java code for a single component signature:
    /sto /lan=jav MyJavaBatchFile MYSignature
  • Generate Java code for the component signatures comp1 and comp2:
    /sto /lan=jav MyJavaBatchFile comp1 comp2

Example: Generating Java Code for Java Call-In

The following command line creates the batch file JavaExportCompile.bat, generates Java code files into the directory workdir, and uses the signatures BANK and ACCOUNT as input.

/sto /lan=Java /pth=workdir JavaExportCompile BANK ACCOUNT

Generate C Call-Out Stub Code

The /sto /lan=c command generates C call-out stub code used to activate instances of 3GL components from Uniface.

Note: C stub code, which provides intermediate layers of C code, is only required for call-out on non-Windows platforms. Windows uses dynamic C function calling.

For each signature, /sto generates the files uo_Signature.h and uo_Signature.c. You can also choose your own output base name (which replaces uo_Signature) by specifying the Output Base File Name in the Signature Editor.

/sto  {/lan=c}   {/pth=Path}   {/fun}   ApplicationShell   {SignatureList}

  • /lan=c is optional, for backwards compatibility with earlier Uniface versions.
  • Path—path where the output will be written. If not supplied, the output will be written in the current working directory.
  • /fun—use function prototypes when generating C call-out stub code.
  • ApplicationShell—name of the APS file without the .aps suffix.
  • SignatureList— optional list that specifies one or more signatures with a 3GL implementation for which stub code is generated. If the list is empty, stub code is generated for all signatures with a 3GL implementation

For more information, see Activate on Non-Windows Platforms.

Example: Generating C Call-Out Stub Code

Assuming MYAPP is the name of an application shell, and DEBIT and CREDIT are 3GL components, the following command line generates the files uo_debit.h, uo_debit.c, uo_credit.h, and uo_credit.c.

/sto myapp debit credit

Related Topics