79237597

Date: 2024-11-29 15:31:25
Score: 0.5
Natty:
Report link

Ok I answered myself after some radom testing session, soap library documentation do not mention it but if you wanna add marshallable attributes to your Typescript object you have to add an attributes key like:

return {
  Operations: {
    AbstractOperation: prismaMappedOperationArray,

    attributes: { 'xmlns:xsi': 'tns:ConcreteOperation1' },
   },
}

And this will return:

<tns:Operations>
    <tns:AbstractOperation xsi:type="tns:ConcreteOperation1">
        <tns:progressive>1</tns:progressive>
        <tns:identifier>FP301DW</tns:identifier>
    </tns:AbstractOperation>
    <tns:AbstractOperation xsi:type="tns:ConcreteOperation1">
        <tns:progressive>2</tns:progressive>
        <tns:identifier>FP301DW</tns:identifier>
    </tns:AbstractOperation>
</tns:Operations>
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: NotSoSnake