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

2420Newbie soaplite/axis question.....

Expand Messages
  • gregs4321 <gregs4321@yahoo.com>
    Feb 28, 2003
    • 0 Attachment

      I am new to webservices and am trying to send multiple attachments
      from a soap::lite client to an axis server. I had to make the
      changes recommended from a post found here by msanesh ( added '/r' to
      the same two lines in Entity.pm ) and am now able to send a message
      with a single attachment.

      My problem is that I can't send more than one attachment. If I do I
      get the following message: SOAP error: Can't call method "print" on an
      undefined value at ..../perl/lib/MIME/Entity.pm line 1803.

      Here is what I tried:
      while ( @ARGV ) {
      my $filepath = shift @ARGV;
      my MIME::Type $mime = $types->mimeTypeOf( $filepath );
      ( my $filename = $filepath) =~ s!^.*/!!;
      my $cid = "Report";
      $ent = build MIME::Entity
      Type => $mime,
      Encoding => "base64",
      Path => $filepath,
      Filename => $filename,
      'Content-Id' => "<$cid>",
      Disposition => "attachment";
      push @parts, $ent;
      $webcall::som = SOAP::Lite
      ->uri( $uri )
      ->proxy( $endpoint )
      ->parts( @parts ); ## substitute $ent and
      ## it will send the last
      ## ARG file succesfully!

      eval {
      $result = $webcall::som->addMcorrMulti($accode,$refNum,$msgNum,
      $report) };

      warn "SOAP error: $@" if $@; ## here is where the error is caught

      I originally had a different $cid for each iteration of the 'while'
      and had the same problem. What am I missing??

    • Show all 3 messages in this topic