lula / ngx-soap

Simple SOAP client for Angular
MIT License
66 stars 61 forks source link

How we can add attributes like xsi:type and xmlns:urn #64

Open nishankkumar1994 opened 4 years ago

nishankkumar1994 commented 4 years ago

Hi @lula, I am using this where VMBox is class having some attributes... const vmBoxQuery = new VMBox(); await (provisionClient as any).getBeanList({VMBox: vmBoxQuery}).subscribe(res => console.log('res------', res), err => console.log('err----', err));

Above generates request payload like <soap:Body><impl:getBeanList><VMBox></VMBox></impl:getBeanList></soap:Body>

But i need something like `

` is it possible to add `xsi:type="urn:VMBox" xmlns:urn="urn:ProvisionServiceBean_VoiceMail"` to our VMBox class as an attributes so it can work for us. Thanks in advance.
nishankkumar1994 commented 4 years ago

I found a way to resolve it. We can add attributes like below..

       const vmBoxQuery = new VMBox();
       vmBoxQuery["attributes"] = {};
       vmBoxQuery["attributes"]["xmlns:urn"] = "urn:ProvisionServiceBean_VoiceMail";
       vmBoxQuery["attributes"]["xsi:type"] = "urn:VMBox";