Hi monks,

I'm hoping someone familiar with this module can help me out, as searching the web has failed.

I'm trying to create a new campaign with the Yahoo::Marketing module as detailed here:
http://search.cpan.org/~shenj/Yahoo-Marketing-4.30/lib/Yahoo/Marketing.pm#Example_1_-_creating_a_campaign
but it fails with this error:

SOAP FAULT!
String: XML document invalid.
Code: E1037
Message: XML document invalid.

- I'm sure my credentials and permissions are right, since I can use Yahoo's test file yahoo_ews_client.pl just fine.
- I'm using a start date in the future, as required, and an end date for a year later.

I can't tell what's causing the XML to be invalid though. Dumping the stream from SOAP::Lite I can see that it is actually a well-formed XML document, so I don't know what the deal is. Anyone encountered this before and have a solution?

The actual XML for your perusal:
<?xml version="1.0" encoding="UTF-8"?> <soap:Envelope xmlns:namesp1="http://namespaces.soaplite.com/perl" soa +p:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soa +p="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://s +chemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/ +XMLSchema-instance" xmlns:ysm="http://marketing.ews.yahooapis.com/V4" + xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <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">xxxxxxxxxxx</wsse +:Username> <wsse:Password xsi:type="xsd:string">xxxxxxxxxxx</wsse +:Password> </wsse:UsernameToken> </wsse:Security> <license xmlns="http://marketing.ews.yahooapis.com/V4" xsi:typ +e="xsd:string">x11111111111111x</license> <masterAccountID xmlns="http://marketing.ews.yahooapis.com/V4" + xsi:type="xsd:string">1111111</masterAccountID> <accountID xmlns="http://marketing.ews.yahooapis.com/V4" xsi:t +ype="xsd:string">11111111111</accountID> </soap:Header> <soap:Body> <addCampaign xmlns="http://marketing.ews.yahooapis.com/V4"> <campaign xsi:type="tns:Campaign"> <accountID xsi:type="xsd:string">11111111111</accountI +D> <endDate xsi:type="xsd:dateTime"> <local_rd_secs xsi:type="xsd:int">0</local_rd_secs +> <local_rd_days xsi:type="xsd:int">733705</local_rd +_days> <rd_nanosecs xsi:type="xsd:int">0</rd_nanosecs> <locale href="#ref-74529744" xsi:type="namesp1:Dat +eTime__Locale__en_US"/> <local_c> <hour xsi:type="xsd:int">0</hour> <second xsi:type="xsd:int">0</second> <month xsi:type="xsd:int">10</month> <quarter xsi:type="xsd:int">4</quarter> <day_of_year xsi:type="xsd:int">298</day_of_ye +ar> <day_of_quarter xsi:type="xsd:int">25</day_of_ +quarter> <minute xsi:type="xsd:int">0</minute> <day xsi:type="xsd:int">25</day> <day_of_week xsi:type="xsd:int">7</day_of_week +> <year xsi:type="xsd:int">2009</year> </local_c> <utc_rd_secs xsi:type="xsd:int">21600</utc_rd_secs +> <formatter xsi:type="namesp1:DateTime__Format__W3C +DTF"/> <tz xsi:type="namesp1:DateTime__TimeZone__OffsetOn +ly"> <name xsi:type="xsd:int">-0600</name> <offset xsi:type="xsd:int">-21600</offset> </tz> <utc_year xsi:type="xsd:int">2010</utc_year> <utc_rd_days xsi:type="xsd:int">733705</utc_rd_day +s> <offset_modifier xsi:type="xsd:int">0</offset_modi +fier> </endDate> <name xsi:type="xsd:string">test campaign</name> <startDate xsi:type="xsd:dateTime"> <local_rd_secs xsi:type="xsd:int">0</local_rd_secs +> <local_rd_days xsi:type="xsd:int">733340</local_rd +_days> <rd_nanosecs xsi:type="xsd:int">0</rd_nanosecs> <locale href="#ref-74529744" xsi:type="namesp1:Dat +eTime__Locale__en_US"/> <local_c> <hour xsi:type="xsd:int">0</hour> <second xsi:type="xsd:int">0</second> <month xsi:type="xsd:int">10</month> <quarter xsi:type="xsd:int">4</quarter> <day_of_year xsi:type="xsd:int">299</day_of_ye +ar> <day_of_quarter xsi:type="xsd:int">25</day_of_ +quarter> <minute xsi:type="xsd:int">0</minute> <day xsi:type="xsd:int">25</day> <day_of_week xsi:type="xsd:int">6</day_of_week +> <year xsi:type="xsd:int">2008</year> </local_c> <utc_rd_secs xsi:type="xsd:int">21600</utc_rd_secs +> <formatter xsi:type="namesp1:DateTime__Format__W3C +DTF"/> <tz xsi:type="namesp1:DateTime__TimeZone__OffsetOn +ly"> <name xsi:type="xsd:int">-0600</name> <offset xsi:type="xsd:int">-21600</offset> </tz> <utc_year xsi:type="xsd:int">2009</utc_year> <utc_rd_days xsi:type="xsd:int">733340</utc_rd_day +s> <offset_modifier xsi:type="xsd:int">0</offset_modi +fier> </startDate> <status xsi:type="tns:CampaignStatus">On</status> </campaign> </addCampaign> <DateTime__Locale__en_US xsi:type="namesp1:DateTime__Locale__e +n_US" id="ref-74529744"> <default_time_format_length xsi:type="xsd:string">medium</ +default_time_format_length> <native_territory xsi:type="xsd:string">United States</nat +ive_territory> <native_language xsi:type="xsd:string">English</native_lan +guage> <native_complete_name xsi:type="xsd:string">English United + States</native_complete_name> <en_language xsi:type="xsd:string">English</en_language> <id xsi:type="xsd:string">en_US</id> <default_date_format_length xsi:type="xsd:string">medium</ +default_date_format_length> <en_complete_name xsi:type="xsd:string">English United Sta +tes</en_complete_name> <en_territory xsi:type="xsd:string">United States</en_terr +itory> </DateTime__Locale__en_US> </soap:Body> </soap:Envelope>

In reply to Problem with Yahoo::Marketing module by Grafumbly

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.