PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Parameters of procedure to run
  • Parameter Type
  • Call to SOAPRun
  • Managing errors
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Runs a procedure on a SOAP server.
Notes:
  • The procedure parameters must be specified before using SOAPRun via the SOAP structure (see the Notes).
  • This function does not support the non-Latin languages.
Versions 22 and later
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
New in version 22
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
// Define the parameters of the "Temperature" procedure that
// returns the temperature of a city identified by its zip code
SOAP.Value[1] = 94010
SOAP.Name[1] = "ZipCode"
SOAP.Type[1] = SOAPStringType
// Run the "Temperature" procedure on a non-WINDEV server
ResExecute = SOAPRun("http://www.Temp.com/Degree", "Temperature", "urn:Temp-Degree")
Syntax

Running a procedure on a WINDEV 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 find out the error details, use ErrorInfo associated with the errMessage constant.
<URL of SOAP Server>: Character string (with quotes)
URL of SOAP server to contact. This parameter is supplied in the documentation of SOAP server.
For a SOAP server created by WINDEV, the "/.soap" string must be added after the URL. For example:
"http://192.168.1.138/.soap".
<Procedure Name>: Character string (with quotes)
Name of procedure that will be run on the specified SOAP server. This parameter is supplied in the documentation of SOAP server.
<Procedure Namespace>: Character string (with quotes)
Namespace of procedure to run. This parameter is supplied in the documentation of SOAP server.
This parameter is mandatory if you are using a WINDEV SOAP server. The name of the library (WDL) is specified via the namespace ("<Name of Server application>" becomes on the server "c:\soapmodules\<Name of Server application>.wdl ").
Note: The urn: keyword is not required in this parameter.
<Procedure Action>: Optional character string (with quotes)
Action of procedure (also called "SOAPAction"). This parameter is supplied in the documentation of SOAP server.
<Encoding Style>: Optional character string (with quotes)
Encoding style of procedure (also called "EncodingStyle"). This parameter is supplied in the documentation of SOAP server.

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 find out the error details, use ErrorInfo associated with the errMessage constant.
<URL of SOAP Server>: Character string (with quotes)
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 (with quotes)
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 (with quotes)
Action of procedure (also called "SOAPAction"). This parameter is supplied in the documentation of SOAP server.
<Encoding Style>: Optional character string (with quotes)
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 run on a SOAP server, WINDEV is using the following structure:
VariableTypeDetails
SOAP.NameSpaceOptional character string"NameSpace" of parameter.
SOAP.NameCharacter stringName of parameter
SOAP.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.
SOAP.EncodingStyleOptional character stringEncoding style of parameter.
SOAP.TypeConstantParameter Type
SOAP.ValueAny typeValue of parameter
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>

Parameter Type

The type of parameter can be:
ConstantType
SOAPBase64BinaryTypeBinary
SOAPHexBinaryTypeHexadecimal binary
SOAPBooleanTypeBoolean
SOAPStringTypeCharacter string
SOAPNormalizedStringTypeCharacter string without carriage return (CR) and without tabulation (TAB)
SOAPDecimalTypeAny number without limit
SOAPIntTypeInteger included between - 2 147 483 648 and + 2 147 483 647)
SOAPShortTypeShort integer
SOAPUnsignedShortTypeUnsigned short integer
SOAPIntegerTypeInteger (no limit)
SOAPLongTypeLong integer
SOAPUnsignedLongTypeLong unsigned integer
SOAPNegativeIntegerTypeNegative integer (except 0)
SOAPNonNegativeIntegerTypeNon-negative integer
SOAPNonPositiveIntegerTypeNon-positive integer
SOAPUnsignedIntTypeUnsigned integer
SOAPPositiveIntegerTypePositive integer (except 0)
SOAPByteTypeByte
SOAPUnsignedByteTypeUnsigned byte
SOAPFloatTypeReal
SOAPDoubleTypeDouble real
SOAPAnyURITypeURL address

Call to SOAPRun

After the call to SOAPRun:
  • The procedure parameters are erased.
  • The structure of header specified by SOAPAddHeader is erased.
  • SOAPGetResult returns the result of the procedure run.
  • SOAPError returns the error message of the procedure run.

Managing errors

SOAPRun returns False if no communication was established with the SOAP server. To find out the error details, use ErrorInfo associated 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.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230com.dll
Windows Mobile wp230com.dll
Linux wd230com.so
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment