如果我有一个字符串形式的wsdl,如何使用npm soap包在Node.js中创建一个soap客户端?
const soap = require('soap')
const wsdl = '<definitions> ... </definitions>'
const client = await soap.createClientAsync(wsdl) // Wrong: soap thinks that wsdl is a filename
P.S.将wsdl字符串保存到文件中不是一个选项
1条答案
按热度按时间vshtjzan1#
我发现您必须添加一个XML头(
<?xml version="1.0" encoding="UTF-8"?>
)。