- Executing the procedure (syntax 4, kept for backward compatibility)
SOAPAddHeader (Function) In french: SOAPAjouteEntête Adds a header to the next SOAP function of a Webservice to run. The added header can contain additional parameters affecting the SOAP request. In most cases, the information added into the headers does not directly represent the parameters of the Webservice function but meta information such as the authentication information for example.
// Add a header to the next SOAP procedure run // This header is used to check the security level used by the SOAP server // If the maximum security level is not used, // the next SOAP procedure will not be run SOAPAddHeader("Security", "MaxSecurity", "Security-Level", True)
Syntax
Customizing the header of the Webservice Hide the details
SOAPAddHeader(<Webservice name> , <Element to add into header>)
<Webservice name>: Webservice Name of webservice to use. The Webservice name is displayed in the "Project explorer" pane, in the "Webservices" folder. <Element to add into header>: Simple or complex type Variable of the same type as the header to insert into the call to the Webservice method. The different types have been retrieved when importing the WSDL file. This element is added into the header whenever a SOAP function of the Webservice is called.
Adding a header for a specific Webservice Hide the details
SOAPAddHeader(<Webservice name> , <Parameter name> , <Parameter value> , <Parameter namespace>)
<Webservice name>: Webservice Name of webservice to use. The Webservice name is displayed in the "Project explorer" pane, in the "Webservices" folder. <Parameter name>: Character string Name of additional parameter. This additional parameter is used to check an information specific to the SOAP server. This parameter is supplied in the documentation of the SOAP server and its functions. <Parameter value>: Any type Value of additional parameter. The possible values are supplied in the documentation of the SOAP server and its functions. <Parameter namespace>: Character string Namespace of parameter. This parameter is supplied in the documentation of the SOAP server and its functions. Remarks Executing the procedure (syntax 4, kept for backward compatibility) You have the ability to run (or not) the next SOAP procedure by adding a header. To do so, <Procedure execution> must be initialized to True. If <Procedure execution> is initialized to True: - SOAPRun (or SOAPRunXML) returns True if the connection with the SOAP server was established, False otherwise.
- If the connection with the SOAP server was established and if the SOAP server fulfills the conditions requested by the header, the procedure is run.
- If the procedure was run, SOAPGetResult returns:
- the result of the procedure if the procedure was successfully run,
- an empty string ("") if the procedure failed.
- If the procedure failed or if it was not run, SOAPError returns:
- the "MustUnderstand" error code if the SOAP server does not fulfills the conditions requested by the header,
- an error in the other cases.
Business / UI classification: Business Logic
This page is also available for…
|
|
|
|