I'm working with the demo and I'm having trouble retrieving the attachment that is shown in the email that contains an attachment. Here is my code:

$attmt = new getAttachmentRequest();
$attmt->id = $msgr[item]->attachments->attachment[1]->id;
$attmt->offset = 0;
$attmt->length = -1;
$attach = $gwservice->getAttachmentRequest($attmt);

When the execution gets to the last line, the output just stops, no message or anything after. If I comment out the last line, execution continues. Any help would be appreciated. Thanks