I need to remove the node from SOAP API response Magento 2. Below is an example. From:
<env:Body>
<ns1:customTestAuthV1CallbackResponse>
<result>
<resultCode>1</resultCode>
<resultMessage>response message</resultMessage>
</result>
</ns1:customTestAuthV1CallbackResponse>
</env:Body>
To
<env:Body>
<ns1:customTestAuthV1CallbackResponse>
<resultCode>1</resultCode>
<resultMessage>response message</resultMessage>
</ns1:customTestAuthV1CallbackResponse>
</env:Body>
I have created a module to remove the node from response but it is throwing an error as seen below
<env:Fault>
<env:Code>
<env:Value>env:Receiver</env:Value>
</env:Code>
<env:Reason>
<env:Text>SOAP-ERROR: Encoding: object has no 'result' property</env:Text>
</env:Reason>
</env:Fault>
Does anyone have any idea how can we remove the node?