wwSoap::CallMethod

Low level SOAP method that is meant to wrap all the SOAP packaging and call mechanism from the client side into a single call.

This method's purpose is to make a raw SOAP call using whatever parameters were set. AddParameter should be called for all parameters before this method is called.

Note:
If you are calling a WSDL based Web Service use wwSoap::CallWsdlMethod instead. This method properly handles WSDL type parsing and namespace references, which otherwise would have to be set manually.

o.CallMethod(lcMethod, lcUrl, lvResult)

Return Value

variant - result of the method call. You should always check lError and cErrorMsg before using the result value.

Parameters

lcMethod
The method to call on the server. (Option if cMethod is set)

lcUrl
URL that handles the SOAP request on the server - (Optional if cServerUrl is set)

lvResult
Optional - pass in a variable to be set. Use this when passing in objects which can be filled from XML served by the server using wwXML's XMLToObject which needs a blueprint object to import.

Example

oSOAP = CREATEOBJECT("wwSoap")
oSOAP.cServerUrl = "http://localhost/wwsoap/soapservice.wwsoap"
oSOAP.lIncludeDataTypes = .T.

oSOAP.AddParameter("lcName","rick")

lvResult = o.CallMethod("helloworld")
? lvResult, " (Type: " + VARTYPE(lvResult) +")"

See also:

Class wwSoap

© West Wind Technologies, 1996-2024 • Updated: 07/16/19
Comment or report problem with topic