Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

Generating run-time XML Response with namespaces

I am trying to generate XML response run-time which have multiple array nodes with namespaces. Need your help with Java/JavaScript/Groovy code to do the same - so that XML can generate with namespaces iterated by count of 1. Below is the Sample XML response - I want to generate.

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
    <v11:currentResponse xmlns:v11="http://www.sample.com/sample/schema/external/message/current/v1">
        <v12:transactionId xmlns:v12="http://www.sample.com/sample/schema/ps/platform/details/v1">
            <v12:requestId xmlns:v12="http://www.sample.com/sample/schema/ps/platform/details/v1">STAY123</v11:requestId>
            <v12:requestId xmlns:v12="http://www.sample.com/sample/schema/ps/platform/details/v1">STAY123</v11:requestId>
        </v12:transactionId xmlns:v12="http://www.sample.com/sample/schema/ps/platform/details/v1">
        <v13:account xmlns:v13="http://www.sample.com/sample/schema/ps/platform/details/v1">ST7777</v14:account>
        <v14:accountType xmlns:v14="http://www.sample.com/sample/schema/ps/platform/details/v1">ST</v14:account>
    </v11:currentResponse>
    <v11:currentResponse xmlns:v11="http://www.sample.com/sample/schema/external/message/current/v1">
        <v15:transactionId xmlns:v15="http://www.sample.com/sample/schema/ps/platform/details/v1">
            <v15:requestId xmlns:v15="http://www.sample.com/sample/schema/ps/platform/details/v1">STAY123</v11:requestId>
            <v15:requestId xmlns:v15="http://www.sample.com/sample/schema/ps/platform/details/v1">STAY123</v11:requestId>
        </v15:transactionId xmlns:v12="http://www.sample.com/sample/schema/ps/platform/details/v1">
        <v16:account xmlns:v16="http://www.sample.com/sample/schema/ps/platform/details/v1">ST7777</v14:account>
        <v17:accountType xmlns:v16="http://www.sample.com/sample/schema/ps/platform/details/v1">ST</v14:account>
    </v11:currentResponse xmlns:v11="http://www.sample.com/sample/schema/external/message/current/v1">
</soapenv:Body>

Comments