Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • Parameters of procedure to run
  • Type of parameter
  • Call to J2EERun
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Stored procedures
Runs a procedure on a server of J2EE XML Web services.
Remark: The procedure parameters must be specified before using J2EERun via the J2EE structure (see the Notes).
// This example is based on the presence of Text2Image Webservice
// on the dwdemos.alphaworks.ibm.com site.
// If the module was no longer available on the site,
// the example would not operate anymore
// Parameters to pass to the service
// Width of the image
J2EE.Value[1] = EDT_WIDTH
J2EE.Name[1] = "ImageWidth"
J2EE.Type[1] = J2EEIntType
// Interrogate the Webservice on the Web server
IF J2EERun(...
"http://dwdemos.alphaworks.ibm.com:8085/soap/servlet/rpcrouter", ...
"createImage", "urn:text2image", ...
"http://alphaworks.ibm.com/alphabeans/text2image/createImage/") THEN
// The result is an image, it will be changed into a temporary file
nFileID is int
nFileID = fOpen(fExeDir() + "\temp.gif", foCreate)
fWrite(nFileID, J2EEGetResult(J2EEResult))
// Display
IMG_GEN = ""
IMG_GEN = fExeDir() + "\temp.gif"
// Delete the temporary file
// If the service returns no error (ex: Server not accessible)
IF J2EEError(J2EEErrMessage) ~= "" THEN
// If the service returned an error (service error)
Error("J2EE error: " + J2EEError(J2EEErrMessage))
<Result> = J2EERun(<Server URL> , <Procedure name> [, <Procedure Namespace> [, <Procedure action> [, <Encoding style>]]])
<Result>: Boolean
  • True if the communication was established with the server,
  • False otherwise (no communication was established). To find out the name of the error, use the function ErrorInfo with the constant errMessage.
<Server URL>: Character string (with quotes)
URL of server to contact. This parameter is supplied in the documentation of server of J2EE XML Web services.
<Procedure name>: Character string (with quotes)
Name of the procedure that will be run on the specified server. This parameter is supplied in the documentation of server of J2EE XML Web services.
Make sure to respect the case (lowercase/uppercase characters) in the name of the procedure.
<Procedure Namespace>: Optional character string (with quotes)
Namespace of procedure to run. This parameter is supplied in the documentation of server of J2EE XML Web services.
<Procedure action>: Optional character string (with quotes)
Action of procedure (also called "J2EEAction"). This parameter is supplied in the documentation of server of J2EE XML Web services.
<Encoding style>: Optional character string (with quotes)
Encoding style of procedure (also called "EncodingStyle"). This parameter is supplied in the documentation of server of J2EE XML Web services.

Parameters of procedure to run

To pass parameters to a procedure run on a server of J2EE XML Web services, the following structure is used by WINDEV:
J2EE.NameSpaceOptional character string"NameSpace" of parameter.
J2EE.NameCharacter stringName of parameter.
J2EE.XMLParamOptional character stringFull description of parameter in XML format. The other parameters (Value, Name, Type, NameSpace and EncodingStyle) are ignored if this parameter is specified.
J2EE.EncodingStyleOptional character stringEncoding style of parameter.
J2EE.TypeConstantType of parameter
J2EE.ValueAny typeValue of parameter.

This structure must be used for each parameter. For example:
J2EE.Value[1] = 94010
J2EE.Name[1] = "ZipCode"
J2EE.Type[1] = J2EEStringType
This structure is equivalent to:
J2EE.XMLParam[1] = <ZipCode xsi:type="xsd:string">94010</ZipCode>

Type of parameter

The type of parameter can be:
J2EEHexBinaryTypeHexadecimal binary
J2EEStringTypeCharacter string
J2EENormalizedStringTypeCharacter string without carriage return (CR) and without tabulation (TAB)
J2EEDecimalTypeAny number without limit
J2EEIntTypeInteger included between - 2 147 483 648 and + 2 147 483 647)
J2EEShortTypeShort integer
J2EEUnsignedShortTypeUnsigned short integer
J2EEIntegerTypeInteger (no limit)
J2EELongTypeLong integer
J2EEUnsignedLongTypeLong unsigned integer
J2EENegativeIntegerTypeNegative integer (except 0)
J2EENonNegativeIntegerTypeNon-negative integer
J2EENonPositiveIntegerTypeNon-positive integer
J2EEUnsignedIntTypeUnsigned integer
J2EEPositiveIntegerTypePositive integer (except 0)
J2EEUnsignedByteTypeUnsigned byte
J2EEDoubleTypeDouble real
J2EEAnyURITypeURL address

Call to J2EERun

After the call to J2EERun:
  • The procedure parameters are erased.
  • The structure of header specified by J2EEAddHeader is erased.
  • J2EEGetResult returns the result of the procedure run.
  • J2EEError returns the error message of the procedure run.
Component : wd260com.dll
Minimum version required
  • Version 9
This page is also available for…
Click [Add] to post a comment