Announcement Announcement Module
Collapse
No announcement yet.
Attachments Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Attachments

    Hi,

    i wanted to include a binary attachment.

    There are several standards(MTOM, DIME, SwA) and i think that MTOM is the most supported one, right?

    I have read in the JAX-WS documentation that i can access the attachment only by calling the getter of a property. That's why i think i don't need direct acces to the SoapMessage (which means i don't need to implement MessageEndpointInterface myself).

    I use an AbstractMarshallingEndpoint, but i get exception of the SaajSoapMessageContextFactory.
    Code:
    org.springframework.ws.soap.SoapMessageCreationException: Could not create message from TransportRequest: Unable to internalize message; nested exception is com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message
    Caused by:
    com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message
     at com.sun.xml.messaging.saaj.soap.MessageImpl.init(MessageImpl.java:451)
     at com.sun.xml.messaging.saaj.soap.MessageImpl.<init>(MessageImpl.java:254)
     at com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.<init>(Message1_1Impl.java:49)
     at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl.createMessage(SOAPMessageFactory1_1Impl.java:43)
     at org.springframework.ws.soap.saaj.SaajSoapMessageContextFactory.createContext(SaajSoapMessageContextFactory.java:115)
     at org.springframework.ws.transport.http.MessageEndpointHandlerAdapter.handlePost(MessageEndpointHandlerAdapter.java:89)
     at org.springframework.ws.transport.http.MessageEndpointHandlerAdapter.handle(MessageEndpointHandlerAdapter.java:68)
     at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:806)
     at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:736)
     at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:396)
     at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:360)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
     at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
     at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
     at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
     at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
     at java.lang.Thread.run(Thread.java:595)
    Caused by: java.lang.Exception: Boundary characters encountered in part Body without a preceeding CRLF
     at com.sun.xml.messaging.saaj.packaging.mime.internet.BMMimeMultipart.find(BMMimeMultipart.java:508)
     at com.sun.xml.messaging.saaj.packaging.mime.internet.BMMimeMultipart.readBody(BMMimeMultipart.java:319)
     at com.sun.xml.messaging.saaj.packaging.mime.internet.BMMimeMultipart.getNextPart(BMMimeMultipart.java:255)
     at com.sun.xml.messaging.saaj.soap.MessageImpl.init(MessageImpl.java:405)
     ... 26 more
     
    CAUSE:
     
    java.lang.Exception: Boundary characters encountered in part Body without a preceeding CRLF
     at com.sun.xml.messaging.saaj.packaging.mime.internet.BMMimeMultipart.find(BMMimeMultipart.java:508)
     at com.sun.xml.messaging.saaj.packaging.mime.internet.BMMimeMultipart.readBody(BMMimeMultipart.java:319)
     at com.sun.xml.messaging.saaj.packaging.mime.internet.BMMimeMultipart.getNextPart(BMMimeMultipart.java:255)
     at com.sun.xml.messaging.saaj.soap.MessageImpl.init(MessageImpl.java:405)
     at com.sun.xml.messaging.saaj.soap.MessageImpl.<init>(MessageImpl.java:254)
     at com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.<init>(Message1_1Impl.java:49)
     at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl.createMessage(SOAPMessageFactory1_1Impl.java:43)
     at org.springframework.ws.soap.saaj.SaajSoapMessageContextFactory.createContext(SaajSoapMessageContextFactory.java:115)
     at org.springframework.ws.transport.http.MessageEndpointHandlerAdapter.handlePost(MessageEndpointHandlerAdapter.java:89)
     at org.springframework.ws.transport.http.MessageEndpointHandlerAdapter.handle(MessageEndpointHandlerAdapter.java:68)
     at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:806)
     at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:736)
     at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:396)
     at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:360)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
     at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
     at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
     at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
     at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
     at java.lang.Thread.run(Thread.java:595)
    What's the best way with the current SWS version to use attachments?

    Cheers,

    Ingo

  • #2
    Originally posted by res1st View Post
    Hi,
    There are several standards(MTOM, DIME, SwA) and i think that MTOM is the most supported one, right?
    As always, it depends.

    If your clients are Java older Java apps, your best bet is SwA. If it's older .NET, DIME. If it's a newer app (either .NET or Java), MTOM.

    I must honestly say that the focus so far has been on SwA. DIME is not yet supported, and I know that Atom supports MTOM, but I haven't tried it yet. I see whether I can find some time to figure MTOM out...

    Comment


    • #3
      Hi Arjen,

      thanks for your information about the Attachment-Techologies.
      My clients are newer Java- and .Net-Applications, so MTOM fits nice.

      It would be wonderful to have MTOM support in SWS, i hope you find time a little time.
      I created a feature request.

      Thanks for your great work!

      Ingo

      Comment

      Working...
      X