---
sourceDocument: 호주 API 참조
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/ko-KR/api-reference

 Release :

    - australia

ft:locale :

    - ko-KR

ft:publication_title :

    - 호주 API 참조

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# 응답 사용자 지정

# 응답 사용자 지정 {#ariaid-title1}

* 릴리스 버전: Australia
* 
* 업데이트 날짜 2026년 03월 12일
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 소요 시간: 2분

다음 예시에 따라 SOAP 응답의 XML 페이로드를 사용자 지정하고 제어합니다.

## 시작하기 전에

필요한 역할: web_service_admin 또는 admin

## 프로시저

1. [XMLDocument](https://servicenow-prod.fluidtopics.net/Zt0c2FQRQlaMRG3hqyT2oA "XML 문서(문자열)에서 XML 데이터를 구문 분석하고 추출하기 위한 JavaScript 객체 래퍼입니다.") 스크립트 포함 객체를 사용하여 사용자 지정 XML 문서를 만듭니다.  
   주:  
   범위가 지정된 애플리케이션에서 스크립트된 웹 서비스를 만들 때는 [XMLDocument2](https://servicenow-prod.fluidtopics.net/87uFltOv4Ut2KvtpZW6zSQ#c_XMLDocument2ScopedAPI "XMLDocument2 API는 XML 문자열에서 XML 데이터를 구문 분석하고 추출하기 위한 JavaScript 객체 래퍼입니다.") API를 사용해야 합니다.
2. 스크립팅된 웹 서비스에서 문서 요소를 변수 <var class="keyword varname">response.soapResponseElement</var> 로 설정합니다.  
   예를 들면 다음과 같은 스크립트된 웹 서비스 스크립트가 있습니다.

       var xmldoc = new XMLDocument2();
           xmldoc.parseXML("<myResponse></myResponse>");
           xmldoc.createElementWithTextValue("element_one", "test");  
           xmldoc.createElementWithTextValue("element_two", "new2 value");  

           var el = xmldoc.createElement("element_three");
           xmldoc.setCurrentElement(el);  
           xmldoc.createElementWithTextValue("newChild", "test child element");

           response.soapResponseElement = xmldoc.getDocumentElement();

   다음 요청을 수락하는 데 사용됩니다.

       <soapenv:Envelope 
          xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
          xmlns:tes="http://www.service-now.com/TestCustomResponse">
          <soapenv:Header/>
          <soapenv:Body>
             <tes:execute/>
          </soapenv:Body>
       </soapenv:Envelope>

   다음 SOAP 응답으로 응답합니다.

       <soapenv:Envelope 
           xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
           xmlns:tes="http://www.service-now.com/TestCustomResponse">
          <soapenv:Header/>
          <soapenv:Body>
             <myResponse>
                <element_one>test</element_one>
                <element_two>new2 value</element_two>
                <element_three>
                   <newChild>test child element</newChild>
                </element_three>
             </myResponse>
          </soapenv:Body>
       </soapenv:Envelope>

   WSDL 지원을 외부에서 생성해야 합니다. SOAP 엔드포인트는 해당 스크립트된 웹 서비스로 다시 참조해야 합니다.

