2 Replies Latest reply on May 18, 2009 10:46 AM by andrew hurst

    Problem with PHP - maybe MIME?

    andrew hurst Newbie

      Hi,

       

      Bit of a long shot but we're not sure what to do next.

       

      Since we changed to use CXF our PHP clients are having problems to handle the replies from CXF.

       

      The error from their SOAP libraries are:

       

       

        => looks like we got no XML document

          => Client

          => http://schemas.xmlsoap.org/soap/envelope/

       

      Our suspicion is that the XML is sent back in MIME format rather than pure XML. Can anyone comment if this could be true or whether it's possible to configure CXF to use plain XML/HTTP?

       

      Here is the logging from the server side (CXF):

      org.apache.cxf.interceptor.LoggingOutInterceptor INFO   - Outbound Message

      -


      ID: 4

      Encoding: UTF-8

      Content-Type: multipart/related; type="application/xopxml"; boundary="----=_Part_0_1603928569.1242653675493"; start="<root.message@cxf.apache.org>"; start-info="application/soapxml"

      Headers: {}

      Payload:

      -


      =_Part_0_1603928569.1242653675493

      Content-Type: application/xopxml; charset=UTF-8; type="application/soapxml";

      Content-Transfer-Encoding: binary

      Content-ID:

      -


      =_Part_0_1603928569.1242653675493--

      -


       

      Thanks

      Andrew

        • 1. Re: Problem with PHP - maybe MIME?
          Daniel Kulp Newbie

          It SOUNDs like one of two things:

           

          1) You have MTOM enabled.   Usually this is via config somehow, but can also be enabled via an @MTOM annotation.

           

          2) The WSDL that is used contains a MIME binding and thus Soap w/ attachments is turned on.

           

           

          Normally, CXF doesn't put the response into MIME form unless one of the above is true.

          • 2. Re: Problem with PHP - maybe MIME?
            andrew hurst Newbie

            Hi,

             

            Thanks a lot, mtom was enabled on the jaxws endpoint. I disabled it and now it is as expected:

             

            <jaxws:binding>

                        <soap:soapBinding mtomEnabled="false" version="1.2"/>

                    </jaxws:binding>

             

             

            org.apache.cxf.interceptor.LoggingOutInterceptor INFO   - Outbound Message

            -


            ID: 2

            Encoding: UTF-8

            Content-Type: application/soap+xml

            Headers: {}

            Payload:

             

            BRegards

            Andrew