use SOAP::Lite; $s = new SOAP::Server(); $x = SOAP::Data->type("string" => "344.1"); print $s->serializer->serialize([$x, 3]), "\n"; print $s->serializer->serialize({$x => 3}), "\n";