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

2163Re: [soaplite] attachments don't work with apache axis?

Expand Messages
  • Paul Kulchenko
    Dec 8, 2002
      Hi Anesh,

      > send
      > CRLF all the time, but only LF. I don't now if that's the problem.
      Shouldn't be a problem. As far as I remember it's allowed by the
      spec.

      > Also, the perl client is sending
      > This is a multi-part message in MIME format...
      > after the http header.
      Yes. It looks like it's a limitation of the Axis implementation. SOAP
      with Attachments spec [1] is clear:

      "The primary SOAP 1.1 message must be carried in the root body part
      of the Multipart/Related structure."

      The MIME spec (The MIME Multipart/Related Content-type) [2] is also
      clear:

      "The "start" parameter, if given, points, via a content-ID, to the
      body part that contains the object root. The default root is the
      first body part within the Multipart/Related body."

      SOAP::MIME module uses the start element to point to the root part of
      the message that containts SOAP envelope. SOAP::Lite module is able
      to parse MIME messages that may or may not use "start" parameter. I
      would ask the same question on axis-dev list; maybe my understanding
      is not correct.

      Best wishes, Paul.

      [1] http://www.w3.org/TR/SOAP-attachments
      [2] http://www.nacs.uci.edu/indiv/ehood/MIME/rfc2112.txt

      --- "msanesh <anesh@...>" <anesh@...> wrote:
      > Hi,
      >
      > I am trying to send an attachment to a server running apache
      > axis,
      > but axis is not able to parse the mime message. It works if I use a
      >
      > java client to send attachments. I looked the the packets being
      > sent
      > in the both the cases and it looks like the perl client does not
      > send
      > CRLF all the time, but only LF. I don't now if that's the problem.
      > Also, the perl client is sending
      > This is a multi-part message in MIME format...
      >
      > after the http header.
      >
      >
      > Here is my perl code.
      >
      >
      > use SOAP::Lite;
      > use SOAP::MIME;
      > use MIME::Entity;
      >
      > my $cid = "bar";
      > my $ent = build MIME::Entity
      > Type => "application/octet-stream",
      > Encoding => "base64",
      > Path => "/tmp/ZR.java",
      > Filename => "ZR.java",
      > 'Content-Id' => "<$cid>",
      > Disposition => "attachment";
      >
      > my @parts = ($ent);
      >
      > my $som = SOAP::Lite
      > ->uri("")
      > ->parts($ent)
      > ->proxy("http://localhost:8300/axis/servlet/AxisServlet")
      > ->echo(SOAP::Data->name("source")->attr({href => "cid:$cid"}));
      >
      >
      > Thanks,
      > Anesh.
      >
      >
      > ------------------------ 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! Mail Plus - Powerful. Affordable. Sign up now.
      http://mailplus.yahoo.com
    • Show all 3 messages in this topic