To access a remote Web Service, you first must get the WSDL information from the service provider. Sample services can be found through UDDI registries (http://www.uddi.org), or on other sites such as XMethods (http://www.xmethods.net).
For information on using fglwsdl to generate your client and server stub and handlers, see Client stub and handlers and Server stub and handlers.
The fglwsdl tool, provided as part of the Genero Web Services (GWS), allows you to get the WSDL description of any Web Service that will be accessed by a GWS Client application, or to use a WSDL description when you are creating a corresponding GWS Server application. It also allows you to generate 4GL data types from XML schemas (also known as XSD).
Syntax:
fglwsdl [-command] <filename | url | regex value>
where:
Command Line Options:
Command | Description |
-V | Display version information |
-h | Display this help |
-l | List services from a WSDL or variables from a XSD |
-c [options] | Generate client stub (default) to be used in a GWS Client application |
-s [options] | Generate server stub to be used in a GWS Server application |
-x [options] | Generate data types from a XML schema (XSD) |
The options for the generation of the client or server stub are listed below in the specific WSDL options and in the Common options. These options can also be used without -c, if you are generating a client stub (the default).
The options for the generation of data types are listed below in the specific XSD options and in the Common options. The -x option cannot be used with -c or -s.
There is also an extra command to validate a regular expression against a value as described in the specific Extra command.
Extra command | Description |
-regex | Validate the value against the regex regular expression described in XML Schema specification |
WSDL Options | Description |
-o file | Specify a Base name for the output files. |
-n service port | Generate only for the given service name and portType. |
-b binding | Generate only for the given binding. |
-prefix name | Add name as the prefix of the generated web service functions, variables and types. (name can contain %s for servicename, %p for portname and %f for filename) |
-compatibility | Generate a Genero 1.xx compatibility client stub. |
-fRPC | Force RPC convention; use RPC Convention to generate the code, regardless of what the WSDL information contains. |
-disk | Save WSDL and all dependencies from an URL on the disk.
Note: To generate code at the same time, you must use the option -c, -s, or both. Otherwise, no code is generated. |
-domHandler | Generates the use of DOM in the client stub and calls to callback handlers. |
-alias | Generates FGLPROFILE Logical names in place of URLs for the client stub. |
-soap11 | Generates only client and server stubs supporting SOAP 1.1 protocol. |
-soap12 | Generates only client and server stubs supporting SOAP 1.2 protocol. |
-ignoreFaults | Do not generate extra code to handle soap faults. |
-wsa <yes|no> | Force support of WS-Addressing 1.0 if yes, disable support of WS-Addressing 1.0 if no, otherwise support WS-Addressing 1.0 according to the WSDL definition. |
XSD Options | Description |
-o file | Name of the output file. If file has no extension, .inc is added. |
-n name [ns] | Generate only for the given variable name and namespace (if there is one). |
-prefix name | Add name as the prefix of the generated data types. |
-disk | Save XSD and all dependencies from an URL on the disk.
Note: No code is generated. |
Common Options | Description |
-comment | Add XML comments to the generation. |
-fArray | Force XML array generation instead of XML list when possible. If the WSDL contains an XML definition of a 4GL list, generate a 4GL array matching the same definition. |
-fInheritance | Force generation of XML choice records for all inheritance types found in the schemas, otherwise only for abstract types and elements. |
-noFacets | Don't generate facet constraints restricting the value-space of simple datatype. |
-legacyTypes | Don't generate BIGINT, TINYINT and BOOLEAN data types. |
-ignoreMixed | Ignore attribute mixed="true" in XML schemas when generating code. |
-ext schema | Add an external schema. See option '-extDir' below. |
-extDir directory | Add all external schema files ending with .xsd in the directory. Note : External schemas for dependencies won't be included in the WSDL description or in the XSD schema if their location attributes are missing. Use this option to add a missing external schema for a WSDL or XSD dependency. |
-noValidation | Disable XML schema validation warnings. |
-autoNsPrefix nb | Automatic prefix generation for variables and types using a substring of the namespace
by removing the nb first elements (-1 means only the last element). For example: if a variable belongs to the namespace http://www.mycompany.com/Global/Service, a value of -1 will give Service as a prefix, and a value of 1 will give Global_Service as a prefix. |
-nsPrefix ns value | Add value as prefix of the generated variables and types belonging to namespace ns (supersede the -prefix and the -autoNsPrefix option, and can be called several times). |
Network Options | Description |
-noHTTP | Disable HTTP - search for the WSDL description or the XML schema and its dependencies on the client instead of the internet. Useful, for example, if a company has restricted access to the internet. |
-proxy location | Connect via proxy where location is host[:port] or ip[:port]. |
-pAuth login pass | Proxy authentication login and password. |
-hAuth login pass | HTTP authentication login and password. |
-cert cert | File of the X509 PEM-encoded certificate for HTTPS purpose. |
-key key | File of the PEM-encoded private key for HTTPS purpose. |
-wCert cert | Certificate name in the Windows keystore for HTTPS purpose (Windows only). |
-CA list | A filename with the list of concatenated X509 PEM-encoded certificate authorities. (On Windows, if not set, the Certificate Authority list of the key store is used). |