Loading ...
Sorry, an error occurred while loading the content.

Perl SDK Yahoo::Marketing and BasicReportRequest problems

Expand Messages
  • timcadell
    When I ve used the addReportRequestForAccountID, I had problems getting the reportType recognized. I think the library is setting the namespace incorrectly,
    Message 1 of 10 , Mar 13, 2007
    • 0 Attachment
      When I've used the addReportRequestForAccountID, I had problems
      getting the reportType recognized. I think the library is setting the
      namespace incorrectly, but I'm not sure. I got around this problem by
      grabbing an XML example and hand coding it, calling the https web
      service, and processing the response manually. But I got it working.

      Now, unfortunately, I've got to the point where I'm requesting the
      report's URL to see if it's ready, and I'm getting another complaint
      saying "Invalid parameter value for file output type". I've tried
      setting it to 'TSV' and to 'XML'. Neither works. I'm using this code
      to generate the fileFormat portion of the request:

      my $fileFormat = new
      Yahoo::Marketing::FileOutputFormat()->fileOutputType('XML')->zipped('true');

      Has anyone here used the perl libraries to get reports? All of the
      other sections that I've used for grabbing Campaigns, AdGroups,
      Keywords and Ads have all worked.

      Tim Cadell
    • Yahoo! Search Marketing Monkey
      Hi, I am not 100% sure on this, but please try chaining the call to new() as a method, like this: my $fileFormat =
      Message 2 of 10 , Mar 14, 2007
      • 0 Attachment
        Hi,

        I am not 100% sure on this, but please try chaining the call to new() as
        a method, like this:

        my $fileFormat =
        Yahoo::Marketing::FileOutputFormat->new()->fileOutputType('XML')->zipped('true');

        See if that works for you.

        -Y!SM Monkey

        timcadell wrote:
        > When I've used the addReportRequestForAccountID, I had problems
        > getting the reportType recognized. I think the library is setting the
        > namespace incorrectly, but I'm not sure. I got around this problem by
        > grabbing an XML example and hand coding it, calling the https web
        > service, and processing the response manually. But I got it working.
        >
        > Now, unfortunately, I've got to the point where I'm requesting the
        > report's URL to see if it's ready, and I'm getting another complaint
        > saying "Invalid parameter value for file output type". I've tried
        > setting it to 'TSV' and to 'XML'. Neither works. I'm using this code
        > to generate the fileFormat portion of the request:
        >
        > my $fileFormat = new
        > Yahoo::Marketing::FileOutputFormat()->fileOutputType('XML')->zipped('true');
        >
        >
        > Has anyone here used the perl libraries to get reports? All of the
        > other sections that I've used for grabbing Campaigns, AdGroups,
        > Keywords and Ads have all worked.
        >
        > Tim Cadell
        >
        >
        >
        >
        >
        >
        > Yahoo! Groups Links
        >
        >
        >
        >
      • Tim Cadell
        I ll try it. Thanks. Tim ... -- Tim Cadell A good friend will come and bail you out of jail... but, a true friend will be sitting next to you saying,
        Message 3 of 10 , Mar 14, 2007
        • 0 Attachment
          I'll try it. Thanks.

          Tim

          On 3/14/07, Yahoo! Search Marketing Monkey <plummerm@...> wrote:

          Hi,

          I am not 100% sure on this, but please try chaining the call to new() as
          a method, like this:

          my $fileFormat =
          Yahoo::Marketing::FileOutputFormat->new()->fileOutputType('XML')->zipped('true');

          See if that works for you.

          -Y!SM Monkey

          timcadell wrote:
          > When I've used the addReportRequestForAccountID, I had problems
          > getting the reportType recognized. I think the library is setting the
          > namespace incorrectly, but I'm not sure. I got around this problem by
          > grabbing an XML example and hand coding it, calling the https web
          > service, and processing the response manually. But I got it working.
          >
          > Now, unfortunately, I've got to the point where I'm requesting the
          > report's URL to see if it's ready, and I'm getting another complaint
          > saying "Invalid parameter value for file output type". I've tried
          > setting it to 'TSV' and to 'XML'. Neither works. I'm using this code
          > to generate the fileFormat portion of the request:
          >
          > my $fileFormat = new
          > Yahoo::Marketing::FileOutputFormat()->fileOutputType('XML')->zipped('true');
          >
          >
          > Has anyone here used the perl libraries to get reports? All of the
          > other sections that I've used for grabbing Campaigns, AdGroups,
          > Keywords and Ads have all worked.
          >
          > Tim Cadell
          >
          >
          >
          >
          >
          >
          > Yahoo! Groups Links
          >
          >
          >
          >




          --
          Tim Cadell
          A good friend will come and bail you out of jail...
          but, a true friend will be sitting next to you saying, Damn...that was fun !
        • Tim Cadell
          My code looks like this now: my $reportRequest =
          Message 4 of 10 , Mar 14, 2007
          • 0 Attachment
            My code looks like this now:

            my $reportRequest = Yahoo::Marketing::BasicReportRequest->new()->startDate($startDate)->endDate($endDate)->reportName($reportName)->reportType($reportType);
            my $reportId = $pan->processFunction('addReportRequestForAccountID', accountID => $accountId, reportRequest => $reportRequest)

            $startDate and $endDate are both DateTime objects, $reportName = 'Studebaker Clicks Report', $reportType = 'AdKeywordSummary'

            It dies with "A required field reportType is missing or empty."

            The generated XML looks like this around the request portion:

            ...
            <reportRequest xsi:type="tns:BasicReportRequest">
              <endDate xsi:type="xsd:dateTime">2007-03-08T00:00:00</endDate>
              <reportName xsi:type="xsd:string">Studebaker Clicks Report</reportName>
              <reportType xsi:type="tns:BasicReportType">AdKeywordSummary</reportType>
              <startDate xsi:type="xsd:dateTime">2007-01-01T00:00:00</startDate>
            ...

            I thought it was generating the wrong namespace, but now I'm not sure.

            Tim

            On 3/14/07, Tim Cadell < tcadell@...> wrote:
            I'll try it. Thanks.

            Tim


            On 3/14/07, Yahoo! Search Marketing Monkey < plummerm@...> wrote:

            Hi,

            I am not 100% sure on this, but please try chaining the call to new() as
            a method, like this:

            my $fileFormat =
            Yahoo::Marketing::FileOutputFormat->new()->fileOutputType('XML')->zipped('true');

            See if that works for you.

            -Y!SM Monkey

            timcadell wrote:
            > When I've used the addReportRequestForAccountID, I had problems
            > getting the reportType recognized. I think the library is setting the
            > namespace incorrectly, but I'm not sure. I got around this problem by
            > grabbing an XML example and hand coding it, calling the https web
            > service, and processing the response manually. But I got it working.
            >
            > Now, unfortunately, I've got to the point where I'm requesting the
            > report's URL to see if it's ready, and I'm getting another complaint
            > saying "Invalid parameter value for file output type". I've tried
            > setting it to 'TSV' and to 'XML'. Neither works. I'm using this code
            > to generate the fileFormat portion of the request:
            >
            > my $fileFormat = new
            > Yahoo::Marketing::FileOutputFormat()->fileOutputType('XML')->zipped('true');
            >
            >
            > Has anyone here used the perl libraries to get reports? All of the
            > other sections that I've used for grabbing Campaigns, AdGroups,
            > Keywords and Ads have all worked.
            >
            > Tim Cadell
            >
            >
            >
            >
            >
            >
            > Yahoo! Groups Links
            >
            >
            >
            >




            --
            Tim Cadell
            A good friend will come and bail you out of jail...
            but, a true friend will be sitting next to you saying, Damn...that was fun !



            --
            Tim Cadell
            A good friend will come and bail you out of jail...
            but, a true friend will be sitting next to you saying, Damn...that was fun !
          • Yahoo! Search Marketing Monkey
            Can you enable SOAP::Lite tracing and get the response XML/SOAP? That will help you figure out if the server is spitting out the error or if the Perl SDK is
            Message 5 of 10 , Mar 14, 2007
            • 0 Attachment
              Can you enable SOAP::Lite tracing and get the response XML/SOAP? That
              will help you figure out if the server is spitting out the error or if
              the Perl SDK is doing it.

              use SOAP::Lite +'trace';

              -Y!SM Monkey

              Tim Cadell wrote:
              > My code looks like this now:
              >
              > my $reportRequest =
              > Yahoo::Marketing::BasicReportRequest->new()->startDate($startDate)->endDate($endDate)->reportName($reportName)->reportType($reportType);
              > my $reportId = $pan->processFunction('addReportRequestForAccountID',
              > accountID => $accountId, reportRequest => $reportRequest)
              >
              > $startDate and $endDate are both DateTime objects, $reportName =
              > 'Studebaker Clicks Report', $reportType = 'AdKeywordSummary'
              >
              > It dies with "A required field reportType is missing or empty."
              >
              > The generated XML looks like this around the request portion:
              >
              > ...
              > <reportRequest xsi:type="tns:BasicReportRequest">
              > <endDate xsi:type="xsd:dateTime">2007-03-08T00:00:00</endDate>
              > <reportName xsi:type="xsd:string">Studebaker Clicks Report</reportName>
              > <reportType xsi:type="tns:BasicReportType">AdKeywordSummary</reportType>
              > <startDate xsi:type="xsd:dateTime">2007-01-01T00:00:00</startDate>
              > ...
              >
              > I thought it was generating the wrong namespace, but now I'm not sure.
              >
              > Tim
              >
              > On 3/14/07, *Tim Cadell* < tcadell@... <mailto:tcadell@...>>
              > wrote:
              >
              > I'll try it. Thanks.
              >
              > Tim
              >
              >
              > On 3/14/07, *Yahoo! Search Marketing Monkey* <
              > plummerm@... <mailto:plummerm@...>> wrote:
              >
              > Hi,
              >
              > I am not 100% sure on this, but please try chaining the call to
              > new() as
              > a method, like this:
              >
              > my $fileFormat =
              > Yahoo::Marketing::FileOutputFormat->new()->fileOutputType('XML')->zipped('true');
              >
              > See if that works for you.
              >
              > -Y!SM Monkey
              >
              > timcadell wrote:
              > > When I've used the addReportRequestForAccountID, I had problems
              > > getting the reportType recognized. I think the library is
              > setting the
              > > namespace incorrectly, but I'm not sure. I got around this
              > problem by
              > > grabbing an XML example and hand coding it, calling the https web
              > > service, and processing the response manually. But I got it
              > working.
              > >
              > > Now, unfortunately, I've got to the point where I'm requesting the
              > > report's URL to see if it's ready, and I'm getting another
              > complaint
              > > saying "Invalid parameter value for file output type". I've tried
              > > setting it to 'TSV' and to 'XML'. Neither works. I'm using this
              > code
              > > to generate the fileFormat portion of the request:
              > >
              > > my $fileFormat = new
              > > Yahoo::Marketing::FileOutputFormat()->fileOutputType('XML')->zipped('true');
              > >
              > >
              > > Has anyone here used the perl libraries to get reports? All of the
              > > other sections that I've used for grabbing Campaigns, AdGroups,
              > > Keywords and Ads have all worked.
              > >
              > > Tim Cadell
              > >
              > >
              > >
              > >
              > >
              > >
              > > Yahoo! Groups Links
              > >
              > >
              > >
              > >
              >
              >
              >
              >
              > --
              > Tim Cadell
              > A good friend will come and bail you out of jail...
              > but, a true friend will be sitting next to you saying, Damn...that
              > was fun !
              >
              >
              >
              >
              > --
              > Tim Cadell
              > A good friend will come and bail you out of jail...
              > but, a true friend will be sitting next to you saying, Damn...that was
              > fun !
            • Tim Cadell
              I have enabled the SOAP tracing and the error message is embedded in the XML being returned. The response looks like, in part:
              Message 6 of 10 , Mar 15, 2007
              • 0 Attachment
                I have enabled the SOAP tracing and the error message is embedded in the XML being returned. The response looks like, in part:

                <soap:Fault>
                  <faultcode>soap:Client</faultcode>
                  <faultstring>A required field reportType is missing or empty.</faultstring>
                  <detail><yns:ApiFault xmlns:yns="http://marketing.ews.yahooapis.com/V1"><yns:code xmlns:yns=" http://marketing.ews.yahooapis.com/V1">E1011</yns:code><yns:message xmlns:yns="http://marketing.ews.yahooapis.com/V1">A required field reportType is missing or empty.</yns:message>
                </yns:ApiFault>
                </detail>
                </soap:Fault>

                I don't know if the faultcode being defined as soap:Client says anything important.

                On 3/14/07, Yahoo! Search Marketing Monkey <plummerm@...> wrote:

                Can you enable SOAP::Lite tracing and get the response XML/SOAP? That
                will help you figure out if the server is spitting out the error or if
                the Perl SDK is doing it.

                use SOAP::Lite +'trace';

                -Y!SM Monkey

                Tim Cadell wrote:
                > My code looks like this now:
                >
                > my $reportRequest =
                > Yahoo::Marketing::BasicReportRequest->new()->startDate($startDate)->endDate($endDate)->reportName($reportName)->reportType($reportType);
                > my $reportId = $pan->processFunction('addReportRequestForAccountID',
                > accountID => $accountId, reportRequest => $reportRequest)
                >
                > $startDate and $endDate are both DateTime objects, $reportName =
                > 'Studebaker Clicks Report', $reportType = 'AdKeywordSummary'
                >
                > It dies with "A required field reportType is missing or empty."
                >
                > The generated XML looks like this around the request portion:
                >
                > ...
                > <reportRequest xsi:type="tns:BasicReportRequest">
                > <endDate xsi:type="xsd:dateTime">2007-03-08T00:00:00</endDate>
                > <reportName xsi:type="xsd:string">Studebaker Clicks Report</reportName>
                > <reportType xsi:type="tns:BasicReportType">AdKeywordSummary</reportType>
                > <startDate xsi:type="xsd:dateTime">2007-01-01T00:00:00</startDate>
                > ...
                >
                > I thought it was generating the wrong namespace, but now I'm not sure.
                >
                > Tim
                >
                > On 3/14/07, *Tim Cadell* < tcadell@... <mailto: tcadell@...>>
                > wrote:
                >
                > I'll try it. Thanks.
                >
                > Tim
                >
                >
                > On 3/14/07, *Yahoo! Search Marketing Monkey* <

                > plummerm@... <mailto: plummerm@...>> wrote:
                >
                > Hi,
                >
                > I am not 100% sure on this, but please try chaining the call to
                > new() as
                > a method, like this:
                >
                > my $fileFormat =
                > Yahoo::Marketing::FileOutputFormat->new()->fileOutputType('XML')->zipped('true');
                >
                > See if that works for you.
                >
                > -Y!SM Monkey
                >
                > timcadell wrote:
                > > When I've used the addReportRequestForAccountID, I had problems
                > > getting the reportType recognized. I think the library is
                > setting the
                > > namespace incorrectly, but I'm not sure. I got around this
                > problem by
                > > grabbing an XML example and hand coding it, calling the https web
                > > service, and processing the response manually. But I got it
                > working.
                > >
                > > Now, unfortunately, I've got to the point where I'm requesting the
                > > report's URL to see if it's ready, and I'm getting another
                > complaint
                > > saying "Invalid parameter value for file output type". I've tried
                > > setting it to 'TSV' and to 'XML'. Neither works. I'm using this
                > code
                > > to generate the fileFormat portion of the request:
                > >
                > > my $fileFormat = new
                > > Yahoo::Marketing::FileOutputFormat()->fileOutputType('XML')->zipped('true');
                > >
                > >
                > > Has anyone here used the perl libraries to get reports? All of the
                > > other sections that I've used for grabbing Campaigns, AdGroups,
                > > Keywords and Ads have all worked.
                > >
                > > Tim Cadell
                > >
                > >
                > >
                > >
                > >
                > >
                > > Yahoo! Groups Links
                > >
                > >
                > >
                > >
                >
                >
                >
                >
                > --
                > Tim Cadell
                > A good friend will come and bail you out of jail...
                > but, a true friend will be sitting next to you saying, Damn...that
                > was fun !
                >
                >
                >
                >
                > --
                > Tim Cadell
                > A good friend will come and bail you out of jail...
                > but, a true friend will be sitting next to you saying, Damn...that was
                > fun !




                --
                Tim Cadell
                A good friend will come and bail you out of jail...
                but, a true friend will be sitting next to you saying, Damn...that was fun !
              • Jennifer Copas
                Hi Tim, I m now at the point you were stuck at here: timcadell wrote: Now, unfortunately, I ve got to the point where I m requesting the
                Message 7 of 10 , Mar 27, 2007
                • 0 Attachment
                  Hi Tim,

                  I'm now at the point you were stuck at here:

                  timcadell <tcadell@...>
                  wrote:

                  Now, unfortunately, I've got to the point where I'm requesting the
                  report's URL to see if it's ready, and I'm getting another complaint
                  saying "Invalid parameter value for file output type". I've tried
                  setting it to 'TSV' and to 'XML'. Neither works. I'm using this code
                  to generate the fileFormat portion of the request:


                  I'm getting:
                  Invalid parameter value for file output type.

                  in response to:
                      <FileOutputFormat soapenc:arrayType="xsd:anyType[2]" xsi:type="tns:FileOutputFormat">
                          <FileOutputType xsi:type="tns:FileOutputType">XML</FileOutputType>
                          <zipped xsi:type="xsd:boolean">true</zipped>
                      </FileOutputFormat>

                  or this:
                  <FileOutputFormat soapenc:arrayType="xsd:anyType[2]" xsi:type="tns:FileOutputFormat"><FileOutputType xsi:type="xsd:string">XML</FileOutputType>
                  <zipped xsi:type="xsd:boolean">true</zipped></FileOutputFormat>
                  The code I'm using looks like this:

                  SOAP::Data->name( 'FileOutputFormat' )
                                       ->type( 'tns:FileOutputFormat' )
                                       ->value( [ SOAP::Data->name( 'FileOutputType' )
                                                            ->type( 'string' )
                                                            ->value( $args->{type} ),
                                                  SOAP::Data->name( 'zipped' )
                                                            ->type( 'boolean' )
                                                            ->value( 'false' ),
                                                  ]
                                              );

                  per the sample .pl downloadable from the documentation section.

                  Anyone know what I'm doing wrong? (and what is turning my false
                  boolean true?)

                  Yani



                  TV dinner still cooling?
                  Check out "Tonight's Picks" on Yahoo! TV.

                • Jennifer Copas
                  I found it, in case anyone else gets the same error. It needs to be fileOutputType not FileOutputType (and I happen to be using - type( string ) in my code)
                  Message 8 of 10 , Mar 28, 2007
                  • 0 Attachment
                    I found it, in case anyone else gets the same error.

                    It needs to be fileOutputType not FileOutputType
                    (and I happen to be using ->type( 'string' ) in my code)

                    Yani


                    Jennifer Copas <yani_copas@...> wrote:
                    Hi Tim,

                    I'm now at the point you were stuck at here:

                    timcadell <tcadell@gmail. com>
                    wrote:

                    Now, unfortunately, I've got to the point where I'm requesting the
                    report's URL to see if it's ready, and I'm getting another complaint
                    saying "Invalid parameter value for file output type". I've tried
                    setting it to 'TSV' and to 'XML'. Neither works. I'm using this code
                    to generate the fileFormat portion of the request:


                    I'm getting:
                    Invalid parameter value for file output type.

                    in response to:
                        <FileOutputFormat soapenc:arrayType= "xsd:anyType[ 2]" xsi:type="tns: FileOutputFormat ">
                            <FileOutputType xsi:type="tns: FileOutputType">XML</FileOutputType>
                            <zipped xsi:type="xsd: boolean">true</zipped>
                        </FileOutputFormat>

                    or this:
                    <FileOutputFormat soapenc:arrayType= "xsd:anyType[ 2]" xsi:type="tns: FileOutputFormat "><FileOutputType xsi:type="xsd: string">XML</FileOutputType>
                    <zipped xsi:type="xsd: boolean">true</zipped></FileOutputFormat>
                    The code I'm using looks like this:

                    SOAP::Data->name( 'FileOutputFormat' )
                                         ->type( 'tns:FileOutputForm at' )
                                         ->value( [ SOAP::Data->name( 'FileOutputType' )
                                                              ->type( 'string' )
                                                              ->value( $args->{type} ),
                                                    SOAP::Data->name( 'zipped' )
                                                              ->type( 'boolean' )
                                                              ->value( 'false' ),
                                                    ]
                                                );




                    Get your own web address.
                    Have a HUGE year through Yahoo! Small Business.

                  • Jennifer Copas
                    I found it, in case anyone else gets the same error. It needs to be fileOutputType not FileOutputType (and I happen to be using - type( string ) in my code)
                    Message 9 of 10 , Mar 28, 2007
                    • 0 Attachment
                      I found it, in case anyone else gets the same error.

                      It needs to be fileOutputType not FileOutputType
                      (and I happen to be using ->type( 'string' ) in my code)

                      Yani


                      Jennifer Copas <yani_copas@...> wrote:
                      Hi Tim,

                      I'm now at the point you were stuck at here:

                      timcadell <tcadell@gmail. com>
                      wrote:

                      Now, unfortunately, I've got to the point where I'm requesting the
                      report's URL to see if it's ready, and I'm getting another complaint
                      saying "Invalid parameter value for file output type". I've tried
                      setting it to 'TSV' and to 'XML'. Neither works. I'm using this code
                      to generate the fileFormat portion of the request:


                      I'm getting:
                      Invalid parameter value for file output type.

                      in response to:
                          <FileOutputFormat soapenc:arrayType= "xsd:anyType[ 2]" xsi:type="tns: FileOutputFormat ">
                              <FileOutputType xsi:type="tns: FileOutputType">XML</FileOutputType>
                              <zipped xsi:type="xsd: boolean">true</zipped>
                          </FileOutputFormat>

                      or this:
                      <FileOutputFormat soapenc:arrayType= "xsd:anyType[ 2]" xsi:type="tns: FileOutputFormat "><FileOutputType xsi:type="xsd: string">XML</FileOutputType>
                      <zipped xsi:type="xsd: boolean">true</zipped></FileOutputFormat>
                      The code I'm using looks like this:

                      SOAP::Data->name( 'FileOutputFormat' )
                                           ->type( 'tns:FileOutputForm at' )
                                           ->value( [ SOAP::Data->name( 'FileOutputType' )
                                                                ->type( 'string' )
                                                                ->value( $args->{type} ),
                                                      SOAP::Data->name( 'zipped' )
                                                                ->type( 'boolean' )
                                                                ->value( 'false' ),
                                                      ]
                                                  );




                      Get your own web address.
                      Have a HUGE year through Yahoo! Small Business.

                    • Jennifer Copas
                      I found it, in case anyone else gets the same error. It needs to be fileOutputType not FileOutputType (and I happen to be using - type( string ) in my code)
                      Message 10 of 10 , Mar 28, 2007
                      • 0 Attachment
                        I found it, in case anyone else gets the same error.

                        It needs to be fileOutputType not FileOutputType
                        (and I happen to be using ->type( 'string' ) in my code)

                        Yani


                        Jennifer Copas <yani_copas@...> wrote:
                        Hi Tim,

                        I'm now at the point you were stuck at here:

                        timcadell <tcadell@gmail. com>
                        wrote:

                        Now, unfortunately, I've got to the point where I'm requesting the
                        report's URL to see if it's ready, and I'm getting another complaint
                        saying "Invalid parameter value for file output type". I've tried
                        setting it to 'TSV' and to 'XML'. Neither works. I'm using this code
                        to generate the fileFormat portion of the request:


                        I'm getting:
                        Invalid parameter value for file output type.

                        in response to:
                            <FileOutputFormat soapenc:arrayType= "xsd:anyType[ 2]" xsi:type="tns: FileOutputFormat ">
                                <FileOutputType xsi:type="tns: FileOutputType">XML</FileOutputType>
                                <zipped xsi:type="xsd: boolean">true</zipped>
                            </FileOutputFormat>

                        or this:
                        <FileOutputFormat soapenc:arrayType= "xsd:anyType[ 2]" xsi:type="tns: FileOutputFormat "><FileOutputType xsi:type="xsd: string">XML</FileOutputType>
                        <zipped xsi:type="xsd: boolean">true</zipped></FileOutputFormat>
                        The code I'm using looks like this:

                        SOAP::Data->name( 'FileOutputFormat' )
                                             ->type( 'tns:FileOutputForm at' )
                                             ->value( [ SOAP::Data->name( 'FileOutputType' )
                                                                  ->type( 'string' )
                                                                  ->value( $args->{type} ),
                                                        SOAP::Data->name( 'zipped' )
                                                                  ->type( 'boolean' )
                                                                  ->value( 'false' ),
                                                        ]
                                                    );




                        Get your own web address.
                        Have a HUGE year through Yahoo! Small Business.

                      Your message has been successfully submitted and would be delivered to recipients shortly.