Skip Menu |

This queue is for tickets about the Yahoo-Marketing CPAN distribution.

Report information
The Basics
Id: 20520
Status: resolved
Priority: 0/
Queue: Yahoo-Marketing

People
Owner: JLAVALLEE [...] cpan.org
Requestors: mike [...] axl.net
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 0.01
Fixed in: 0.02



Subject: Values for Simple Types are Not Properly Encoded
Due to the way that the Service module sets up the SOAP::SOM object SOAP::Lite's normal autotyping behaviour is subverted and the values of simple types are not encoded. The below code demonstates this behaviour. my $testWord = [ Yahoo::Marketing::Keyword->new( ) ->text( "Test Term" ) ->url( "http://www.yahoo.com/?param1=test&param2=breakme" ) ]; $keyword_proxy->addKeywords( keywords => $testWord ); Produces: <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ysm="http://marketing.ews.yahooapis.com/V1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/04/secext"><wsse:UsernameToken soapenc:arrayType="xsd:string[2]" xsi:type="soapenc:Array"><wsse:Username xsi:type="xsd:string">ydidit5test</wsse:Username><wsse:Password xsi:type="xsd:string">ydid110091</wsse:Password></wsse:UsernameToken></wsse:Security><license xmlns="http://marketing.ews.yahooapis.com/V1" xsi:type="xsd:string">51095ab3-12ef-4fa1-3a09-a508e7b0fb0f</license><masterAccountID xmlns="http://marketing.ews.yahooapis.com/V1" xsi:type="xsd:string">30092347</masterAccountID><accountID xmlns="http://marketing.ews.yahooapis.com/V1" xsi:type="xsd:string">30092348</accountID></soap:Header><soap:Body><addKeywords xmlns="http://marketing.ews.yahooapis.com/V1"><keywords xsi:type="tns:ArrayOfKeyword"><Keyword><text xsi:type="xsd:string">Test Term</text><url xsi:type="xsd:string">http://www.yahoo.com/?param1=test&param2=breakme</url></Keyword></keywords></addKeywords></soap:Body></soap:Envelope> The relevant section to fix is in Service.pm:553 }elsif( my $type = $self->_simple_types( $name ) ){ return SOAP::Data->type( $type ) ->name( $name ) ->value( $value ) ; }
From: mike [...] axl.net
Here is the relevant code for the patch: }elsif( my $type = $self->_simple_types( $name ) ){ return SOAP::Data->type( $type ) ->name( $name ) ->value( SOAP::Utils::encode_data( $value ) ) ; }