in reply to How to disable autotyping of tags in response of SOAP-server?

The same way :)

The shortcut fails $daemon->autotype(0); fails with Can't locate object method "autotype" via package "HTTP::Daemon"

but not the proper way :) $daemon->serializer->autotype(0);

  • Comment on Re: How to disable autotyping of tags in response of SOAP-server?

Replies are listed 'Best First'.
Re^2: How to disable autotyping of tags in response of SOAP-server?
by Zester (Initiate) on Dec 26, 2012 at 14:48 UTC
    I do without daemons. This is my dispatcher:
    My::CGI::Handler->dispatch_to('AnPackage')->handle; BEGIN { package My::CGI::Handler; use vars qw(@ISA); @ISA = qw(SOAP::Transport::HTTP::CGI); sub handle { my $self = shift; $self->serializer->autotype(0); and so on....................
    Thank you! Now it works! Gm...but now type exists in xml if value is empty:
    <soap:Body> <CreateRequestResponse xmlns="http://localhost/AnPackage"> <ServiceCode xsi:nil="true" /> <requestNumber>1-13</requestNumber> </CreateRequestResponse></soap:Body>
    <<<<< xsi:nil="true" >>>> How to say serializer to hide all tag <ServiceCode xsi:nil="true" /> if this empty?
      don't return undef, return the empty string
        Ura! Thank you!!!