ngx-soap
ngx-soap copied to clipboard
How we can add attributes like xsi:type and xmlns:urn
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.
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";