wwSoap::CreateSoapResponseXML

Creates a SOAP Response XML package from the method name and value

o.CreateSoapResponseXML(lcMethod, lvValue, lcResultName)

Return Value

XML String to SOAP Response package

Parameters

lcMethod
The method that was called. Optional if you called ParseSoapParameters which picks up the method name from the SOAP envelope. The client may be case sensitive so make sure the case is correct.

lvValue
Optional - The value of the result. This is the value returned to the client. If not passed the values in aReturnValues are used. You can set them with AddReturnValue() or by manipulating the array manually.

lcResultName
Optional - name of the result varaible. Default: result

Remarks

Note that this method signature assumes you're returning a single result value. If you want to return more than one value you should use the AddReturnValue() method to add the main return parameter and any ByRef parameters and then call this method with only a single parameter:

oSOAP.AddParameter("return",10)
oSOAP.AddParameter("invoicetotal",100,"float")  && type override
oSOAP.AddParameter("name","Rick Strahl")

oSOAP.CreateSoapResponseXML("MethodName")

Example

*** Create SOAP response with single parameter
oSoap = CREATE("wwSOAP")
lcXML = oSoap.CreateSoapResponse("Method",10,"returnvalue")


*** Return multiple results *** (1 return and 1 by ref here) oSoap.AddReturnValue("return",10) oSoap.AddReturnValue("name","rick") *** Or the raw way: DIMENSION oSoap.aRetValues[2,3] oSoap.aReturnValues[1,1]="return" oSoap.aReturnValues[1,2]=10 oSoap.aReturnValues[1,3]="integer" oSoap.aReturnValues[2,1]="name" oSoap.aReturnValues[2,2]="rick" oSoap.aReturnValues[2,3]="string" lcXML = oSoap.CreateSoapResponseXML("Method")

See also:

Class wwSoap

© West Wind Technologies, 1996-2024 • Updated: 09/15/00
Comment or report problem with topic