Uploaded image for project: 'JBoss ESB'
  1. JBoss ESB
  2. JBESB-3813

ESB Web Service Action should support attachments

    Details

      Description

      SOAP Request looking like this for example:

      ------=_Part_0_1525155906.1338820621274
      Content-Type: text/xml; charset=utf-8
      
      <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><chap:getAuthors xmlns:chap="http://chapter8.samples.esb.soa.jboss.org/"/></SOAP-ENV:Body></SOAP-ENV:Envelope>
      ------=_Part_0_1525155906.1338820621274
      Content-Type: text/plain
      Content-ID: helloAttachment
      
      Hello World
      ------=_Part_0_1525155906.1338820621274--

      will cause following exception on JBoss SOA-P server:

      16:29:05,781 WARNING [PhaseInterceptorChain] Interceptor for {http://soa.jboss.org/FirstESBSample}FirstESBServiceService has thrown exception, unwinding now
      org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
      	at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:230)
      	at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:60)
      	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
      	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:111)
      	at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:99)
      	at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:431)
      	at org.jboss.wsf.stack.cxf.ServletControllerExt.invoke(ServletControllerExt.java:173)
      	at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:61)
      	at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:185)
      	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:179)
      	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:103)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
      	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:159)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)
      	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
      	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
      	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
      	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
      	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:599)
      	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)
      	at java.lang.Thread.run(Thread.java:679)
      Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '-' (code 45) in prolog; expected '<'
       at [row,col {unknown-source}]: [1,1]
      	at com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:648)
      	at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2047)
      	at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)
      	at com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1095)
      	at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:122)
      	... 32 more
      

      If the attachments are not used, no exception is thrown and response is returned properly.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                tcunning Thomas Cunningham
                Reporter:
                adam.kovari Adam Kovari
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: