Files
DefinitelyTyped/soap/soap-tests.ts
2016-03-15 14:34:20 +08:00

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
});
});