> ## Documentation Index
> Fetch the complete documentation index at: https://developer.hct.com.tw/llms.txt
> Use this file to discover all available pages before exploring further.

# 1、SOAP規格

> **版本**：v1.0.0 \
>
> **狀態**：最終版  \
>
> **最後更新日期**：2026-09-15

### 文件目的

本文件定義所有 SOAP API 共用的規格，包括 SOAP Envelope、SOAP Header、XML Namespace、共用訊息格式及相關定義，作為各 API Specification 的共同依據，並確保各 API 的實作與文件一致性

### 用途與應用情境

* 適用於所有採用 SOAP 通訊協定的 API
* 若個別 API 有特殊需求，應於該 API Specification 中另外說明，並以其規格為準

### 通訊協定

| 項目 | 說明 |
| - | - |
| 通訊協定(Protocol) | SOAP Version 1.2 |
| 傳輸方式(Transport) | HTTPS |
| 請求方法(Method) | POST |
| 字元編碼(Encoding) | UTF-8 |

### SOAP Envelope 命名空間定義

* 以下命名空間(Namespace)定義適用於所有 SOAP 請求(Request)的 Envelope 層級。

| 鍵值 | 必填 | 設定值 | Envelope 層級 | 說明 |
| - | - | - | - | - |
| xsi | Y | [http://www.w3.org/2001/XMLSchema-instance](http://www.w3.org/2001/XMLSchema-instance) | `<soap12:Envelope>` | XML Schema 執行個體命名空間(XML Schema Instance Namespace) |
| xsd | Y | [http://www.w3.org/2001/XMLSchema](http://www.w3.org/2001/XMLSchema) | `<soap12:Envelope>` | XML Schema 定義命名空間(XML Schema Definition Namespace) |
| soap12 | Y | [http://www.w3.org/2003/05/soap-envelope](http://www.w3.org/2003/05/soap-envelope) | `<soap12:Envelope>` | SOAP 1.2 Envelope 命名空間(SOAP 1.2 Envelope Namespace) |

### HTTP 請求標頭

* 以下 HTTP 標頭(Header)定義適用於所有 SOAP API 請求(Request)。

| 編號 | 鍵值(Key) | 設定值(Value) | 必填 | 說明 |
| - | - | - | - | - |
| 1 | Content-Type | application/soap+xml; charset=utf-8 | Y | 指定 SOAP 1.2 訊息格式與字元編碼 |

### SOAP 請求封裝結構

| 預留位置 | 說明 |
| - | - |
| `{OperationName}` | 由各 API 定義的 SOAP 請求操作名稱 |
| `{Request Content}` | 由各 API 規格定義的 API 請求參數 |
| `{Response Content}` | 由各 API 規格定義的 API 回應資料 |

***

#### 請求範例

```xml theme={null}
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <{OperationName} xmlns="http://tempuri.org/">
		{Request Content}
    </{OperationName}>
  </soap12:Body>
</soap12:Envelope>
```

#### 回應範例

```xml theme={null}
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
        <{OperationName} xmlns="http://tempuri.org/">
            {Response Content}
        </{OperationName}>
    </soap:Body>
</soap:Envelope>
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.