$VERSION
=
sprintf
"%d.%02d"
,
q$Revision: 1.2 $
=~ /: (\d+)\.(\d+)/;
@MOBY::SOAP::Serializer::ISA
=
'SOAP::Serializer'
;
sub
xmlize {
my
$self
=
shift
;
my
(
$name
,
$attrs
,
$values
,
$id
) = @{ +
shift
};
$attrs
||= {};
return
$self
->SUPER::xmlize( [
$name
,
$attrs
,
$values
,
$id
] );
}
sub
envelope {
UNIVERSAL::isa(
$_
[3] =>
'SOAP::Data'
)
?
do
{
$_
[3]->type(
'string'
=>
$_
[3]->value() );
}
:
do
{
do
{
$_
[3]->[0] = SOAP::Data->type(
'string'
=>
$_
[3]->[0] )
if
$_
[3]->[0];
$_
[3]->[1] = SOAP::Data->type(
'string'
=>
$_
[3]->[1] )
if
$_
[3]->[1];
$_
[3]->[2] = SOAP::Data->type(
'string'
=>
$_
[3]->[2] )
if
$_
[3]->[2];
$_
[3]->[3] = SOAP::Data->type(
'string'
=>
$_
[3]->[3] )
if
$_
[3]->[3];
$_
[3]->[4] = SOAP::Data->type(
'string'
=>
$_
[3]->[4] )
if
$_
[3]->[4];
}
if
(
ref
(
$_
[3] ) eq
'ARRAY'
);
do
{
$_
[3] = SOAP::Data->type(
'string'
=>
$_
[3] );
}
unless
(
ref
(
$_
[3] ) eq
'ARRAY'
);
}
if
$_
[1] =~ /^(?:method|response)$/;
$_
[2] = (
UNIVERSAL::isa(
$_
[2] =>
'SOAP::Data'
)
?
$_
[2]
: SOAP::Data->name(
$_
[2] )->attr( {
xmlns
=>
$uri
} )
)
if
$_
[1] =~ /^(?:method|response)$/;
shift
->SUPER::envelope(
@_
);
}
1;