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

Re: [soaplite] soap::lite response message headers

Expand Messages
  • Byrne Reese
    Please consult: As odd as it may look, that is perfectly normal. The first group of headers are HTTP headers. The second group is MIME headers. One thing may
    Message 1 of 3 , Nov 10, 2004
    • 0 Attachment
      Please consult:

      As odd as it may look, that is perfectly normal. The first group of
      headers are HTTP headers. The second group is MIME headers.

      One thing may be the root cause of this... You need to upgrade your
      version of MIME::Tools, which supports the

      local $MIME::Entity::BOUNDARY_DELIMITER = "\r\n";

      hack. Axis is one of the few toolkits that strictly follows the MIME
      standard. As a result, it fails to interoperate with SOAP::Lite because
      it terminates boundary delimitters with "\n" when it SHOULD be "\r\n".

      The requisite version is: 6.200_02.

      http://www.zeegee.com/code/perl/MIME-tools/download/MIME-tools-6.200_02.tar.gz

      grp_member wrote:

      >
      > Hi all,
      >
      > I have deployed a soap::lite service and the response is as below.
      > An Axis 1.1 client is having difficulty interpreting this response.
      > We believe it is because the headers are spaced out - the extra
      > headers (below) are being interpreted as the start of the
      > body/content (Axis is complaining about not finding the boundary or
      > something similar). Interestingly an Axis 1.0 client tested a while
      > back did not have any issues with the same service.
      >
      > First has anyone seen this/similar problem like this and know a fix?
      > Second, I would like to try and remove or merge the extra headers
      > with main headers. Does anyone know how to do this?
      >
      > I am using SOAP::Lite 0.60 and MIME-Tools 4.11. Any help would be
      > appreciated.
      >
      > SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK
      > Connection: close
      > Date: Wed, 10 Nov 2004 05:35:05 GMT
      > Server: Apache/1.3.27 (Unix) (Red-Hat/Linux) mod_ssl/2.8.12
      > OpenSSL/0.9.6b mod_perl/1.26
      > Content-Length: 1738
      > Content-Type: multipart/related; type="text/xml";
      > start="<main_envelope>"; boundary="----------=_1100064064-16555-0"
      > Client-Date: Wed, 10 Nov 2004 05:30:58 GMT
      > Client-Response-Num: 1
      > Client-SSL-Cert-Issuer: XXX
      > Services/CN=XXX
      > Client-SSL-Cert-Subject: XXX
      > Client-SSL-Cipher: EDH-RSA-DES-CBC3-SHA
      > Client-SSL-Warning: Peer certificate not verified
      > SOAPServer: SOAP::Lite/Perl/0.60
      > X-Cache: MISS from XXX <--- end of main headers
      >
      > Content-Type: Multipart/Related; boundary="----------=_1100064064-
      > 16555-0" <--- extra headers (exh)
      > Content-Transfer-Encoding: binary <--- exh
      > MIME-Version: 1.0 <--- exh
      > X-Mailer: MIME-tools 5.411 (Entity 5.404) <--- exh
      > <--- exh
      > This is a multi-part message in MIME format... <---exh
      >
      > ------------=_1100064064-16555-0 <--- body
      > Content-Type: text/xml
      > Content-Disposition: inline
      > Content-Transfer-Encoding: 8bit
      > Content-Location: /main_envelope
      > Content-Id: <main_envelope>
      >
      > <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
      > xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-
      > ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-
      > ENV="http://schemas.xmlsoap.org/soap/envelope/"
      > xmlns:xsd="http://www.w3.org/1999/XMLSchema" SOAP-
      > ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-
      > ENV:Body><namesp1:XXXResponse xmlns:namesp1="urn:XXX"><retParam
      > xsi:type="xsd:int">383</retParam></namesp1:XXXResponse></SOAP-
      > ENV:Body></SOAP-ENV:Envelope>
      > ------------=_1100064064-16555-0
      > Content-Type: application/x-gzip; name="prefix_wk43.txt.gz"
      > Content-Disposition: attachment; filename="prefix_wk43.txt.gz"
      > Content-Transfer-Encoding: base64
      > Content-Id: <1234>
      > MIME-Version: 1.0
      > X-Mailer: MIME-tools 5.411 (Entity 5.404)
      >
      > ...blah...
      >
      > ------------=_1100064064-16555-0--
      >
      > Regards
      > grp_member
      >
      >
      >
      >
      > *Yahoo! Groups Sponsor*
      > <http://us.ard.yahoo.com/SIG=129iak9tl/M=281955.5530326.6602771.3001176/D=groups/S=1705701014:HM/EXP=1100197956/A=2343726/R=0/SIG=12ij03700/*http://clk.atdmt.com/VON/go/yhxxxvon01900091von/direct/01/&time=1100111556544366>
      >
      >
      > Get unlimited calls to
      >
      > U.S./Canada
      >
      > <http://us.ard.yahoo.com/SIG=129iak9tl/M=281955.5530326.6602771.3001176/D=groups/S=1705701014:HM/EXP=1100197956/A=2343726/R=1/SIG=12ij03700/*http://clk.atdmt.com/VON/go/yhxxxvon01900091von/direct/01/&time=1100111556544366>
      >
      >
      >
      > ------------------------------------------------------------------------
      > *Yahoo! Groups Links*
      >
      > * To visit your group on the web, go to:
      > http://groups.yahoo.com/group/soaplite/
      >
      > * To unsubscribe from this group, send an email to:
      > soaplite-unsubscribe@yahoogroups.com
      > <mailto:soaplite-unsubscribe@yahoogroups.com?subject=Unsubscribe>
      >
      > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
      > Service <http://docs.yahoo.com/info/terms/>.
      >
      >
    • grp_member
      Hi, Thanks for your suggestions Byrne and Duncan. I have tried both MIME::Tools 6.200_02(development - discontinued) and 5.415 (latest) releases with - local
      Message 2 of 3 , Nov 11, 2004
      • 0 Attachment
        Hi,

        Thanks for your suggestions Byrne and Duncan.

        I have tried both MIME::Tools 6.200_02(development - discontinued)
        and 5.415 (latest) releases with -

        local $MIME::Entity::BOUNDARY_DELIMITER = "\r\n";
        my $ent = build MIME::Entity
        'Id' => "<1234>",
        'Type' => "application/x-gzip",
        ...

        as part of my soap::lite server, but no luck. The Response is always
        the same with the MIME headers seperated from the HTTP headers as
        below.

        Attachment Response snipet:
        X-Cache: MISS from XXX <--- end of main headers
        <--- gap
        Content-Type: Multipart/Related; boundary="----------=_1100064064-
        16555-0" <--- mime headers (exh)
        Content-Transfer-Encoding: binary
        MIME-Version: 1.0
        X-Mailer: MIME-tools 5.411 (Entity 5.404)
        <--- gap
        This is a multi-part message in MIME format... <---?? (Content-
        Description:?)
        <--- gap (ok)
        ------------=_1100064064-16555-0 <--- body

        Is there any way to manage these Header. I would like to remove all
        the gaps (except last) present / manage these headers. Is this
        possible with MIME::Tools or otherwise?

        Does anyone know of an Axis 1.1 client using soap::lite with
        attachments successfully? What are we doing wrong.

        This we believe seems to cause Axis 1.1 client problems. The Axis
        error is :

        InvocationTargetException:
        java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
        Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance
        (NativeConstructorAccessorImpl.java:39)
        ...
        at java.lang.reflect.Method.invoke(Method.java:324)
        at com.intellij.rt.execution.application.AppMain.mai(AppMain.java:78)
        Caused by: Error reading data stream: Error in MIME data stream,
        start boundary not found, expected: ------------=_1100215357-1573-0

        at org.apache.axis.attachments.MultiPartRelatedInputStream.<init>
        (MultiPartRelatedInputStream.java:371)at
        org.apache.axis.attachments.AttachmentsImpl.<init>
        (AttachmentsImpl.java:145)
        ... 25 more

        Any help would be appreciated.

        Thanks
        grp_member

        --- In soaplite@yahoogroups.com, Byrne Reese <byrne@m...> wrote:
        > Please consult:
        >
        > As odd as it may look, that is perfectly normal. The first group
        of
        > headers are HTTP headers. The second group is MIME headers.
        >
        > One thing may be the root cause of this... You need to upgrade
        your
        > version of MIME::Tools, which supports the
        >
        > local $MIME::Entity::BOUNDARY_DELIMITER = "\r\n";
        >
        > hack. Axis is one of the few toolkits that strictly follows the
        MIME
        > standard. As a result, it fails to interoperate with SOAP::Lite
        because
        > it terminates boundary delimitters with "\n" when it SHOULD
        be "\r\n".
        >
        > The requisite version is: 6.200_02.
        >
        > http://www.zeegee.com/code/perl/MIME-tools/download/MIME-tools-
        6.200_02.tar.gz
        >
        > grp_member wrote:
        >
        > >
        > > Hi all,
        > >
        > > I have deployed a soap::lite service and the response is as
        below.
        > > An Axis 1.1 client is having difficulty interpreting this
        response.
        > > We believe it is because the headers are spaced out - the extra
        > > headers (below) are being interpreted as the start of the
        > > body/content (Axis is complaining about not finding the boundary
        or
        > > something similar). Interestingly an Axis 1.0 client tested a
        while
        > > back did not have any issues with the same service.
        > >
        > > First has anyone seen this/similar problem like this and know a
        fix?
        > > Second, I would like to try and remove or merge the extra headers
        > > with main headers. Does anyone know how to do this?
        > >
        > > I am using SOAP::Lite 0.60 and MIME-Tools 4.11. Any help would be
        > > appreciated.
        > >
        > > SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK
        > > Connection: close
        > > Date: Wed, 10 Nov 2004 05:35:05 GMT
        > > Server: Apache/1.3.27 (Unix) (Red-Hat/Linux) mod_ssl/2.8.12
        > > OpenSSL/0.9.6b mod_perl/1.26
        > > Content-Length: 1738
        > > Content-Type: multipart/related; type="text/xml";
        > > start="<main_envelope>"; boundary="----------=_1100064064-16555-
        0"
        > > Client-Date: Wed, 10 Nov 2004 05:30:58 GMT
        > > Client-Response-Num: 1
        > > Client-SSL-Cert-Issuer: XXX
        > > Services/CN=XXX
        > > Client-SSL-Cert-Subject: XXX
        > > Client-SSL-Cipher: EDH-RSA-DES-CBC3-SHA
        > > Client-SSL-Warning: Peer certificate not verified
        > > SOAPServer: SOAP::Lite/Perl/0.60
        > > X-Cache: MISS from XXX <--- end of main headers
        > >
        > > Content-Type: Multipart/Related; boundary="----------
        =_1100064064-
        > > 16555-0" <--- extra headers (exh)
        > > Content-Transfer-Encoding: binary <--- exh
        > > MIME-Version: 1.0 <--- exh
        > > X-Mailer: MIME-tools 5.411 (Entity 5.404) <--- exh
        > > <--- exh
        > > This is a multi-part message in MIME format... <---exh
        > >
        > > ------------=_1100064064-16555-0 <--- body
        > > Content-Type: text/xml
        > > Content-Disposition: inline
        > > Content-Transfer-Encoding: 8bit
        > > Content-Location: /main_envelope
        > > Content-Id: <main_envelope>
        > >
        > > <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
        > > xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-
        > > ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-
        > > ENV="http://schemas.xmlsoap.org/soap/envelope/"
        > > xmlns:xsd="http://www.w3.org/1999/XMLSchema" SOAP-
        > >
        ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-
        > > ENV:Body><namesp1:XXXResponse xmlns:namesp1="urn:XXX"><retParam
        > > xsi:type="xsd:int">383</retParam></namesp1:XXXResponse></SOAP-
        > > ENV:Body></SOAP-ENV:Envelope>
        > > ------------=_1100064064-16555-0
        > > Content-Type: application/x-gzip; name="prefix_wk43.txt.gz"
        > > Content-Disposition: attachment; filename="prefix_wk43.txt.gz"
        > > Content-Transfer-Encoding: base64
        > > Content-Id: <1234>
        > > MIME-Version: 1.0
        > > X-Mailer: MIME-tools 5.411 (Entity 5.404)
        > >
        > > ...blah...
        > >
        > > ------------=_1100064064-16555-0--
        > >
        > > Regards
        > > grp_member
        > >
        > >
        > >
        > >
        > > *Yahoo! Groups Sponsor*
        > >
        <http://us.ard.yahoo.com/SIG=129iak9tl/M=281955.5530326.6602771.30011
        76/D=groups/S=1705701014:HM/EXP=1100197956/A=2343726/R=0/SIG=12ij0370
        0/*http://clk.atdmt.com/VON/go/yhxxxvon01900091von/direct/01/&time=11
        00111556544366>
        > >
        > >
        > > Get unlimited calls to
        > >
        > > U.S./Canada
        > >
        > >
        <http://us.ard.yahoo.com/SIG=129iak9tl/M=281955.5530326.6602771.30011
        76/D=groups/S=1705701014:HM/EXP=1100197956/A=2343726/R=1/SIG=12ij0370
        0/*http://clk.atdmt.com/VON/go/yhxxxvon01900091von/direct/01/&time=11
        00111556544366>
        > >
        > >
        > >
        > > -----------------------------------------------------------------
        -------
        > > *Yahoo! Groups Links*
        > >
        > > * To visit your group on the web, go to:
        > > http://groups.yahoo.com/group/soaplite/
        > >
        > > * To unsubscribe from this group, send an email to:
        > > soaplite-unsubscribe@yahoogroups.com
        > > <mailto:soaplite-unsubscribe@yahoogroups.com?
        subject=Unsubscribe>
        > >
        > > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
        > > Service <http://docs.yahoo.com/info/terms/>.
        > >
        > >
      Your message has been successfully submitted and would be delivered to recipients shortly.