wsdl2ruby SOAP::FaultError 详细属性中的解组异常
我使用 wsdl2ruby 生成 Web 服务的客户端。 当服务方法引发 WSDL 中定义的异常之一时,我想访问异常对象的属性。 据我所知,异常对象已被编组到 SOAP::Mapping::Object 中,该对象由可用于 RESCUE 块的 SOAP::FaultError 对象的详细信息属性引用。
虽然 SOAP::Mapping::Object 响应 marshal_load 方法,但该方法采用一个参数 dumpobj,这让我觉得我应该提供该对象作为方法的参数,而不是使用该对象作为方法的接收者。
任何人都可以向我指出解组异常对象的正确方法的示例吗?
I've used wsdl2ruby to generate a client for a web service. When a service method raises one of the exceptions defined in the WSDL I'd like to access the exception object's attributes. From what I can tell the exception object has been marshalled into a SOAP::Mapping::Object that's referenced by the detail attribute of the SOAP::FaultError object that's made available to the RESCUE block.
Although SOAP::Mapping::Object responds to a marshal_load method, that method takes one parameter, dumpobj, which makes me think I'm supposed to provide that object as the method's parameter rather than use the object as the method's receiver.
Can anyone point me to an example of the proper way to unmarshal the exception object?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您探究 SOAP::Mapping::Object ...,看起来解组已经完成
looks like the unmarshalling is already done, if you probe into the SOAP::Mapping::Object ...