mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
24 lines
724 B
TypeScript
24 lines
724 B
TypeScript
/// <reference path="soap.d.ts" />
|
|
|
|
import * as soap from 'soap';
|
|
import * as events from 'events';
|
|
|
|
const url = 'http://example.com/wsdl?wsdl';
|
|
const wsdlOptions = { name: 'value' };
|
|
|
|
soap.createClient(url, wsdlOptions, function(err: any, client: soap.Client) {
|
|
let securityOptions = { 'hasTimeStamp': false };
|
|
client.setSecurity(new soap.WSSecurity('user', 'password', securityOptions));
|
|
client.addSoapHeader({});
|
|
client['create']({ name: 'value' }, function(err, result) {
|
|
// result is an object
|
|
});
|
|
client['create']({ name: 'value' }, function(err, result) {
|
|
// result is an object
|
|
}, {});
|
|
client.on('request', function(obj: any) {
|
|
//obj is an object
|
|
});
|
|
});
|
|
|