/sti
Import interface definitions to integrate call-out to web services, various types of middleware, or to generate C call-in stub code for all types of components.
/sti
/mwr=
Middleware
{OptionalMiddlewareSubswitches}
ImportFile
- To import web service definitions (WSDL):
/sti
/mwr=ws
{/gen=
OptionsCode} {/mod=
ModelName} {/bare} {/dataonly} {/nosig} {/verbose} ImportFile - To import COM type libraries (TBL):
/sti
/mwr=com
ImportFile/sti
/mwr=com
/pid ProgId{:
Prefix} - To generate C call-in stub code:
/sti { /pth=Path} {SignatureList}
Switches
Parameters
- ImportFile—name of the file containing the interface definitions to be imported.
- SignatureList—list of one or more signatures, separated by spaces, for which stub-code is generated. If the list is empty, stub code is generated for all signatures.
For sub-switch options, see the specific switch.
Description
The database in which the Uniface Repository is stored must support commit and rollback instructions. Databases that do not support commit and rollback, such as a sequential access databases (Sequential), cannot be used.
Importing WSDL Definitions for Web Services
The import facility loads a WSDL file ImportFile into Uniface and converts it to a Uniface signature.
The ImportFile is typically a URL, since WSDL files are normally located on the web, but it can also be a locally-stored WSDL file. For example:
/sti /mwr=ws http://www.MySite.com/MyWebService/MyWebService.WSDL
If /mod=ModelName is specified, it overrides the default model name, which is derived from the first element of the Model property of the entity.
For more information, see Importing WSDL Definitions for Web Services.
Importing COM Interface Definitions
The import facility loads an interface definition or a type library (using the /pid subswitch) into Uniface and converts each of the remote interface or type definition to a Uniface signature. For example:
/sti /mwr=com /pid Excel.Application.8:ex
When importing signatures for COM interfaces, you may need to modify the signature after import. This is because methods may return a different type of object depending on the context in which they are used.
For example, Visual Basic has a data type called Variant. It can be a string, date, or integer when it is used in an application. When this data type is imported, Uniface maps it to the string data type. You need to find out the data type that is actually returned when this element is used, and modify the signature accordingly.
Tip: In Microsoft Office applications, you can inspect all the types and methods by pressing Alt+F11 to open the VB for Applications, and then F2.
Generating C Call-In Stub Code
You can generate call-in stub code for all types of components. Functions are generated for each operation, except those with entity parameters.
The code is generated using the generic (4GL) part of the signature, not the 3GL implementation part. A numeric parameter always maps to a long variable type, even if that parameter in the 3GL code is mapped to an integer variable type. This code allows 3GL components to activate instances of all component types.
For each signature, the files ui_Signature.h and ui_Signature.c are generated.
Generating Call-In Stub Code
The following command line generates the files ui_debit.h, ui_debit.c, ui_credit.h, and ui_credit.c:
/sti debit credit