Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-6355

jbossws client side adding \0 null chars to end of mtom attachment

XMLWordPrintable

    • Not Required
    • NEW

      JBossWS Client sending a transfer object containing javax.xml.transform.Source as an mtom attachment is adding null (\0) bytes at the end of the message. When the WS on the server side pulls the Source out and tries to transform it, it throws this exception: javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: Content is not allowed in trailing section.

      @XmlAccessorType(XmlAccessType.FIELD)
      @XmlType(name = "", propOrder =

      { "source" }

      )
      @XmlRootElement(name = "ExampleXMLAttachment")
      public class ExampleXMLAttachment {
      @XmlElement(name = "source", required = true)
      @XmlMimeType("text/xml")
      protected Source source;

      public Source getSource()

      { return source; }

      public void setSource(Source source)

      { this.source = source; }

      }

      17:30:49,634 ERROR [STDERR] [Fatal Error] :42:16: Content is not allowed in trailing section.
      17:30:49,635 ERROR [STDERR] javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: Content is not allowed in trailing section.
      17:30:49,635 ERROR [STDERR] at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:500)
      17:30:49,635 ERROR [STDERR] at com.jboss.examples.ws.mtom.MtomAttachmentEndpointBean.parseXML(MtomAttachmentEndpointBean.java:84)
      17:30:49,635 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      17:30:49,635 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      17:30:49,636 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      17:30:49,636 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
      17:30:49,636 ERROR [STDERR] at org.jboss.wsf.container.jboss50.invocation.InvocationHandlerJSE.invoke(InvocationHandlerJSE.java:120)
      17:30:49,636 ERROR [STDERR] at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:240)
      17:30:49,636 ERROR [STDERR] at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:468)
      17:30:49,636 ERROR [STDERR] at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:293)
      17:30:49,636 ERROR [STDERR] at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:203)
      17:30:49,636 ERROR [STDERR] at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:129)
      17:30:49,636 ERROR [STDERR] at org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:85)
      17:30:49,636 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      17:30:49,636 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      17:30:49,636 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      17:30:49,636 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      17:30:49,636 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      17:30:49,636 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      17:30:49,636 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
      17:30:49,637 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      17:30:49,637 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)
      17:30:49,637 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
      17:30:49,637 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
      17:30:49,637 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
      17:30:49,637 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      17:30:49,637 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      17:30:49,637 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
      17:30:49,637 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      17:30:49,637 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
      17:30:49,637 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
      17:30:49,637 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
      17:30:49,637 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)
      17:30:49,637 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619)
      17:30:49,638 ERROR [STDERR] Caused by: org.xml.sax.SAXParseException: Content is not allowed in trailing section.
      17:30:49,638 ERROR [STDERR] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      17:30:49,638 ERROR [STDERR] at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:483)
      17:30:49,638 ERROR [STDERR] ... 33 more
      17:30:49,638 ERROR [STDERR] ---------
      17:30:49,638 ERROR [STDERR] org.xml.sax.SAXParseException: Content is not allowed in trailing section.
      17:30:49,638 ERROR [STDERR] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      17:30:49,638 ERROR [STDERR] at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:483)
      17:30:49,638 ERROR [STDERR] at com.jboss.examples.ws.mtom.MtomAttachmentEndpointBean.parseXML(MtomAttachmentEndpointBean.java:84)
      17:30:49,638 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      17:30:49,638 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      17:30:49,639 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      17:30:49,639 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
      17:30:49,639 ERROR [STDERR] at org.jboss.wsf.container.jboss50.invocation.InvocationHandlerJSE.invoke(InvocationHandlerJSE.java:120)
      17:30:49,639 ERROR [STDERR] at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:240)
      17:30:49,639 ERROR [STDERR] at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:468)
      17:30:49,639 ERROR [STDERR] at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:293)
      17:30:49,639 ERROR [STDERR] at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:203)
      17:30:49,639 ERROR [STDERR] at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:129)
      17:30:49,639 ERROR [STDERR] at org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:85)
      17:30:49,639 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      17:30:49,639 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      17:30:49,639 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      17:30:49,639 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      17:30:49,639 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      17:30:49,639 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      17:30:49,639 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
      17:30:49,639 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      17:30:49,639 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)
      17:30:49,639 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
      17:30:49,639 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
      17:30:49,639 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
      17:30:49,639 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      17:30:49,639 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      17:30:49,640 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
      17:30:49,640 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      17:30:49,640 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
      17:30:49,640 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
      17:30:49,640 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
      17:30:49,640 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)
      17:30:49,640 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619)

              rhn-support-bmaxwell Brad Maxwell
              rhn-support-bmaxwell Brad Maxwell
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: