热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

通过一个空白XSD::QName使用soap4r。-PassingablankXSD::QNameusingsoap4r

IhaveoverriddentheSimpleHandlertopassausernameandpasswordusingsoap4r.theproblemistha

I have overridden the SimpleHandler to pass a username and password using soap4r. the problem is that I am forced to give a QName, and this is causing the result to fail because it's not in the right format.

我已经重写了SimpleHandler以使用soap4r传递用户名和密码。问题是,我被迫给出一个QName,这导致结果失败,因为它不是正确的格式。

What soap4r is adding is something like this (the "ns1" things are dummy values):

soap4r添加的是这样的东西(“ns1”的东西是虚拟值):


  
    someuser
    topsecret
   
 

What it needs to be is this:

它需要的是:


  someuser
  topsecret

How can I NOT pass in a containing name?

我怎么能不传递一个包含的名字呢?

2 个解决方案

#1


0  

Looks like you need to make some changes to soap4r: http://dev.ctor.org/soap4r/browser/branches/1_5/lib/soap/header/handler.rb

看起来您需要对soap4r进行一些更改:http://dev.ctor.org/soap4r/browser/branches/1_5/lib/soap/header/handler.rb。

If the service isn't all that complicated you could try Handsoap http://wiki.github.com/unwire/handsoap/authentication#WS-Security

如果服务不那么复杂,您可以尝试使用Handsoap http://wiki.github.com/unwire/handsoap/authentication#WS-Security。

#2


0  

Soap4R is quite picky about overriding headers. In your situation, you'll need to add two "flat" handlers (one for Username, and another for Password) instead of a single one with both.

Soap4R对于覆盖头非常挑剔。在您的情况下,您需要添加两个“扁平”处理程序(一个用于用户名,另一个用于密码),而不是同时添加两个。


推荐阅读
author-avatar
jinglongyy70
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有