locked
Error invoking QueueReport of ReportingService v5.1 in perl RRS feed

All replies

  • Hi shridharbalu,

     

    Yes these fields are optional. I think your problem may be that you are still sending them and leaving them blank. Try removing the from your SOAP request.

     

    Heres an example of a "KeywordPerformanceReportRequest" that works with v5.1. As you can see I do not send the 'AdGroups' & 'Campaigns'.

     

    Code Snippet

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <soapenv:Header>
                <ns1:ApplicationToken
                    soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
                    soapenv:mustUnderstand="0"
                    xmlns:ns1="https://adcenter.microsoft.com/api/advertiser/v5"/>
                <ns2:DeveloperToken
                    soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
                    soapenv:mustUnderstand="0"
                    xmlns:ns2="https://adcenter.microsoft.com/api/advertiser/v5">
                    <ns2:Value>ZZZ</ns2:Value>
                </ns2:DeveloperToken>
                <ns3:UserCredentials
                    soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
                    soapenv:mustUnderstand="0"
                    xmlns:ns3="https://adcenter.microsoft.com/api/advertiser/v5">
                    <ns3:Password>ZZZ</ns3:Password>
                    <ns3:Username>ZZZ</ns3:Username>
                </ns3:UserCredentials>
            </soapenv:Header>
            <soapenv:Body>
                <QueueReportRequest
                    xmlns="https://adcenter.microsoft.com/api/advertiser/v5">
                    <ReportRequest xsi:type="ns5:KeywordPerformanceReportRequest"
                        xmlns:ns5="https://adcenter.microsoft.com/api/advertiser/v5">
                        <Format>Xml</Format>
                        <Language>English</Language>
                        <ReportName>Keyword Performance Report version five</ReportName>
                        <ReturnOnlyCompleteData>false</ReturnOnlyCompleteData>
                        <Aggregation>Daily</Aggregation>
                        <Columns>
                               <KeywordPerformanceReportColumn>AccountName</KeywordPerformanceReportColumn>
    <KeywordPerformanceReportColumn>CampaignName</KeywordPerformanceReportColumn>
    <KeywordPerformanceReportColumn>AdGroupName</KeywordPerformanceReportColumn>
    <KeywordPerformanceReportColumn>Keyword</KeywordPerformanceReportColumn>
    <KeywordPerformanceReportColumn>TimePeriod</KeywordPerformanceReportColumn>
    <KeywordPerformanceReportColumn>Clicks</KeywordPerformanceReportColumn>
    <KeywordPerformanceReportColumn>Impressions</KeywordPerformanceReportColumn>
    <KeywordPerformanceReportColumn>Spend</KeywordPerformanceReportColumn>
    <KeywordPerformanceReportColumn>MatchType</KeywordPerformanceReportColumn>

                        </Columns>
                        <Scope>
                            <AccountIds>
                                <ns6:int
                                    xmlns:ns6="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
                                    ZZZ</ns6:int>
                            </AccountIds>
                        </Scope>
                        <Time>
                              <PredefinedTime>Yesterday</PredefinedTime>
                        </Time>
                    </ReportRequest>
                </QueueReportRequest>
            </soapenv:Body>
        </soapenv:Envelope>

     

     

     

    Hope this helps!

     

    Ewan

     

    Saturday, August 23, 2008 8:33 AM
  • thanks Ewan for the quick response.

    I am still having issues and was wondering if you can help me in creating this SOAP:Big Smileata.

    The way I currently do is as follows:

     my $scope = {
                   AccountIds              => SOAP:Big Smileata->name( AccountIds => [SOAP:Big Smileata->name( "int" )->value($self->msn_account_id)->attr({'xmlns:ns6' => 'http://schemas.microsoft.com/2003/10/Serialization/Arrays' })])
            };


    resulting in my Scope tag looking like

    <Scope xmlns:impl="https://adcenter.microsoft.com/api/advertiser/v5" xsi:type="impl:AccountThroughAdGroupReportScope">
              <AccountIds soapenc:arrayType="xsd:int[1]" xsi:type="soapenc:Array">
                <int xmlns:ns6="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xsi:type="xsd:int">7154</int>
              </AccountIds>
            </Scope>

    following which I get this

    <s:Envelope xmlnsTongue Tied="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><s:Fault><faultcode xmlns:a="http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher">aBig SmileeserializationFailed</faultcode><faultstring xml:lang="en-US">The formatter threw an except
    ion while trying to deserialize the message: There was an error while trying to deserialize parameter https://adcenter.microsoft.com/api/advertiser/v5:ReportRequest. The InnerException message was 'Error in line 36 position 79. Element 'https://adcenter.microsoft.com/api/adverti
    ser/v5:AccountIds' contains data of the 'http://schemas.xmlsoap.org/soap/encoding/:Array' data contract. The deserializer has no knowledge of any type that maps to this contract. Add the type corresponding to 'Array' to the list of known types - for example, by using the KnownTy
    peAttribute attribute or by adding it to the list of known types passed to DataContractSerializer.'.  Please see InnerException for more details.</faultstring><detail><ExceptionDetail xmlns="http://schemas.datacontract.org/2004/07/System.ServiceModel" xmlns:i="http://www.w3.org/
    2001/XMLSchema-instance"><HelpLink i:nil="true"/><InnerException><HelpLink i:nil="true"/><InnerException i:nil="true"/><Message>Error in line 36 position 79. Element 'https://adcenter.microsoft.com/api/advertiser/v5:AccountIds' contains data of the 'http://schemas.xmlsoap.org/so
    ap/encoding/:Array' data contract. The deserializer has no knowledge of any type that maps to this contract. Add the type corresponding to 'Array' to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding it to the list of known types passe
    d to DataContractSerializer.</Message><StackTrace>   at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator reader, String name, String ns, DataContract&amp; dataContract)&#xD;
    ....


    I setup my reporting proxy as follows

     my $proxy = SOAP::Lite
                            ->uri( API_NS5 )
                            ->proxy( $proxy_uri );
    $proxy->on_action( sub { return $action } );
    $proxy->readable(1);


    shridhar
    Monday, August 25, 2008 4:13 PM
  • Hi Ewan,
       i think i solved it. Thanks for giving me the Scope xml snippet. I modelled my perl code to recreate it with success and i can now move on to the GetReportStatus.

       my $scope = {
                    AccountIds              => SOAP:: Data->name( AccountIds => [SOAP:: Data->name('int')->value($self->msn_account_id)->uri('http://schemas.microsoft.com/2003/10/Serialization/Arrays')->prefix('ns6')])->attr({'xmlns:q1' => 'http://schemas.microsoft.com/2003/10/Serialization/Arrays' })->type('q1:ArrayOfint')
            };


    thanks once again.

    shridhar
    Monday, August 25, 2008 4:29 PM