node-soap 多导入模式 [英] node-soap multiple import schemas

查看:48
本文介绍了node-soap 多导入模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在尝试使用 node-soap 创建客户端时遇到问题,这个 wsdl:http://ultra-api.ultradns.com:8008/UltraDNS_WS/v01

I am having issues with trying to create a client using node-soap, and this wsdl: http://ultra-api.ultradns.com:8008/UltraDNS_WS/v01

一旦遇到这个,它就会不断抛出一个未定义的错误:

It keeps throwing an undefined error once it hits this:

<wsdl:message name="getResourceRecordsOfDNameByTypeResponse">
<wsdl:part name="ResourceRecordList" type="ns1:ResourceRecordList">
</wsdl:part>
</wsdl:message>

如果您查看 wsdl,它有 4 个模式:

If you look at the wsdl it has 4 schemas:

  • webservice.api.ultra.neustar.com/v01/
  • webservice.api.ultra.neustar.com/
  • schema.ultraservice.neustar.com/
  • jaxb.dev.java.net/array

ResourceRecordList 位于 schema.ultraservice.neustar.com 中,但出于某种原因,node-soap 一直在查看 webservice.api.ultra.neustar.com/v01/架构.

The ResourceRecordList is in the schema.ultraservice.neustar.com but for some reason node-soap keeps looking into the webservice.api.ultra.neustar.com/v01/ schema.

我已经查看了堆栈溢出和 node-soap 上的问题,但还没有想出在哪里更新代码以查找多个模式/命名空间.

I've looked through stack overflow, and the issues on node-soap, and haven't figured out where to update the code to look for multiple schemas/namespaces.

谢谢

推荐答案

解决方案:

将 lib/wsdl.js 中的第 50 行更改为

to change line 50 in lib/wsdl.js from

if(obj.hasOwnProperty(key)){

if(obj.hasOwnProperty(key)){

if(obj.hasOwnProperty(key) && !base[key]){

if(obj.hasOwnProperty(key) && !base[key]){

感谢 Christiaan W. 的回答

thanks to Christiaan W. for the answer

这篇关于node-soap 多导入模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆