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

Re: [soaplite] Alternative Formats

Expand Messages
  • Paul Kulchenko
    Hi Chad, You may try to use SOAP::MIME: use SOAP::Lite; use SOAP::MIME; use MIME::Entity; my $cid = bar ; my $ent = build MIME::Entity Type =
    Message 1 of 6 , Sep 18, 2002
    • 0 Attachment
      Hi Chad,

      You may try to use SOAP::MIME:

      use SOAP::Lite;
      use SOAP::MIME;
      use MIME::Entity;

      my $cid = "bar";
      my $ent = build MIME::Entity
      Type => "image/gif",
      Encoding => "base64",
      Path => "image.gif",
      'Content-Id' => "<$cid>",
      Disposition => "attachment";

      my $som = SOAP::Lite
      ->uri("...")
      ->proxy("...")
      ->parts($ent)
      ->send_image(SOAP::Data->name("foo")->attr({href => "cid:$cid"}));

      Any S::L server should be able to process that (let me know if you
      have problems). I plan to include this functionality in S::L and keep
      the same interface if possible.

      Best wishes, Paul.

      --- Chad Simmons <polpak@...> wrote:
      > Ok, so after having done some testing and playing with the module a
      > bit I think
      > I have a good handle on what is going on and how to access web
      > services via
      > SOAP. I'm now faced with an unusual (or at least I think it is)
      > situation. The
      > web service I'm trying to talk to is expecting to get (via HTTPS) a
      > multipart
      > mime document. The first part will be the SOAP request object and
      > the second
      > part will be an XML document. I've been looking at MIME::Tools for
      > building the
      > multipart document, but I'm unsure how to get the SOAP request from
      > SOAP::Lite
      > to insert into the multipart document. Then once I have the full
      > multipart
      > document I'm unsure how I can then transport that document to the
      > SOAP server.
      >
      > Any suggestions?
      >
      > Chad Simmons
      >
      > =====
      > -----BEGIN GEEK CODE BLOCK-----
      > Version 3.1
      > GCS/L/C/O d-(+) s++: a-- C+++$>++++ UBLS++++$
      > P+++(--)$ L+++>++++ E--- W+>++$ N !o K? w(--) !O
      > M- !V PS+ PE(++) Y+ PGP->+ t+ 5 X+() R(+) tv+@
      > b++(+++) !DI+++ D G(-) e>+++$ h---() r+++ y+++
      > ------END GEEK CODE BLOCK------
      >
      > __________________________________________________
      > Do you Yahoo!?
      > Yahoo! News - Today's headlines
      > http://news.yahoo.com
      >
      > ------------------------ Yahoo! Groups Sponsor
      >
      > To unsubscribe from this group, send an email to:
      > soaplite-unsubscribe@yahoogroups.com
      >
      >
      >
      > Your use of Yahoo! Groups is subject to
      > http://docs.yahoo.com/info/terms/
      >
      >


      __________________________________________________
      Do you Yahoo!?
      Yahoo! News - Today's headlines
      http://news.yahoo.com
    • John Liu
      Hi, Paul, How can I access auth .htaccess site using WSDL in soaplite? thanks. John Liu
      Message 2 of 6 , Sep 18, 2002
      • 0 Attachment
        Hi, Paul,

        How can I access auth .htaccess
        site using WSDL in soaplite?

        thanks.

        John Liu
      • Randy J. Ray
        ... This isn t clear-- are you trying to use a WSDL description to help you locate and download a .htaccess file, or are you trying to use the settings in a
        Message 3 of 6 , Sep 18, 2002
        • 0 Attachment
          On 2002.09.18 13:30 John Liu wrote:

          > How can I access auth .htaccess
          > site using WSDL in soaplite?

          This isn't clear-- are you trying to use a WSDL description to help you locate
          and download a .htaccess file, or are you trying to use the settings in a
          .htaccess file to control the generation of WSDL?

          Randy
          --
          rjray@... Linux: Because rebooting is for adding new hardware.

          Any spammers auto-extracting addresses from this message will definitely want
          to include uce@... and report@...
        • John Liu
          Sorry, when I issued the following call and the site has .htaccess control, obviously I can t get any wanted results back. Paul provides some examples how to
          Message 4 of 6 , Sep 18, 2002
          • 0 Attachment
            Sorry, when I issued the following call
            and the site has .htaccess control, obviously
            I can't get any wanted results back. Paul provides
            some examples how to handle such case, but none of
            those deal with using wsdl call -

            $s= SOAP::Lite
            -> service('http://www.myservices.com/myservice.wsdl')
            -> getDocs($sec, '123', 'john123');

            foreach $doc (@$s) {
            print "$doc\n";
            }

            thanks.

            johnl

            > -----Original Message-----
            > From: Randy J. Ray [mailto:rjray@...]
            > Sent: Wednesday, September 18, 2002 3:41 PM
            > To: John Liu
            > Cc: soaplite@yahoogroups.com
            > Subject: Re: [soaplite] .htacess and wsdl
            >
            >
            > On 2002.09.18 13:30 John Liu wrote:
            >
            > > How can I access auth .htaccess
            > > site using WSDL in soaplite?
            >
            > This isn't clear-- are you trying to use a WSDL description to
            > help you locate
            > and download a .htaccess file, or are you trying to use the settings in a
            > .htaccess file to control the generation of WSDL?
            >
            > Randy
            > --
            > rjray@... Linux: Because rebooting is for adding
            > new hardware.
            >
            > Any spammers auto-extracting addresses from this message will
            > definitely want
            > to include uce@... and report@...
            >
            >
            > To unsubscribe from this group, send an email to:
            > soaplite-unsubscribe@yahoogroups.com
            >
            >
            >
            > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
            >
          • John Liu
            I did a test,the php soap server returns associated array in the form - $res[$i] = array ( elem1 = $arr[0], elem2 = $arr[1], elem3 = $arr[2], elem4
            Message 5 of 6 , Sep 19, 2002
            • 0 Attachment
              I did a test,the php soap server returns
              associated array in the form -
              $res[$i] = array ( 'elem1' => $arr[0],
              'elem2' => $arr[1],
              'elem3' => $arr[2],
              'elem4' => $arr[3]);

              the WSDL file is similar to GoogleSearch.wsdl,
              I tried to use soaplite to do the following
              call -
              my $result= SOAP::Lite
              -> service('http://services/mkbt.wsdl');
              -> myCall($sec, '123', 'johnl');

              if(defined($result->{resultElements})) {
              print join "\n",
              "Found:",
              $result->{resultElements}->[0]->{elem1},
              $result->{resultElements}->[0]->{elem2} . "\n"
              }

              The error msg - Can't coerce array into hash.

              A year ago, I can't figure this out.
              Is any body find a way now to handle this?

              thanks.

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