Garoon API の Cookie 使用について

現在Perlを使用し、Garoon APIを使用しています。
Cookieを用いた認証方式を使用しようとしているのですが、使い方がよくわかりません。

下記のようにヘッダーを記入していますが、Cookieの指定方法はどのようにすれば良いのでしょうか?
よろしくお願いいたします。

<Action xmlns="http://schemas.xmlsoap.org/ws/2003/03/addressing">ReportGetReportById</Action>
<Cookie>JSESSIONID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx;path=</Cookie>
<Security xmlns:wsu=“http://schemas.xmlsoap.org/ws/2002/07/utility
SOAP-ENV:mustUnderstand=“1”
xmlns=“http://schemas.xmlsoap.org/ws/2002/12/secext”>
<UsernameToken wsu:Id=“id”>
<Username></Username>
<Password></Password>
</UsernameToken>
</Security>
<Timestamp xmlns=“http://schemas.xmlsoap.org/ws/2002/07/utility”>
<Created>2037-08-12T14:45:00Z</Created>
<Expires>2037-08-12T14:45:00Z</Expires>
</Timestamp>
<Locale>jp</Locale>

Cookieは、SOAPのヘッダではなく、
HTTPのヘッダに加える必要があります。

https://cybozudev.zendesk.com/hc/ja/articles/202228464#step2
の「例:Garoon on Cybozu.comで、「UtilGetREquestToken」を実行した場合の例」をご参考ください。

PerlのSOAP::LiteでCookieを使用する場合、
proxyを実行するときのオプションとして
Cookieを追加すればよいようです。
ref. http://guide.soaplite.com/#item_Cookie%2Dbased_authentication

https://cybozudev.zendesk.com/hc/communities/public/questions/201719214#answer-202157434
のコードの後ろに、以下のコードを付けて実行したところ、
Cookieでの認証でAPIが実行できることを確認しました。

なお、この方法だと、
SOAP::Liteがデバッグ用に出力しているHTTPのリクエストでは
Cookieヘッダがついていないように見えるのですが、
実際にはヘッダがついた状態でリクエストが飛んでいます。

また、SOAPのレスポンスのXMLの属性値を取得する方法には
少し癖があるようですので、ご注意ください。

... (前略) ...

# UtilLoginのレスポンスからCookieの値を取得する
$result->body->{'LoginResponse'}{'returns'}{'cookie'} =~ /JSESSIONID=([^;+]+)/;
my $session_id = $1;

# 認証用Cookieを作成
use HTTP::Cookies; # http://perldoc.jp/docs/modules/libwww-perl-5.813/HTTP/Cookies.pod
my $session_cookie = HTTP::Cookies->new();
$session_cookie->set_cookie(0, "JSESSIONID", $session_id, "/", "xxxxx.cybozu.com", 443);

# 接続情報:各APIの情報はWSDLファイルに書かれている
$proxy = 'https://xxxxx.cybozu.com/g/cbpapi/report/api.csp';

# リクエスト内容
$action = 'ReportGetReportById';
my $report_id = 8;

# クライアント作成時にCookieも追加する
$service->transport->proxy($proxy, cookie_jar => $session_cookie);

# ヘッダーを生成
$header_xml = <<"EOS";
<Action xmlns="http://schemas.xmlsoap.org/ws/2003/03/addressing">$action</Action>
<Timestamp xmlns="http://schemas.xmlsoap.org/ws/2002/07/utility">
  <Created>2037-08-12T14:45:00Z</Created>
  <Expires>2037-08-12T14:45:00Z</Expires>
</Timestamp>
EOS
$header = SOAP::Header->type('xml' => $header_xml);

# リクエスト内容を生成
$parameters_xml = <<"EOS";
<parameters>
  <report_id xmlns="">$report_id</report_id>
</parameters>
EOS
$parameters = SOAP::Data->type('xml' => $parameters_xml);

# 実行
$result = $service->call($action, $parameters, $header);

# 実行結果を確認
if ($result->fault){
  print "Failed..";
}else{
  print "Success!";
}
warn Dumper $result->body;

# レスポンスのマルチレポートのデータから、作成者の名前を取得してみる
# ref. 属性から値を取得する方法: http://www.soaplite.com/2003/05/how_to_access_a.html
print $result->dataof('//creator')->attr->{'name'}, "";

Kawamukai Naoki様、

丁寧な回答ありがとうございます。
無事Cookieでの認証ができました。