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

5156Attachments part 2...

Expand Messages
  • harbica
    Jan 27, 2006
      A couple months ago I posted about getting SOAP::Lite to pass
      attachments to a service. At the time I wasn't concerned about
      retrieving them. Now I'm trying to make that happen and am running
      into a problem.

      My SOAP service (running on top of JWSDP) is returning a multipart
      response with a Content-Type header that looks like this:

      Content-Type: multipart/related; type="text/xml";
      boundary="----=_Part_21_28208563.1138390224552"

      SOAP::Lite (version 0.60, but I think the same thing would happen in
      the development releases) dies on this line:

      die "Can't find 'start' parameter in multipart MIME message\n"
      if @result > 1 && !$start;

      In the method decode_related in SOAP::Lite... In the development
      release it's in SOAP::Packager::process_related.

      If I comment that line out (or break in the debugger and set $start to
      ANYTHING), everything works fine. It appears to me that what this
      line is doing is requiring the "start" option to be present. But the
      multipart MIME RFC says it's an optional parameter:
      http://www.faqs.org/rfcs/rfc2387.html

      So basically, I want to know why $start is required, and whether this
      is a SOAP::Lite problem or if my server is omitting a necessary
      Content-Type parameter.

      Thanks!
      Andy

      P.S. Here's the whole message...

      Connection: close
      Date: Fri, 27 Jan 2006 19:36:52 GMT
      Accept: application/fastinfoset, text/html, image/gif, image/jpeg, *;
      q=.2, */*; q=.2
      Server: Apache-Coyote/1.1
      Content-Type: multipart/related; type="text/xml";
      boundary="----=_Part_23_20676128.1138390612741"
      Client-Date: Fri, 27 Jan 2006 19:36:52 GMT
      Client-Peer: 127.0.0.1:8080
      SOAPAction: ""

      ------=_Part_23_20676128.1138390612741
      Content-Type: text/xml; charset=utf-8

      <?xml version="1.0" encoding="UTF-8"?><env:Envelope
      xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:ns0="urn:com.amazon.cbs.service"
      xmlns:ns1="http://java.sun.com/jax-rpc-ri/internal"
      env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><env:Body><ns0:fetchFileResponse><result
      xsi:type="ns1:datahandler"
      href="cid:ID1"/></ns0:fetchFileResponse></env:Body></env:Envelope>
      ------=_Part_23_20676128.1138390612741
      Content-Type: application/octet-stream
      Content-Id:ID1

      ACTUAL DATA HIDDEN TO PROTECT THE INNOCENT ;)

      ------=_Part_23_20676128.1138390612741--
    • Show all 2 messages in this topic