- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我刚刚开始使用 Node 学习 SOAP 客户端。在可用的软件包中,我决定使用 easy-soap npm 软件包 here在 Nodejs 中进行 SOAP 调用。
第一次尝试以错误告终。我在这里做错了什么?如何从这里继续前进。有人可以阐明这一点吗?
(function() {
"use strict";
var easysoap = require('easysoap');
// ##define soap params
var params = {
host : '190.100.00.00',
path : '/webservices/angular2/',
wsdl : '/webservices/angular2/php-server.wsdl',
// set soap headers (optional)
headers: [{
'name' : 'item_name',
'value' : 'item_value',
'namespace': 'item_namespace'
}]
}
// ##create the client
var soapClient = easysoap.createClient(params);
// ##get all available functions
soapClient.getAllFunctions()
.then((functionArray) => { console.log(functionArray); })
.catch((err) => { console.error(err); });
}
**ERROR:**
TypeError: Cannot read property 'indexOf' of undefined
at doGetRequest.then (/home/user/test/node_modules/wsdlrdr/src/index.js:326:41)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
最佳答案
而不是 .catch((err) => { throw new Error(err); });
,
do .catch(err => console.error(err); )
可以检查堆栈跟踪并查看错误来自哪一行。
如果是库问题,请在其 Github Repo 上提交新问题.
另请删除 Typescript 标签。
关于javascript - 类型错误 : Cannot read property 'indexOf' of undefined in Nodejs,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48688837/
我想检索字符串列表中的行号(从文件加载)。Indexof 似乎完全匹配。有没有办法检索带有通配符版本的 Indexof 的行?类似于 SL.Indexof('?sometext')? 谢谢! 最佳答案
我已经解析了一些 JSON,但我想获取从 JSON 获得的链接,在链接中找到一个使其不同的标识符(例如 www.foo.com/IDENTIFIER/home),并拥有该标识符作为一个字符串插入到另一
我正在浏览 jQuery 的源代码并碰到这个: return indexOf.call( array, elem ); - Line 683 我想知道这背后的逻辑是什么,为什么不这样做: return
我正在从一个带有空格后的非组合变音符号的字符串中创建一个子字符串。这样做时,我使用 .Contains() 检查字符串。然后执行子串。当我使用空格时 char内部 .IndexOf() ,程序按预期执
我正在使用 Jayway JsonPath 库版本 2.4.0。在 jsonPath 中使用 indexOf 函数,例如。 $.values[?(@.num.indexOf('101') != -1)
由于某种原因,GWT 模拟(客户端)jdk 方法 indexOf() 无法按预期工作。 示例:. 我有一个包含 3 个 NaN 对象的列表: List doubleList = new ArrayLi
Resharper 推荐我使用: int notesFirstSpaceIndex = notes.IndexOf(" ", StringComparison.Ordinal); 代替: int no
我想 String.indexOf(char)比String.indexOf(String)使用单个字符和单个字符串时(例如,'x' & "x") 为了确保我的猜测,我编写了如下简单的测试代码。 pu
我在 IE 8 中的数组顶部使用了 indexOf 方法,但它给出了错误(因为不支持它)。我选择使用 underscore.js 库。我用了_.indexOf(array, value, [isSor
这个问题已经有答案了: No overload for method, takes 0 arguments? (1 个回答) 已关闭 7 年前。 我似乎无法弄清楚为什么我总是收到此错误。 No ove
在 Firefox 和 Opera 上使用 Javascript 调用 indexOf 时出错。在 IE 中工作正常。 错误信息如下: 行动 function anonymous(Grid, Row,
在第一次渲染Use Effect时遇到一个特定的错误,我不确定如何解决。我认为这与该功能的异步性有关,但不确定。项目是一个Reactjs,Firebase,FiRestore Todo应用程序,根据用
在第一次渲染Use Effect时遇到一个特定的错误,我不确定如何解决。我认为这与该功能的异步性有关,但不确定。项目是一个Reactjs,Firebase,FiRestore Todo应用程序,根据用
我需要创建一个对字符串进行排序的函数。字符串中的每个单词都将包含一个数字。数字可以是 1 到 9(不能是 0)。 例如输入:“is2 Thi1s T4est 3a”,函数应返回“Thi1s is2 3
有没有一种方法可以在 Java 中使用 indexOf 在单个解析中查找给定文本中多个字符串的位置? 例如,我想在一次文本解析中为“你”和“ session ”做一个 indexOf“你今天能参加 s
我正在使用以下代码来搜索字符串中的值。 if (myValue.indexOf("Call") > -1) { //dosomething } 我该怎么做和或? (myValue.indexOf("
很难说出这里要问什么。这个问题模棱两可、含糊不清、不完整、过于宽泛或夸夸其谈,无法以目前的形式得到合理的回答。如需帮助澄清此问题以便重新打开,visit the help center . 关闭 1
This question already has an answer here: Reference - What does this regex mean? (1 个回答) 1年前关闭。 我必须在
我把它写进了一个 REPL: case class Thingy(s: String) val things = List(Thingy("x"), Thingy("y")) things.index
在带有此查询的 JMESPath 中: people[].{"index":@.index,"name":name, "state":state.name} 在此示例数据上: { "people"
我是一名优秀的程序员,十分优秀!