--- title: Preview a SOAP message script description: Generate a sample script to send the SOAP message. locale: en-US canonical_url: https://www.servicenow.com/docs/r/australia/api-reference/web-services/c\_UseASOAPMessageInAScript.html release: australia product: Web Services classification: web-services topic_type: concept last_updated: "2026-03-12" reading_time_minutes: 1 breadcrumb: [Scripting outbound SOAP, SOAP, Outbound, Web services, API implementation, API implementation and reference] --- # Preview a SOAP message script Generate a sample script to send the SOAP message. After you have developed and tested the SOAP message, click the **Preview script usage** related link in the SOAP Message Function form. The dialog box displays an example of how you can invoke the SOAP message from a script. You can manipulate the resulting XML response body with [XMLDocument](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/scripts/c_XMLDocumentScriptObject.md) or with [gs.getXMLText](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/scripts/p_GlideServerAPIs.md) and [gs.getXMLNodeList](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/scripts/p_GlideServerAPIs.md). **Parent Topic:**[Scripting outbound SOAP](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/web-services/r_ScriptingOutboundSOAP.md)