in reply to how to use class reference with SOAP::Lite

The 'id' and 'href' values are typically signs of encoding when you have more than one reference to a value. However, in your case, the id comes _after_ the href, which is backwards for how SOAP::Lite handles its serialization.

Of course, the exact values of the ids shouldn't be important, provided that the deserializer can reconstruct the message correctly. This isn't exactly the correct xml message, but it'll at least show the behavior of the serializer when there's references used multiple times:

my $ref2 = SOAP::Data->name( evenmorewierd => \SOAP::Data->name( moredata => 4 ) ); my $ref1 = SOAP::Data->name(wierd => [ \SOAP::Data->name( someotherdata => 10 ), \$ref2 ]); my @data = ( SOAP::Data->name( test1 => [ \SOAP::Data->name( data => 2 ), \$ref1 ]), \$ref1, \$ref2, ); my $soap = SOAP::Serializer->new(); print $soap->serialize( \@data );