如何使用 Perl 的 SOAP::Lite 编辑 SOAP 信封和标头?
我正在尝试修改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" />
我需要尝试覆盖原始的
我需要对
做同样的事情,
如果有人可以帮忙,我将不胜感激:-)
I'm trying to modify the soapenv:Header to include addressing in my soap request
my $header=SOAP::Header->name("Header")->prefix("soap")->uri("http://www.w3.org/2005/08/addressing");
When I send the request:
print $soap->call($header, $security->value(\$userToken, $action, $message))->result;
I receive the following...
<"soap:Header soap:Header xmlns:soap="http://www.w3.org/2005/08/addressing" />
I need to try and override the original <soap:Header>
I need to do the same for the <soap:Envelope>
Would be greatly appreciated if someone could help out :-)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
“call”的第一个参数是方法名称,而不是标头。
The first argument to "call" is the method name, not the header.
SOAP::Lite 中有一个名为 SOAP::Lite::Packager。查看“Heads_http”方法。我想这就是你想要的。
There is a class in SOAP::Lite called SOAP::Lite::Packager. Look at the "Heades_http" Method. I think that is what you want.