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

Re: [soaplite] Transport is not specified (using proxy() method or service description)

Expand Messages
  • Duncan Cameron
    ... Two questions. Why have you commented out use SOAP::MIME ? Is the MIME::Entity being created successfully? i.e does $ent have a real value? Regards
    Message 1 of 4 , Aug 20, 2003
      --- sharmila_pillai <sharmila_pillai@...> wrote: > Hi,
      >
      > I am trying to send and receive attachments using soaplite. I
      > followed the examples
      > in http://www.majordojo.com/SOAP-MIME/samples and I get the above
      > mentioned
      > error.
      > Has anyone got the examples working? This doesn't look like a common
      > problem.
      > BTW, am quite new to perl and apologies if I am being daft :-(
      >
      > TIA,
      > Sharmila.
      >
      > #!/usr/bin/perl -w
      >
      > use SOAP::Lite +trace => qw(debug);
      > #use SOAP::MIME;
      > use MIME::Entity;
      > use Data::Dumper;
      >
      > $HOST = "http://web3-node3/cgi-bin/sharmila-dev/testattach.cgi";
      > $NS = "TestAttach";
      >
      > my $ent = build MIME::Entity
      > Type => "image/gif",
      > Encoding => "base64",
      > Path => "somefile.gif",
      > Filename => "arrowDown.gif",
      > Disposition => "attachment";
      >
      > my @parts = ($ent);
      >
      > my $soap = SOAP::Lite
      > ->readable(1)
      > ->uri($NS)
      > ->parts(@parts)
      > ->proxy($HOST);
      > my $som = $soap->testattach(SOAP::Data->name("foo" => "bar"));
      > print Dumper($som);

      Two questions.
      Why have you commented out "use SOAP::MIME" ?
      Is the MIME::Entity being created successfully? i.e does $ent have a
      real value?

      Regards
      Duncan


      ________________________________________________________________________
      Want to chat instantly with your online friends? Get the FREE Yahoo!
      Messenger http://uk.messenger.yahoo.com/
    • sharmila_pillai
      Uncommenting use SOAP::MIME gives me an error/warning: Subroutine SOAP::Deserializer::deserialize redefined at /usr/bin/perl-5.8.0/lib/
      Message 2 of 4 , Aug 21, 2003
        Uncommenting 'use SOAP::MIME' gives me an error/warning:
        Subroutine SOAP::Deserializer::deserialize redefined at
        /usr/bin/perl-5.8.0/lib/
        site_perl/5.8.0/SOAP/MIME.pm line 20.


        I did $ent->print(\*STDOUT); and looks like $ent is created
        successfully.

        Interestingly, when I change the order of proxy() and parts()
        declaration the transport
        error seems to disappear as well!
        my $soap = SOAP::Lite
        ->readable(1)
        ->uri($NS)
        ->proxy($HOST)
        ->parts(@parts);

        Now, I get the following error:
        Can't locate object method "testattach" via package "SOAP::SOM" at
        testattach_client1.pl line 25.
        Any pointers??

        TIA,
        Sharmila.

        > >
        > > #!/usr/bin/perl -w
        > >
        > > use SOAP::Lite +trace => qw(debug);
        > > #use SOAP::MIME;
        > > use MIME::Entity;
        > > use Data::Dumper;
        > >
        > > $HOST = "http://web3-node3/cgi-bin/sharmila-dev/testattach.cgi";
        > > $NS = "TestAttach";
        > >
        > > my $ent = build MIME::Entity
        > > Type => "image/gif",
        > > Encoding => "base64",
        > > Path => "somefile.gif",
        > > Filename => "arrowDown.gif",
        > > Disposition => "attachment";
        > >
        > > my @parts = ($ent);
        > >
        > > my $soap = SOAP::Lite
        > > ->readable(1)
        > > ->uri($NS)
        > > ->parts(@parts)
        > > ->proxy($HOST);
        > > my $som = $soap->testattach(SOAP::Data->name("foo" => "bar"));
        > > print Dumper($som);
        >
        > Two questions.
        > Why have you commented out "use SOAP::MIME" ?
        > Is the MIME::Entity being created successfully? i.e does $ent have a
        > real value?
        >
        > Regards
        > Duncan
        >
        >
        > ________________________________________________
        ________________________
        > Want to chat instantly with your online friends? Get the FREE
        Yahoo!
        > Messenger http://uk.messenger.yahoo.com/
      • Byrne Reese
        SOAP::MIME is actually a patch to SOAP::Lite... not the best choice for an implementation I admit, but I wanted to make it easy without forcing the user to
        Message 3 of 4 , Aug 21, 2003
          SOAP::MIME is actually a patch to SOAP::Lite... not the best choice for an
          implementation I admit, but I wanted to make it easy without forcing the
          user to override every single parser/processor in the SOAP::Lite package.
          But that is neither here nor there. Bottom line, the warnings are
          harmless.

          If you comment out SOAP::MIME, the parts subroutine will be undefined, as
          it is defined by SOAP::MIME. The SOAP::SOM error is because Perl thinks
          you are trying to take action on a SOAP Response returned from parts which
          of course does not exist.

          Let me encourage you to download the new version of SOAP::Lite 0.60... it
          has all of SOAP::MIME's functionality merged into it more seemlessly,
          which will eliminate the need for 'use SOAP::MIME' all-together, and will
          get rid of those annoying warnings.

          http://sourceforge.net/project/showfiles.php?group_id=66000

          >
          >
          >
          >
          > Uncommenting 'use SOAP::MIME' gives me an error/warning:
          > Subroutine SOAP::Deserializer::deserialize redefined at
          > /usr/bin/perl-5.8.0/lib/
          > site_perl/5.8.0/SOAP/MIME.pm line 20.
          >
          >
          > I did $ent-
          > successfully.
          >
          > Interestingly, when I change the order of proxy() and parts()
          > declaration the transport
          > error seems to disappear as well!
          > my $soap = SOAP::Lite
          > -
          > -
          > -
          > -
          >
          > Now, I get the following error:
          > Can't locate object method "testattach" via package
          > "SOAP::SOM" at
          > testattach_client1.pl line 25.
          > Any pointers??
          >
          > TIA,
          > Sharmila.
          >
          >
          >
          >
          >
          >
          >
          >
          >
          > http://web3-node3/cgi-bin/sharmila-dev/testattach.cgi";
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          >
          > ________________________
          >
          > Yahoo!
          > http://uk.messenger.yahoo.com/
          >
          >
          >
          >
          >
          >
          >
          >
          >
          > Yahoo! Groups Sponsor
          >
          >
          > ADVERTISEMENT
          >
          >
          >
          >
          >
          >
          >
          >
          >
          > To unsubscribe from this group, send an email to:
          > soaplite-unsubscribe@yahoogroups.com
          >
          >
          >
          >
          >
          > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
          >
          >
          >
          >
          >


          ^byrne :/
        Your message has been successfully submitted and would be delivered to recipients shortly.