Skip to content

Commit

Permalink
Merge pull request #217 from testinggospels/develop
Browse files Browse the repository at this point in the history
chore: removed promise from soap
  • Loading branch information
richardruiter authored Nov 29, 2022
2 parents ae4ff18 + 49e81dc commit b02153f
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/protocols/Soap.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import path from "path";
import { readFileSync, existsSync } from "fs";
import express, {Request} from "express";
import express, { Request } from "express";
import { soap } from "express-soap";
import { WSDL } from "soap";
import http from "http";
Expand Down Expand Up @@ -40,9 +40,7 @@ export default class SoapSetup {
await new Promise((resolve, reject) => {
wsdl.onReady((err) => {
if (err) return reject(err);
wsdl.describeServices().then((services: any) => {
resolve(services);
})
resolve((wsdl as any).describeServices());
});
})
);
Expand All @@ -62,9 +60,7 @@ export default class SoapSetup {
let DELAY = 0;
const handler = `${serviceName}/${portName}/${methodName}`;
logger.debug(
`Soap Request for ${handler} handler: ${JSON.stringify(
args
)}`
`Soap Request for ${handler} handler: ${JSON.stringify(args)}`
);
const mockFilePath = path.resolve(
this.config.protocols.soap.mocks_dir,
Expand All @@ -76,8 +72,8 @@ export default class SoapSetup {
);

// add arguments to the request body
request.body = args
request.body = args;

const fileContent = await template({ request, logger });
logger.debug(
`Soap Response for ${handler} handler: ${fileContent}`
Expand Down

0 comments on commit b02153f

Please sign in to comment.