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

Why does this code no longer work? AWS

Expand Messages
  • robertatelastica
    my $aws_wsdl = http://ecs.amazonaws.com/AWSECommerceService/AWSECommerceService.wsdl ; #Create a new SOAP::Lite instance, feeding it Amazon s WSDL my
    Message 1 of 2 , Aug 26, 2007
    • 0 Attachment
      my $aws_wsdl =
      "http://ecs.amazonaws.com/AWSECommerceService/AWSECommerceService.wsdl";

      #Create a new SOAP::Lite instance, feeding it Amazon's WSDL
      my $aws_handle = SOAP::Lite->service("$aws_wsdl");

      my $request_complex_type = \SOAP::Data->value(
      SOAP::Data->name('ItemId')
      ->value($asin),
      SOAP::Data->name('IdType')
      ->value('ASIN'),
      SOAP::Data->name('Condition')
      ->value('All'),
      SOAP::Data->name('ResponseGroup')
      ->value('Large'));

      #my $itemlookup_request = SOAP::Data->value(
      # SOAP::Data->name('SubscriptionId')
      # ->value($subscription_id),
      # SOAP::Data->name('Request')
      # ->value($request_complex_type));

      my $itemlookup_request = SOAP::Data->value(
      SOAP::Data->name('MarketplaceDomain')
      ->value(''),
      SOAP::Data->name('SubscriptionId')
      ->value($subscription_id),
      SOAP::Data->name('Request')
      ->value($request_complex_type));

      my $results = $aws_handle->ItemLookup($itemlookup_request);

      Anybody know why this results in

      String value expected instead of SOAP::Data reference
      at /home/XXXXX/lib/perl5/site_perl/5.8.8/SOAP/Lite.pm line 174

      SOAP::XMLSchema1999::Serializer::as_string('SOAP::Serializer=HASH(0xa1a7158)',
      'SOAP::Data=HASH(0x9aae9a0)', 'MarketplaceDomain', 'xs:string',
      'HASH(0xa1abd44)') called at (eval
      184)[/home/XXXXX/lib/perl5/site_perl/5.8.8/SOAP/Lite.pm:2964] line 342

      AWSECommerceService::_call('AWSECommerceService=HASH(0xa003b80)',
      'ItemLookup', 'SOAP::Data=HASH(0x9aae9a0)') called at (eval
      184)[/home/XXXXX/lib/perl5/site_perl/5.8.8/SOAP/Lite.pm:2964] line 383
      AWSECommerceService::__ANON__[(eval
      184)[/home/XXXXX/lib/perl5/site_perl/5.8.8/SOAP/Lite.pm:2964]:384]('AWSECommerceService=HASH(0xa003b80)',
      'SOAP::Data=HASH(0x9aae9a0)') called at filter.pl line 1319
      XXXXX
    • rahed
      ... You want to call your service like this:
      Message 2 of 2 , Aug 28, 2007
      • 0 Attachment
        On 8/26/07, robertatelastica <robert.nicholson@...> wrote:

        > my $aws_wsdl =
        > "http://ecs.amazonaws.com/AWSECommerceService/AWSECommerceService.wsdl";
        >
        > #Create a new SOAP::Lite instance, feeding it Amazon's WSDL
        > my $aws_handle = SOAP::Lite->service("$aws_wsdl");

        You want to call your service like this:

        $aws_handle->ItemLookup(SOAP::Data->name('myname'=>\SOAP::Data->value(SOAP::Data->name('myothername'=>'somevalue'))));

        Trim it to your requirements. Value of a name attribute must be a
        string or a reference.

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