叫用 Web 服務Invoke Web Services

重要

此版本的 Orchestrator 已達終止支援,建議您 升級至 Orchestrator 2019This version of Orchestrator has reached the end of support, we recommend you to upgrade to Orchestrator 2019.

「叫用 Web 服務」活動會以您指定的 XML 參數執行 web 服務。The Invoke Web Services activity runs a web service with XML parameters you specify.

設定 [叫用 Web 服務] 活動Configuring the Invoke Web Services Activity

設定 [叫用 Web 服務] 活動之前,您必須決定下列各項:Before you configure the Invoke Web Services activity, you need to determine the following:

  • Web 服務的 WSDL 檔案WSDL file of the web service

  • Web 服務方法名稱Web service method name

  • 輸入 SOAP 訊息主體格式Input SOAP message body format

  • 輸出 SOAP 訊息主體格式Output SOAP message body format

您可以使用下列資訊來設定「叫用 Web 服務」活動。Use the following information to configure the Invoke Web Services activity.

詳細資料Details

設定Settings 組態指示Configuration Instructions
WSDLWSDL 輸入 WSDL 檔案的路徑,或使用省略號 ** ( ... ) ** 按鈕以流覽檔案。Type the path of the WSDL file or use the ellipsis (...) button to browse for the file.
方法Method 輸入您在 web 服務上叫用的方法名稱,或按一下省略號按鈕 ** ( ... ) ** 並流覽至該方法。Type the name of the method that you are invoking on the web service, or click the ellipsis button (...) and browse for it. 請確定您符合方法的大小寫。Make sure that you match the casing of the method.
XML 要求裝載XML Request Payload 輸入您要傳送至 web 服務方法的參數。Type the parameters that you are sending to the web service method. 請確定格式符合 WSDL 檔案中所述的格式。Make sure that the format matches what is described in the WSDL document.
格式提示Format Hint 按一下這個按鈕,以接收格式化 XML 作業承載的提示。Click this button to receive hints on formatting the XML job payload. 以您自己的值取代預留位置值。Replace the placeholder values with your own.

進階Advanced

設定Settings 組態指示Configuration Instructions
儲存Save 若要儲存回應,請選取 [ 儲存 ] 核取方塊,並指定將儲存回應的資料夾。To save the responses, select the Save check box and specify the folder where the responses will be saved.
URLURL 若要指定 web 服務的 URL 位置,請選取 [ url ] 核取方塊,然後輸入 url 位置。To specify the URL location of the web service, select the URL check box and type the URL location.
Value 選取 web 服務使用的 SOAP 通訊協定。Select the SOAP protocol that the web service uses. 選項包括下列各項:The Value options include the following:

-SOAP 1。1- SOAP 1.1
-SOAP 1。2- SOAP 1.2

安全性Security

設定Settings 組態指示Configuration Instructions
啟用Enable 選取 [ 啟用 ] 核取方塊,以啟用 HTTP 驗證並填入欄位。Select the Enable check box to enable HTTP authentication, and fill in the fields.
使用者名稱User name 輸入使用者名稱以存取受保護的 web 服務。Type the user name to access the secured web service.
密碼Password 輸入密碼以存取受保護的 web 服務。Type the password to access the secured web service.

HTTPS 憑證選項HTTPS certificate options

協調器可讓您在憑證驗證失敗的情況下設定 HTTPS 憑證選項。Orchestrator allows you to configure HTTPS certificate options in cases where certificate validation fails.

使用下列步驟來設定 HTTPS 憑證選項。Use the following steps to configure HTTPS certificate options.

設定 HTTPS 憑證選項To configure HTTPS certificate options
  1. 在 [Runbook Designer 中,按一下 [ 選項 ] 功能表,然後選取 [叫用 web 服務 ] 以開啟 [叫用 web 服務 ] 對話方塊。In the Runbook Designer, click the Options menu, and select Invoke Web Services to open the Invoke Web Services dialog box.

  2. 設定 [ 詳細資料 ] 索引標籤上的設定。下表列出設定指示。Configure the settings on the Details tab. Configuration instructions are listed in the following table.

詳細資料Details

設定Settings 組態指示Configuration Instructions
HTTPS 選項HTTPS Options 選取下列其中一個 HTTPS 選項Select one of the following HTTPS Options:

- 接受所有憑證- Accept all certificates
- 接受來自信任主機的憑證- Accept certificates from trusted hosts

下表列出每個 HTTPS 選項 的設定指示。Configuration instructions for each of the HTTPS Options are listed in the following tables.

接受所有憑證詳細資料Accept all certificates Details

設定Settings 組態指示Configuration Instructions
接受所有憑證Accept all certificates 接受來自所有主機的憑證。Accepts certificates from all hosts.

選取此 HTTPS 選項之後,請按一下 [完成]After you select this HTTPS option, click Finish.

接受來自信任主機的憑證詳細資料Accept certificates from trusted hosts Details

設定Settings 組態指示Configuration Instructions
接受來自信任主機的憑證Accept certificates from trusted hosts 指定您想要接受憑證的主機。Specifies the hosts you want to accept the certificates from.

1. 按一下 [ 加入 ] 以開啟 [ 信任的主機 ] 對話方塊。1. Click Add to open the Trusted Host dialog box.
2. 在 [ ] 方塊中輸入受信任的主機名稱,然後按一下 [確定]2. Type the trusted host name in the Value box, and click OK. 然後將主機新增至清單中。The host is then added to the list.

若要編輯主機,請按一下 [ 編輯]。To edit hosts, click Edit.

若要移除主機,請按一下 [ 移除]。To remove hosts, click Remove.

已發佈資料Published Data

下表列出已發佈的資料項目。The following table lists the published data items.

ItemItem 描述Description
WSDL 路徑WSDL Path WSDL 路徑。The WSDL path.
方法名稱Method Name Web 方法的名稱。The name of the web method.
XML 作業承載XML Job Payload XML 作業承載的文字。The text of the XML job payload.
XML 回應裝載XML Response Payload XML 回應裝載的文字。The text of the XML response payload.
回應檔Response File 回應的路徑和檔案名。The path and filename of the response.
Web 服務 URLWeb Service URL Web 服務的 URL。The URL of the web service.
Web 服務通訊協定Web Service protocol Web 服務使用的通訊協定。The protocol that the web service uses.

發佈 web 服務Publishing web services

Invoke Web 服務物件會在 C:\ProgramData\Microsoft System center 2012 \ Orchestrator\Activities\WebServices2C:\Users\USERNAME\AppData\Local\Microsoft system center 2012 \ Orchestrator\Activities\WebServices2上建立元件。The Invoke Web Service object builds an assembly at C:\ProgramData\Microsoft System Center 2012\Orchestrator\Activities\WebServices2or C:\Users\USERNAME\AppData\Local\Microsoft System Center 2012\Orchestrator\Activities\WebServices2. 元件是由 web 服務位置所識別。The assembly is identified by the web service location. 例如: http://localhost/TestService/DylanService.asmx?WSDLFor example, http://localhost/TestService/DylanService.asmx?WSDL.

如果您發行其他服務,或更新現有的服務,則必須清除 wspkey 的快取,但不包括 .snk 檔案。If you publish additional services, or update an existing service, you must clean the cache, except for the wspkey.snk file. 清除快取之後,就會正確發佈 web 服務變更。After cleaning the cache, the web service changes are correctly published.