Q1 What error codes can be returned by the web server?
There are numerous status responses that can be returned in the data string. To help you debug your application we have included Microsoft's list of HTTP Response Status Codes.
|
Q2 How do I transfer a text file from an IBM Mainframe that uses the EBCDIC code set?
The File Transfer function "FTPFile" treats all files as binary, so there is no problem copying the EBCDIC file to and from the workstation. If your ESL Application needs to access the file, then when opening the file with the FileIO library, use the access mode "E" or "e" to read the file, "B" or "b" to append a file, and "C" or "c" to create a new file (overwriting any existing file). When these special access modes are used, the FileIO routines translates the characters between ASCII and EBCDIC as required.
|
Q3 Can the HTTP functions receive non textual data?
Yes, the data being received is handled as binary, which although it is stored in an ESL string variable, this data type is also able to store binary without the need for encoding. The FileIO routines are able to write the content of an ESL string to a file, which can be used as needed, as demonstrated by the WEBPIC sample.
|
Q4 Does ESL have support for XML?
There is currently no direct support for building and parsing XML structures, however, the basic string handling facilities included in ESL make these processes simple to code. When building an XML structure, the "copy" and "append" verbs have the ability to concatenate a series of different data types into a simple string.
When a XML structure is returned, as used with the "Simple Object Application Protocol" (i.e. SOAP), the "extract from" statement is an ideal facility to parse the structure and object, to the individual data items. If the SOAP message has only a single field, then the HTTP functions include the option to strip the tags, which effectively leave just the required data.
The web services tutorial demonstrates all these basic techniques.
|
Q5 Is it possible to access Web Services?
Yes, with the use of the HTTPPostWithHdr function, it is comparatively simple task to build the required SOAP message needed to post to the Web Service, then parse the message that is returned. You will need a basic understanding of XML structures, and access to the Web Service Definition Language (i.e. WSDL) via a standard internet browser.
The web services tutorial provides an example of accessing a Web Service.
|
Q6 How do I ensure a secure encrypted connection is used?
With all the HTTP functions, it is possible to set the protocol to "HTTPS", which forces the functions to use the secure socket layer, which results in the messages between the workstation and the Host web server being encrypted.
|
Q7 How do I embed a binary file into an XML or SOAP message?
The "FileIO" routine FileToHexString() was developed to provide a simple method to allow the type of file content to be included in a message to be sent. For example:
call FileToHexString(FileName_SV, FileContent_SV)
append " <FIELD>\n"
" <NAME>IMAGE</NAME>\n"
" <TYPE>HEX</TYPE>\n"
" <VALUE>" FileContent_SV "</VALUE>\n"
" </FIELD>\n" to XLM_SV
To reserve the operation, for when a binary file is received in an XML message, the "FileIO" routine HexStringToFile() routine needs to be used. So, for example, to reserve the above example:
extract from XML_SV
skip by "<NAME>"
take to "</NAME>" FieldName_SV
skip by "<TYPE>"
take to "</TYPE>" FieldType_SV
skip by "<VALUE>"
take to "</VALUE>" FieldValue_SV
switch FieldName_SV is
case char "IMAGE" is
if (FieldType_SV = "HEX") then
call HexStringToFile(FileName_SV, FieldValue_SV)
end if
case char ....
default is
call DisplayError(FieldName_SV)
end switch
|
Q8 I cannot understand why the HTTP function is not working?
All the HTTP functions have the option to record the details of the conversation in the errorlog. To switch-on this facility, set the debug parameter to true and ensure an errorlog is specified in the runtime command line using the "-e" option.
|
Q9 Why can't the compiler find the "EslWeb" include file?
Currently the EslWeb library is being developed, so both the library and the include file are located under the Samples directory. To enable the ESL compiler (i.e. Eparse.exe) to locate the EslWeb include, you can either copy the file from the Samples to the Include directory or add the EslWeb sub-directory of the Samples, to the include path (i.e. INCPATH) in the ESL configuration file.
|
Q10 Why are all the EslWeb functions failing and the errorlog reports the function cannot be loaded?
Currently the EslWeb library is being developed, so both the library and the include file are located under the Samples directory. To enable the ESL runtime (i.e. EslRun.exe) to locate the EslWeb library, you can either copy the dll file from the Samples to the main ESL directory or add the EslWeb sub-directory of the Samples, to the systems PATH environment variable.
|