3 Replies Latest reply on Jun 8, 2010 2:34 AM by Daniel Bevenius

    MTOM Quickstart does not work when sending MTOM/XOP messages

    Niklas Johnson Newbie

      Hi there!

       

      I am trying to use the MTOM quickstart example (webservice_mtom), but have some troubles sending/receiving MTOM messages...

       

      My setup:

      - unchanged quickstart webservice (deployment and running without problems)

      - SoapUI as webservice client

      When I use "Enable MTOM = false" within SoapUI, everything works and I get the following output:

       

      13:55:39,522 INFO  [ServiceInvoker] Badly formed EPR [EPR: PortReference < <wsa:Address http://localhost:8765/> >] for Service [MyServiceCategory:MyMTOMService] and Message [header: [  ]].Courier for EPR not supported: ESB-unaware EPR used!
      13:55:39,538 INFO  [STDOUT] [Quickstart_webservice_producer] Message before invoking jbossws endpoint:
      13:55:39,538 INFO  [STDOUT] [<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:doc="http://org.jboss.ws/xop/doclit">
         <soapenv:Header/>
         <soapenv:Body>
            <doc:echoImage>
               <!--Optional:-->
               <data>/9j/4AAQSkZJRgABAQAAAQABAAD [...]</data>
            </doc:echoImage>
         </soapenv:Body>
      </soapenv:Envelope>].
      13:55:39,555 INFO  [STDOUT] *** Received Image: BufferedImage@98046a: type = 5 ColorModel: #pixelBits = 24 numComponents = 3 color space = java.awt.color.ICC_ColorSpace@a60dc7 transparency = 1 has alpha = false isAlphaPre = false ByteInterleavedRaster: width = 120 height = 100 #numDataElements 3 dataOff[0] = 2
      13:55:39,555 INFO  [STDOUT] [Quickstart_webservice_producer] Message after invoking jbossws endpoint:
      13:55:39,555 INFO  [STDOUT] [<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>

           <env:Header></env:Header>

           <env:Body>

           <ns1:echoImageResponse xmlns:ns1="http://org.jboss.ws/xop/doclit">

                <data>iVBORw0KGgo [...]</data>

           </ns1:echoImageResponse>

      </env:Body></env:Envelope>].

       

       

      However, if I set "Enable MTOM = true" within SoapUI, it does not receive the image properly:

       

      02:49,299 INFO  [STDOUT] [Quickstart_webservice_producer] Message before invoking jbossws endpoint:
      14:02:49,299 INFO  [STDOUT] [
      ------=_Part_5_25791378.1275480169237
      Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
      Content-Transfer-Encoding: 8bit
      Content-ID: <rootpart@soapui.org>

       

      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:doc="http://org.jboss.ws/xop/doclit">
         <soapenv:Header/>
         <soapenv:Body>
            <doc:echoImage>
               <!--Optional:-->
               <data><inc:Include href="cid:902106978219" xmlns:inc="http://www.w3.org/2004/08/xop/include"/></data>
            </doc:echoImage>
         </soapenv:Body>
      </soapenv:Envelope>
      ------=_Part_5_25791378.1275480169237
      Content-Type: images/x-png
      Content-Transfer-Encoding: binary
      Content-ID: <902106978219>

       

      ÿØÿà (Binary data...)

       

      ------=_Part_5_25791378.1275480169237--
      ].
      14:02:49,331 INFO  [STDOUT] *** Received Image: null
      14:02:49,331 INFO  [STDOUT] [Quickstart_webservice_producer] Message after invoking jbossws endpoint:
      14:02:49,331 INFO  [STDOUT] [<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header></env:Header><env:Body><ns1:echoImageResponse xmlns:ns1="http://org.jboss.ws/xop/doclit"/></env:Body></env:Envelope>].

       

      Do you have any idea what the problem is?! Any help very much appreciated!!!