Results 1 to 7 of 7
  1. #1
    Grandma broke her coccyx! Uncle Rico's Avatar
    Join Date
    May 8th, 2007
    Location
    North Carolina
    Posts
    2,238
    Need Help From Perl/SOAP Expert
    I have been playing with the LinkLocatorDirect web service from LS and have been able to get it to dump the results out. However, I would like to cycle through the results in an array fashion and then pull out specific fields from each array element.

    This code does a huge dump of the data, but I am trying to access each element in the array contained within the $result variable. Based on the doc each element contains 7 fields.

    Code:
    my $soap = SOAP::Lite ->uri('TextPromotion') -> proxy($endpoint); 
    my $result = $soap->GetAllLinks($SID); 
    
    unless ($result->fault) { 
       my $str = dump($result); 
       print "$str\n"; 
    }

  2. #2
    Full Member
    Join Date
    October 22nd, 2006
    Posts
    200
    No expert but I think this may work:

    PHP Code:
    foreach ($result as $key=>$item){
    echo 
    $item->fieldname1;
    echo 
    $item->fieldname2;
    echo 
    $item->fieldname3;

    where fieldname1 etc are the fields

  3. #3
    Grandma broke her coccyx! Uncle Rico's Avatar
    Join Date
    May 8th, 2007
    Location
    North Carolina
    Posts
    2,238
    But I need something in perl.

  4. #4
    Grandma broke her coccyx! Uncle Rico's Avatar
    Join Date
    May 8th, 2007
    Location
    North Carolina
    Posts
    2,238
    Hopefully LinkShare can give me an intelligent response to my question. I think the service may be returning an array of arrays of an array of hashes. Too bad the doc doesn't give a clue.

  5. #5
    ABW Ambassador sjangro's Avatar
    Join Date
    January 18th, 2005
    Location
    Boston
    Posts
    1,529
    I was about to go in and give this API a try to see what you're running into, but I don't seem to have access to that API, just merchandiser apis and the linkgenerator service.

    I guess I need to request access to this?

    I don't know that LS will be able to help you with the Perl. API providers tend to shy away from helping out with that stuff as it's a slippery slope to provde that level of support.

    The webservice sends back a response which is formatted as XML. SOAP in this case, I guess? but their others seem to be REST.

    Then it's up to that Perl library to turn that into Perl variables. If they're sending back a response with multi levels of nesting, then yes, you'll get arrays of hashes of hashes of hashes ...

    I'm planning to try to get access to this, but that'll surely take a while. If you post the output of that dump, that may be helpful. surely it's a lot of data, but maybe the first 100 lines or something.

  6. #6
    Grandma broke her coccyx! Uncle Rico's Avatar
    Join Date
    May 8th, 2007
    Location
    North Carolina
    Posts
    2,238
    Woohoo. I figured out the format of the return from the web service call.

  7. #7
    Grandma broke her coccyx! Uncle Rico's Avatar
    Join Date
    May 8th, 2007
    Location
    North Carolina
    Posts
    2,238
    The one big problem with the links is the lack of a formal start and expiration field.

  8. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Join the Soap.com affiliate program
    By Google Affiliate Network Moderator in forum Google Affiliate Network - GAN
    Replies: 0
    Last Post: August 4th, 2010, 05:19 PM
  2. Soap Connection Failing
    By tinamar in forum Rakuten LinkShare - LS
    Replies: 21
    Last Post: April 2nd, 2009, 10:21 AM
  3. Wanted: Coast Original Blue Soap
    By AffiliateSummitMissy in forum Virtual Family and Off-Topic
    Replies: 52
    Last Post: September 18th, 2008, 07:34 PM
  4. Little Bars of Soap
    By Rhea in forum Virtual Family and Off-Topic
    Replies: 2
    Last Post: July 6th, 2004, 09:51 AM
  5. System Soap Pro
    By appbizz in forum Suspicious Activity!
    Replies: 0
    Last Post: September 25th, 2003, 11:05 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •