mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
update soap definition
This commit is contained in:
parent
81ebfb3d08
commit
40f2dd30cf
@ -1,6 +1,7 @@
|
||||
/// <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' };
|
||||
@ -15,5 +16,8 @@ soap.createClient(url, wsdlOptions, function(err: any, client: soap.Client) {
|
||||
client['create']({ name: 'value' }, function(err, result) {
|
||||
// result is an object
|
||||
}, {});
|
||||
client.on('request', function(obj: any) {
|
||||
//obj is an object
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
6
soap/soap.d.ts
vendored
6
soap/soap.d.ts
vendored
@ -3,11 +3,15 @@
|
||||
// Definitions by: Nicole Wang <https://github.com/nicoleWjie>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference path='../node/node.d.ts' />
|
||||
|
||||
declare module 'soap' {
|
||||
import * as events from 'events';
|
||||
|
||||
class WSSecurity {
|
||||
constructor(username: string, password: string, options: any);
|
||||
}
|
||||
interface Client {
|
||||
interface Client extends events.EventEmitter {
|
||||
setSecurity(s: WSSecurity): void;
|
||||
[method: string]: (args: any, fn: (err: any, result: any) => void, options?: any) => void;
|
||||
addSoapHeader(headJSON: any): void;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user