如何从 Java 中的 XML-RPC 客户端获取 python 方法的字符串结果
我写道:
Object result = (Object)client.execute("method",params);
在java客户端中。
实际上,结果应该以字符串格式打印。 但我只能输出“Object result”的地址,如何获取内容?
我尝试过 String result = (String)client.execute("method",params);
它说 lang.until.Object 无法转换为 lang.util.String。
由于服务器是用 Python 编写的,我想知道如何从该方法中检索 String。
I wrote:
Object result = (Object)client.execute("method",params);
in java client.
Actually, the result should be printed in string format. But I can only output the address of "Object result", how can I get the content?
And I have tried String result = (String)client.execute("method",params);
It says lang.until.Object can not cast to lang.util.String.
As the server is written in Python, I was wondering how can I retrieve String from the method.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我很犹豫是否要发布此内容,因为它看起来相当明显 - 如果您尝试过此操作,请原谅我,但是怎么样:
I'm hesitant to post this because it seems rather obvious - forgive me if you've tried this, but how about:
所以也许返回的对象不是字符串...您确定在 python 应用程序中返回字符串吗? 我严重怀疑这一点。
so maybe the object returned is not a string... are you sure that you're returning a string in your python application? I seriously doubt it.