Alex Danilov
Alex Danilov

Reputation: 29

Create parent element in SOAPBody response using SOAPHandler

I am using SOAPHandler and I need to modify my SOAPMessage in SOAPNHandler:

The message i get:

<soapenv:Envelope xmlns:soapenv="...">
<soapenv:Header/>
<soapenv:Body>
    <CC>
        <Dat>210520</Dat>
        <Tim>1156</Tim>
        <MesI>20210000000830</MesI>
        <MesT>CC616A</MesT>
        <HEA>
            <Dec>202105201156</Dec>
        </HEA>
    </CC>
</soapenv:Body>
</soapenv:Envelope>

I need to add a parent element AA to the body, and get this result:

<soapenv:Envelope xmlns:soapenv="...">
<soapenv:Header/>
<soapenv:Body>
    <AA>
        <CC>
            <Dat>210520</Dat>
            <Tim>1156</Tim>
            <MesI>20210000000830</MesI>
            <MesT>CC616A</MesT>
            <HEA>
                <Dec>202105201156</Dec>
            </HEA>
        </CC>
    </AA>
</soapenv:Body>
</soapenv:Envelope>

And i can´t figure it out. I hope someone can help me.

Thank you.

Upvotes: 0

Views: 208

Answers (0)

Related Questions