SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 内部服务器错误

发布于 2024-11-01 17:26:05 字数 1777 浏览 3 评论 0原文

我尝试使用 SOAP::Lite 模块连接服务器(我实现了客户端) 在我的调试过程中,我遇到了 SOAP 版本错误,解决方法是: ->肥皂版本('1.2') -> envprefix('soap12');

现在,我遇到以下错误: SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 内部服务器错误 然后还写在: 安全上下文令牌已过期或无效。消息未被处理 两者之间有什么联系吗?

我的代码是: 我的 $soap = SOAP::Lite -> uri('$uri_address') -> on_action( sub { join '/', '$uri_address', $_[1] } ) ->代理('$url_address') ->肥皂版本('1.2') -> envprefix('soap12');

- 覆盖常量

$SOAP::Constants::DEFAULT_HTTP_CONTENT_TYPE = '应用程序/soap+xml';

我的 $method = SOAP::Data->name('HelloWorld') ->attr({xmlns => '$uri_address'});

参数保存在 @params

my @params = ( SOAP::Data->name(MyData => $my_string)); 中

我的 $结果 = $soap ->call($method =>@params);

if ($结果->故障) { print "\n\n==========发生错误===========\n\n"; 打印$结果->故障字符串; } 别的 { 打印$结果->结果; 它

打印了信封,然后打印: SOAP::传输::HTTP::客户端::send_receive: HTTP::Response=HASH(0x3749874) SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 内部服务器错误 日期:2011 年 4 月 13 日星期三 23:36:26 GMT 服务器:微软-IIS/7.5 内容长度:562 内容类型:application/soap+xml;字符集=utf-8 客户日期:2011 年 4 月 13 日星期三 23:36:27 GMT 客户端对等点:10.185.78.22:80 客户端响应数量:1 X-Powered-By: ASP.NET

http://www.w3.org/2005/08/addressing/soap/faults:Sendera:BadContextToken安全上下文令牌已过期或无效。该消息未被处理。 SOAP::反序列化器::反序列化: () SOAP::解析器::解码: () SOAP::SOM::new: ()

==========发生错误==========

SOAP::SOM::DESTROY: () 肥皂::精简版::销毁: () SOAP::序列化器::销毁: () SOAP::数据::销毁: () SOAP::数据::销毁: () SOAP::数据::销毁: () SOAP::数据::销毁: () SOAP::数据::销毁: () SOAP::数据::销毁: () SOAP::传输::销毁: () SOAP::传输::HTTP::客户端::销毁: () SOAP::解串器::销毁: () SOAP::Parser::DESTROY: ()

根本原因是什么?请帮助...

提前致谢!

I tried to connect server (I implemented the client side) using SOAP::Lite module
during my debug, I encounter with error of SOAP version which solved by:
-> soapversion('1.2')
-> envprefix('soap12');

Now, I have issue that I got below error:
SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Server Error
and then is also write after:
The security context token is expired or is not valid. The message was not processed
Is there any connection between both?

My code is:
my $soap = SOAP::Lite
-> uri('$uri_address')
-> on_action( sub { join '/', '$uri_address', $_[1] } )
-> proxy('$url_address')
-> soapversion('1.2')
-> envprefix('soap12');

- Overriding the constant

$SOAP::Constants::DEFAULT_HTTP_CONTENT_TYPE
= 'application/soap+xml';

my $method = SOAP::Data->name('HelloWorld')
->attr({xmlns => '$uri_address'});

The parameters are held in @params

my @params = ( SOAP::Data->name(MyData => $my_string));

my $result = $soap
->call($method => @params);

if ($result->fault)
{
print "\n\n==========fault happened===========\n\n";
print $result->faultstring;
}
else
{
print $result->result;
}

It printed the envelope and then it prints:
SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x3749874)
SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Server Error
Date: Wed, 13 Apr 2011 23:36:26 GMT
Server: Microsoft-IIS/7.5
Content-Length: 562
Content-Type: application/soap+xml; charset=utf-8
Client-Date: Wed, 13 Apr 2011 23:36:27 GMT
Client-Peer: 10.185.78.22:80
Client-Response-Num: 1
X-Powered-By: ASP.NET

http://www.w3.org/2005/08/addressing/soap/faults:Sendera:BadContextTokenThe security context token is expired or is not valid. The message was not processed.
SOAP::Deserializer::deserialize: ()
SOAP::Parser::decode: ()
SOAP::SOM::new: ()

==========fault happened===========

SOAP::SOM::DESTROY: ()
SOAP::Lite::DESTROY: ()
SOAP::Serializer::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Transport::DESTROY: ()
SOAP::Transport::HTTP::Client::DESTROY: ()
SOAP::Deserializer::DESTROY: ()
SOAP::Parser::DESTROY: ()

What can be the root cause? pls help...

Thanks in advance!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

想你只要分分秒秒 2024-11-08 17:26:05

查看 Java 对此问题的回答,看起来服务器端的 SSL 证书可能已过期或已损坏。这通常也是“测试”设置中的一个问题。

是否可以重新生成证书或[如果可能]使用相同的证书浏览到端点,以查看是否有异常消息。

免责声明:我根本不是微软开发人员,所以这是相当试探性的。

Looking at the Java answers to this, it looks as though the SSL certificate on the server side might have expired or be corrupted. This is often a problem in a 'test' setup too.

Is it possible to regenerate the certificate or [if pssible] surf to an endpoint using the same certificate, to see whether there's exception messages.

Disclaimer: I'm not a Microsoft dev at all, so this is pretty tentative.

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