I'm trying to marshal a Soap xml response but cannot get nested tags (<ParameterValueStruct>
) going, if i call the struct twice the last one overwrites the first one.
Any help is mostly appreciated.
Here is the sample code https://play.golang.org/p/fwb4FI0hDG9
Here is a sample xml im trying to mimic:
<soapenv:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:cwmp="urn:dslforum-org:cwmp-1-0" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<cwmp:ID soapenv:mustUnderstand="1">null0</cwmp:ID>
</soapenv:Header>
<soapenv:Body>
<cwmp:SetParameterValues>
<ParameterList soap:arrayType="cwmp:ParameterValueStruct[4]">
<ParameterValueStruct>
<Name>InternetGatewayDevice.ManagementServer.PeriodicInformEnable</Name>
<Value xsi:type="xsd:boolean">1</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>InternetGatewayDevice.ManagementServer.ConnectionRequestUsername</Name>
<Value xsi:type="xsd:string">00147F-SpeedTouch780-CP0611JTLNW</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>InternetGatewayDevice.ManagementServer.ConnectionRequestPassword</Name>
<Value xsi:type="xsd:string">98ff55fb377bf724c625f60dec448646</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>InternetGatewayDevice.ManagementServer.PeriodicInformInterval</Name>
<Value xsi:type="xsd:unsignedInt">60</Value>
</ParameterValueStruct>
</ParameterList>
<ParameterKey>null</ParameterKey>
</cwmp:SetParameterValues>
</soapenv:Body>