2 Replies Latest reply on Jan 15, 2007 10:09 AM by Thomas Diesler

    getMessageContext  ->  NOT IMPLEMENTED

    ppc Newbie

      Hi
      im using a stateless ejb3 with jsr181 as endpoint running on jboss-4.0.4.GA with EJB3-RC9FD

      the method is trying to retreiving a soap attachment with the follwing code:

      @WebService( ...)
      @SOAPBinding(style = SOAPBinding.Style.RPC)
      @Stateless
      public class Broker {
      
       @Resource
       SessionContext ctx;
      
      
       ....
       ....
      
       private DataHandler getDataHanler() throws SOAPException {
      
       SOAPMessageContext msgContext = (SOAPMessageContext)ctx.getMessageContext();
       SOAPMessage soapMessage = msgContext.getMessage();
      
       Iterator attachments = soapMessage.getAttachments();
       if (attachments.hasNext())
       {
       AttachmentPart ap = (AttachmentPart)attachments.next();
       dh=ap.getDataHandler();
      
       }
       return dh;
      
       }
      


      but jboss is throwing a NOT IMPLEMENTD...
      Caused by: java.lang.RuntimeException: NOT IMPLEMENTED
       at org.jboss.ejb3.BaseSessionContext.getMessageContext(BaseSessionContext.java:331)
       at net.nxt.core.Broker.getDataHanler(Broker.java:90)
      



      does anybody succeed to retreive an attachement for a stateless bean ?

      ppc