Skip to content

Commit

Permalink
allow soap.createClient to create a new SOAP client from a WSDL string (
Browse files Browse the repository at this point in the history
  • Loading branch information
ckuijjer authored and sandrozbinden-axa committed Oct 6, 2022
1 parent af5bd71 commit e1e7482
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/wsdl/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1399,7 +1399,12 @@ export function open_wsdl(uri: any, p2: WSDLCallback | IOptions, p3?: WSDLCallba
const request_options = options.wsdl_options;

let wsdl: WSDL;
if (!/^https?:/i.test(uri)) {
if (/^\<\?xml[^>]*?>/i.test(uri)) {
wsdl = new WSDL(uri, uri, options);
WSDL_CACHE[uri] = wsdl;
wsdl.WSDL_CACHE = WSDL_CACHE;
wsdl.onReady(callback);
} else if (!/^https?:/i.test(uri)) {
debug('Reading file: %s', uri);
fs.readFile(uri, 'utf8', (err, definition) => {
if (err) {
Expand Down

0 comments on commit e1e7482

Please sign in to comment.