Perl 中的 XMLRPC::Lite 的错误文件描述符
我调用了一个用 Java 实现的 XMLRPC,我已经验证它运行时没有异常并写入输出。 Perl 中的调用是这样的:
my $result = XMLRPC::Lite
-> proxy($url)
-> call("someMethod",
SOAP::Data->type(string => $par1),
SOAP::Data->type(string => $par2),
# etc...
)
-> result;
但是当我检查 $result 时发现它没有定义,我得到了 Bad file detector 错误。 可能会发生什么?它之前一直有效,我想不出有什么重要的改变......
I have a call to an XMLRPC implemented in Java which I have verified that runs without exceptions and writes the output. The call in Perl goes like this:
my $result = XMLRPC::Lite
-> proxy($url)
-> call("someMethod",
SOAP::Data->type(string => $par1),
SOAP::Data->type(string => $par2),
# etc...
)
-> result;
But then I check for $result and it is not defined, I get Bad file descriptor error.
What could be happening? It was working before, I can't think of anything significant that may have changed...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我找到了,虽然我不太明白为什么会发生。
XMLRPC 应用程序执行此操作:
我正在记录发送到输出的结果,因此我应该在 Perl 脚本的 $result 变量中获取它。结果是通过 Jdom 库生成的 XML。
当我收到错误时,记录的是一个 XML,其中包含一条错误消息,指示 Jdom 存在问题(基本上,该应用程序没有完全重新编译为该版本的库)。
现在它可以工作了,预期的 XML 被记录并成功分配给 Perl 中的 $result。
然而,由于在这两种情况下字节数组都是 XML,所以我不太明白它对调用者有何影响。它甚至没有寻找给定的 XML 结构,调用导致了错误。
对此的任何见解将不胜感激。不过问题已经解决了。
OK, I found it, although I don't quite understand why it happened.
The XMLRPC app does this:
I'm logging the result that is sent to the output and therefore I should be getting it in the Perl script's $result variable. The result is XML generated via the Jdom library.
While I got the error, what got logged was an XML cointaining an error message indicating a problem with Jdom (basically, the app wasn't fully recompiled to that version of the library).
Now that it works, the expected XML is logged and successfully assigned to $result in Perl.
However, since the byte array is an XML in both cases I don't quite understand how it makes any difference to the caller. It wasn't even looking for a given XML sctructure, the call resulted in an error.
Any insight on this will be appreciated. However the problem is solved.