3 ways to disable auto typing in SOAP::Lite client

Often SOAP::Lite will try to autotype a parameter in a request and it does it wrongly (or correctly) causing the SOAP server to fail badly (for so many reasons).

SOAP::Lite provides three ways to disable this typing. Two of the ways work at the client object level and the other does it at the SOAP::Data object level.

Client Level

The following options disable autotyping for all data items in a request:
  • autotype method. After creating a SOAP::Lite client you can disable autotyping by $soapclient->autotype(0).
    my $soap = SOAP::Lite->uri($xmlns)->proxy($proxy)
    ->on_action( sub {"$action?type=$reqname&ns=$xmlns"} );
  • Overriding the typelookup method. You can override the typelookup to run undef/false/etc.
    sub typelookup { return undef; }

Data object

SOAP::Data object provide a type method. This allows manually typing of the object. When this is set to an empty string no type is set nor is it autotyped by serializer. Note: undef doesn't work you must use empty string.

Here is an example:
my $range = SOAP::Data->name(
'DateRange' => \SOAP::Data->value(
SOAP::Data->name( 'StartDate' => $start )->type(''),
SOAP::Data->name( 'EndDate' => $end )->type('')
Someone else suggested creating SOAP::Data object directly from XML in this cause type is set to whatever value is included in the XML document.

Thanks the SOAP::Lite mailing list for the some of the ideas.


  1. He served because the North Dakota University System chancellor from 2004 by way of 2006. Though the pardons are expected to impression practically 6,600 people, data from the United States Sentencing Commission indicates only 21 North Dakotans are eligible to receive a pardon. Cass County Sheriff Jesse Jahner personally met with the enterprise owner to 정카지노 clear up the situation. Research, treatment, and prevention of downside playing ought to be encouraged. Gambling turns into a problem when the particular person can no longer stop doing it, and when it causes a adverse impression on any space of the individual’s life.


Post a Comment

Popular posts from this blog

Template Toolkit Debugging inside of Perl Dancer

Changing Dancer::Plugin::Ajax's content type

BootstrapX clickover