Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async getClient(opts: ClientOptions): Promise {
try {
const wsdl = await this.fetchWsdl(opts)
const endpoint = getEndpoint(opts)
if (!wsdlIsFile(opts)) {
const seed = FxSt.createByWsdlUrl(endpoint)
try {
seed.get()
if (seed.expired) {
throw new Error()
}
} catch {
seed.set(wsdl)
}
}
const client = await getClientInternal(opts)
const seedClient = await this.seedifyClient(client, endpoint)
return seedClient
} catch (e) {
throw new SoapError(
`Unable to create the SOAP seed mode client: ${e.message}`,
e