AddMethod method: SOAPDoc class
Syntax
AddMethod(MethodName, IsRequest)
Description
Use the AddMethod method to set the name of the method element being processed. Additional attributes for the added method can be set using the AddAttribute and InsertAttribute method. Executing AddMethod automatically adds any missing Envelope and Body sections.
Note:
Only one method can be set within one PeopleSoft SOAP XML document.
The SOAPDoc method can be used only after the envelope and body sections have been added.
Set the parameters for the method using the AddParm method.
Parameters
| Parameter | Description |
|---|---|
|
MethodName |
Specify the name of the method element being added. |
|
IsRequest |
Specify if the message is a request message. This parameter takes a numeric value:
|
Returns
None.
Example
The following sample program:
&MyDoc.AddMethod("GetPrice", 0);
Creates the following XML:
<GetPrice>
</GetPriceResponse>
The following sample program:
&MyDoc.AddMethod("GetPrice", 1);
Creates the following XML:
<GetPrice>
</GetPrice>