Package javax.xml.rpc.handler

Examples of javax.xml.rpc.handler.MessageContext


             * method.  As per the agreement between OpenEJB and the Web Service Provider
             * the MessageContex should have been passed into the container.invoke method
             * and the container should then ensure it's available via the SessionContext
             * for the duration of this call.
             */
            MessageContext messageContext = ctx.getMessageContext();

            junit.framework.Assert.assertNotNull("message context should not be null", messageContext);
            junit.framework.Assert.assertTrue("the Web Service Provider's message context should be used", messageContext instanceof FakeMessageContext);

            calls.add(Call.Bean_Invoke_BEFORE);
View Full Code Here


    }

    public MessageContext getMessageContext() throws IllegalStateException {
        check(Call.getMessageContext);
        ThreadContext threadContext = ThreadContext.getThreadContext();
        MessageContext messageContext = threadContext.get(MessageContext.class);
        if (messageContext == null) throw new IllegalStateException("Only calls on the service-endpoint have a MessageContext.");
        return messageContext;
    }
View Full Code Here

        return (SessionBeanComponent) super.getComponent();
    }

    public MessageContext getMessageContext() throws IllegalStateException {
        final InterceptorContext invocation = CurrentInvocationContext.get();
        final MessageContext context = invocation.getPrivateData(MessageContext.class);
        if (context == null) {
            throw MESSAGES.cannotCall("getMessageContext()", "MessageContext");

        }
        return context;
View Full Code Here

    }

    public MessageContext getMessageContext() throws IllegalStateException {
        check(Call.getMessageContext);
        ThreadContext threadContext = ThreadContext.getThreadContext();
        MessageContext messageContext = threadContext.get(MessageContext.class);
        if (messageContext == null) throw new IllegalStateException("Only calls on the service-endpoint have a MessageContext.");
        return messageContext;
    }
View Full Code Here

   public MessageContext getMessageContext() throws IllegalStateException
   {
      // disallowed for stateful session beans (EJB3 FR 4.4.1 p 81)
      if(beanContext instanceof StatelessBeanContext)
      {
         MessageContext ctx = ((StatelessBeanContext) beanContext).getMessageContextJAXRPC();
         if(ctx == null)
            throw new IllegalStateException("No message context found");
         return ctx;
      }
      throw new UnsupportedOperationException("Only stateless beans can have a message context");
View Full Code Here

   public MessageContext getMessageContext() throws IllegalStateException
   {
      // disallowed for stateful session beans (EJB3 FR 4.4.1 p 81)
      if(beanContext instanceof StatelessBeanContext)
      {
         MessageContext ctx = ((StatelessBeanContext) beanContext).getMessageContextJAXRPC();
         if(ctx == null)
            throw new IllegalStateException("No message context found");
         return ctx;
      }
      throw new UnsupportedOperationException("Only stateless beans can have a message context");
View Full Code Here

      {
         httpSession = context.getHttpSession();
      }
      else if ("Use MessageContext".equals(message))
      {
         MessageContext msgContext = context.getMessageContext();
         HttpServletRequest req = (HttpServletRequest)msgContext.getProperty("javax.xml.ws.servlet.request");
         httpSession = req.getSession(true);
      }
     
      log.info("echoString: " + httpSession);
      return "httpSession: " + httpSession;
View Full Code Here

*/
final class InvocationHandlerEJB21 extends AbstractInvocationHandler {

    @Override
    protected void prepareForInvocation(final InterceptorContext context, final Invocation wsInvocation) {
        final MessageContext msgContext = wsInvocation.getInvocationContext().getAttachment(MessageContext.class);
        final HandlerCallback callback = wsInvocation.getInvocationContext().getAttachment(HandlerCallback.class);
        context.putPrivateData(MessageContext.class, msgContext);
        context.putPrivateData(HandlerCallback.class, callback);
        context.putPrivateData(Invocation.class, wsInvocation);
    }
View Full Code Here

/*     */   public MessageContext getMessageContext()
/*     */     throws IllegalStateException
/*     */   {
/* 120 */     if ((this.beanContext instanceof StatelessBeanContext))
/*     */     {
/* 122 */       MessageContext ctx = ((StatelessBeanContext)this.beanContext).getMessageContextJAXRPC();
/* 123 */       if (ctx == null)
/* 124 */         throw new IllegalStateException("No message context found");
/* 125 */       return ctx;
/*     */     }
/* 127 */     throw new UnsupportedOperationException("Only stateless beans can have a message context");
View Full Code Here

    }

    public MessageContext getMessageContext() throws IllegalStateException {
        check(Call.getMessageContext);
        ThreadContext threadContext = ThreadContext.getThreadContext();
        MessageContext messageContext = threadContext.get(MessageContext.class);
        if (messageContext == null) throw new IllegalStateException("Only calls on the service-endpoint have a MessageContext.");
        return messageContext;
    }
View Full Code Here

TOP

Related Classes of javax.xml.rpc.handler.MessageContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.