---
schema_version: "1"
id: 832d8ca3dbd465e3430d78bc5a1a7e90c2098e6446b33b799cd344020f607475
title: SOAP ヘッダーの取得
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/apikit/latest/apikit-4-get-header-task.md
canonical_url: https://docs.mulesoft.com/jp/apikit/latest/apikit-4-get-header-task
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 190abae9554be86cca53b9008db3eb61b3010c81c190d42ce1abca2b292037bf
description: MuleSoft Documentation Site
release: 4.x
latest: true
---
# SOAP ヘッダーの取得

SoapUI では、要求ウィンドウに SOAP エンベロープヘッダーが表示されます。要求から SOAP ヘッダーを取得する手順は、次のとおりです。

![要求ウィンドウに SOAP エンベロープヘッダーが表示されています](/mulesoft/current/ja-jp/apikit/latest/_images/apikit-for-soap-53dc2.png)

1. SoapUI で、API キーの値を入力して ​`OrderTshirt`​ 要求を変更します。
    
    たとえば、​`<apiKey>`​ タグの間に ​`987654321`​ を入力します。
2. Studio で、​`OrderTshirt:\soapkit-config`​ フローの ​**Transform Message**​ を選択します。
3. DataWeave コードを編集して API キー (ヘッダープロパティ) を取得します。
    
    ```raml
    %dw 2.0
    output application/java
    ns ns0 http://mulesoft.org/tshirt-service
    ---
    {
          body : {
             ns0#OrderTshirtResponse: {
               orderId: "I got a request from "
               ++ payload.body.ns0#OrderTshirt.name
               ++ " using the following auth header "
               ++ (payload.headers["AuthenticationHeader"].ns0#AuthenticationHeader.apiKey default "")
            }
        } write "application/xml"
    }
    ```
4. 保存してプロジェクトをもう一度実行します。
5. SoapUI で、​`OrderTshirt`​ エンドポイントに要求を送信します。 + 次の応答が表示されます。
    
    ```xml
       <soap:Body>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
          <ns0:OrderTshirtResponse xmlns:ns0="http://mulesoft.org/tshirt-service">
             <orderId>I got a request from John, using the following auth header 987654321</orderId>
          </ns0:OrderTshirtResponse>
       </soap:Body>
    </soap:Envelope>
    ```

## [](#関連情報)関連情報

- [SOAP ヘッダーの設定](https://docs.mulesoft.com/jp/apikit/latest/apikit-4-set-header-task)