Package javax.xml.rpc.handler

Examples of javax.xml.rpc.handler.MessageContext


    * @return configured JBoss invocation
    */
   private org.jboss.invocation.Invocation getMBeanInvocation(final Invocation wsInvocation)
   {
      // ensure preconditions
      final MessageContext msgContext = wsInvocation.getInvocationContext().getAttachment(MessageContext.class);
      if (msgContext == null)
      {
         throw new IllegalStateException("Cannot obtain MessageContext");
      }

View Full Code Here


        // web service provider.  The web serivce provider needs supply
        // the MessageContext and an interceptor to do the marshalling as
        // the arguments of the standard container.invoke signature.

        // So let's create a fake message context.
        MessageContext messageContext = new FakeMessageContext();

        // Now let's create a fake interceptor as would be supplied by the
        // web service provider.  Instead of writing "fake" marshalling
        // code that would pull the arguments from the soap message, we'll
        // just give it the argument values directly.
View Full Code Here

             * 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 (EJBObject) EjbObjectProxyHandler.createProxy(di, threadContext.getPrimaryKey(), InterfaceType.EJB_OBJECT);
        }

        public MessageContext getMessageContext() throws IllegalStateException {
            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

*/
final class InvocationHandlerEJB21 extends AbstractInvocationHandlerEJB {

    @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
   {
      // 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

        // web service provider.  The web serivce provider needs supply
        // the MessageContext and an interceptor to do the marshalling as
        // the arguments of the standard container.invoke signature.

        // So let's create a fake message context.
        MessageContext messageContext = new FakeMessageContext();

        // Now let's create a fake interceptor as would be supplied by the
        // web service provider.  Instead of writing "fake" marshalling
        // code that would pull the arguments from the soap message, we'll
        // just give it the argument values directly.
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.