|
|
|
|
|
- Parameters of procedure to run
- Type of parameter
- Call to SOAPRun
- Handling errors
SOAPRun (Function) In french: SOAPExécute
Warning
From version 2024, this function is kept for backward compatibility.
Runs a procedure on a SOAP server. Remarks: - The procedure parameters must be specified before using SOAPRun via the SOAP structure (see the Notes).
- This function does not support non-Latin languages.
- This function is meant for advanced users, to handle special cases. In most cases, we recommend importing the wsdl file of the SOAP web service. For more details, see Importing/Consuming web services.
SOAP.Value[1] = 94010
SOAP.Name[1] = "ZipCode"
SOAP.Type[1] = SOAPStringType
ResExecute = SOAPRun("http://www.Temp.com/Degree", "Temperature", "urn:Temp-Degree")
Syntax
Running a procedure on an ordinary SOAP server Hide the details
<Result> = SOAPRun(<URL of SOAP server> , <Procedure name> [, <Procedure Namespace> [, <Procedure action> [, <Encoding style>]]])
<Result>: Boolean - True if the communication was established with the SOAP server,
- False otherwise. To get more details on the error, use ErrorInfo.
<URL of SOAP server>: Character string URL of SOAP server to contact. This parameter is supplied in the documentation of SOAP server. To submit a request with authentication, this parameter must correspond to:
http://user:password@ServerURL The port can also be specified in the following syntax: http://user:password@ServerURL:port <Procedure name>: Character string Name of procedure that will be run on the specified SOAP server. This parameter is supplied in the documentation of SOAP server. <Procedure Namespace>: Optional character string (mandatory for a WINDEV SOAP server) Namespace of procedure to run. This parameter is supplied in the documentation of SOAP server. <Procedure action>: Optional character string Action of procedure (also called "SOAPAction"). This parameter is supplied in the documentation of SOAP server. <Encoding style>: Optional character string Encoding style of procedure (also called "EncodingStyle"). This parameter is supplied in the documentation of SOAP server. Remarks Parameters of procedure to run To pass parameters to a procedure executed on a SOAP server, WINDEV uses the following structure: | | | Variable | Type | Details |
---|
SOAP.NameSpace | Optional character string | "NameSpace" of parameter. | SOAP.Name | Character string | Parameter name | SOAP.XMLParam | Optional character string | Full parameter description in XML format. The other parameters (Value, Name, Type, NameSpace and EncodingStyle) are ignored if this parameter is specified. | SOAP.EncodingStyle | Optional character string | Encoding style of parameter. | SOAP.Type | Constant | Type of parameter | SOAP.Value | Any type | Parameter value |
This structure must be used for each parameter. For example: SOAP.Value[1] = 94010
SOAP.Name[1] = "ZipCode"
SOAP.Type[1] = SOAPStringType
This structure is equivalent to: SOAP.XMLParam[1] = <ZipCode xsi:type="xsd:string">94010</ZipCode>
The type of parameter can be: | | Constant | Type |
---|
SOAPBase64BinaryType | Binary | SOAPHexBinaryType | Hexadecimal binary | SOAPBooleanType | Boolean | SOAPStringType | Character string | SOAPNormalizedStringType | Character string without carriage return (CR) and without tabulation (TAB) | SOAPDecimalType | Any number without limit | SOAPIntType | Integer included between - 2 147 483 648 and + 2 147 483 647) | SOAPShortType | Short integer | SOAPUnsignedShortType | Unsigned short integer | SOAPIntegerType | Integer (no limit) | SOAPLongType | Long integer | SOAPUnsignedLongType | Long unsigned integer | SOAPNegativeIntegerType | Negative integer (except 0) | SOAPNonNegativeIntegerType | Non-negative integer | SOAPNonPositiveIntegerType | Non-positive integer | SOAPUnsignedIntType | Unsigned integer | SOAPPositiveIntegerType | Positive integer (except 0) | SOAPByteType | Byte | SOAPUnsignedByteType | Unsigned byte | SOAPFloatType | Real | SOAPDoubleType | Double real | SOAPAnyURIType | URL address |
After the call to SOAPRun: - The procedure parameters are deleted.
- The structure of the header specified with SOAPAddHeader is deleted.
- SOAPGetResult returns the result of the procedure run.
- SOAPError returns the error message of the procedure run.
SOAPRun returns False if no communication was established with the SOAP server. To get more details on the error, use ErrorInfo with the errMessage constant. Caution: SOAPRun can return False with a correct result if this one contains the ":fault" text. Special case: "405 Method not allowed" error This error means that the "/.soap" string is missing at the end of the URL of the SOAP server powered by WINDEV. This error can also occur if the Web server is not configured to use the WINDEV SOAP server. Business / UI classification: Business Logic
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|