node-soap multiple import schemas

痞子三分冷 提交于 2019-12-11 08:24:55

问题


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>

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

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.

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.

Thanks


回答1:


The solution:

to change line 50 in lib/wsdl.js from

if(obj.hasOwnProperty(key)){

to

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

thanks to Christiaan W. for the answer



来源:https://stackoverflow.com/questions/20792452/node-soap-multiple-import-schemas

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!