Package javax.xml.rpc.handler

Examples of javax.xml.rpc.handler.MessageContext


            return null;
        }

  if (PolicyContextHandlerImpl.SOAP_MESSAGE.equalsIgnoreCase(key)){
            SOAPMessage soapMessage = null;
      MessageContext msgContext = inv.messageContext;

            if (msgContext != null) {
                if (msgContext instanceof SOAPMessageContext) {
        SOAPMessageContext smc =
                            (SOAPMessageContext) msgContext;
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

            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 {
        check(Call.getMessageContext);
        final ThreadContext threadContext = ThreadContext.getThreadContext();
        final 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

        // 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.
        final 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

        private SessionContext ctx;

        @AroundInvoke
        public Object invoke(final InvocationContext context) throws Exception {

            /**
             * For JAX-RPC invocations the JAX-RPC MessageContex must be
             * available in the javax.ejb.SessionContext via the getMessageContext
             * 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
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 {
        doCheck(Call.getMessageContext);
        final ThreadContext threadContext = ThreadContext.getThreadContext();
        final 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

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.