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

发布于 2024-08-22 00:35:29 字数 593 浏览 8 评论 0原文

我正在尝试修改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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

薆情海 2024-08-29 00:35:29

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

The first argument to "call" is the method name, not the header.

ま柒月 2024-08-29 00:35:29

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文