SOAP Web リクエストに SOAPAction を追加しようとしています。
以下は私のコードです:
return (TPResponse) getWebServiceTemplate().marshalSendAndReceive(genTP, message -> {
((SaajSoapMessage)message).setSoapAction("http://tempuri.org/GenerateParam");
});
このコードは、HTTP リクエストに別のヘッダー フィールドを として追加する必要があると予想されSOAPAction: "http://tempuri.org/GenerateParam"
ます。しかし、以下は最終的なパケットが形成されるものです:
POST /myscripts/script.php?somedetails HTTP/1.1
Accept-Encoding: gzip
Accept: application/soap+xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Content-Type: application/soap+xml; charset=utf-8;
action="http://tempuri.org/GenerateParam"
Cache-Control: no-cache
Pragma: no-cache
User-Agent: Java/1.8.0_73
Host: 127.0.0.1
Connection: keep-alive
Content-Length: 578
別の HTTP ヘッダーを追加するのではなく、値を変更Content-Type
して追加action
したことに注意してください。何が間違っている可能性がありますか?