如何使用Perl的SOAP :: Lite编辑SOAP信封和标头?

时间:2010-02-17 04:53:17

标签: perl soap-client wsh wso2

我正在尝试修改soapenv:Header以在soap请求中包含寻址

my $header=SOAP::Header->name("Header")->prefix("soap")->uri("http://www.w3.org/2005/08/addressing");

当我发送请求时:

print $soap->call($header, $security->value(\$userToken, $action, $message))->result; 

我收到以下内容......

<"soap:Header soap:Header xmlns:soap="http://www.w3.org/2005/08/addressing" />

我需要尝试覆盖原始<soap:Header>我需要对<soap:Envelope>

执行相同操作

如果有人能提供帮助,我将不胜感激: - )

2 个答案:

答案 0 :(得分:1)

“call”的第一个参数是方法名称,而不是标题。

答案 1 :(得分:0)

SOAP :: Lite中有一个名为SOAP::Lite::Packager的类。看看“Heades_http”方法。我想这就是你想要的。

相关问题