ngx-soap icon indicating copy to clipboard operation
ngx-soap copied to clipboard

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

Open nishankkumar1994 opened this issue 5 years ago • 1 comments

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 <soapenv:Body> <urn:getBeanList soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <VMBox xsi:type="urn:VMBox" xmlns:urn="urn:ProvisionServiceBean_VoiceMail" /> </urn:getBeanList> </soapenv:Body>

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 avatar Oct 09 '19 16:10 nishankkumar1994

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";

nishankkumar1994 avatar Oct 09 '19 18:10 nishankkumar1994