Package javax.xml.rpc.handler

Examples of javax.xml.rpc.handler.MessageContext


        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


   }

   private org.jboss.invocation.Invocation getMBeanInvocation(Invocation inv)
   {
      // EJB2.1 endpoints will only get an JAXRPC context
      MessageContext msgContext = inv.getInvocationContext().getAttachment(MessageContext.class);
      if (msgContext == null)
         throw new IllegalStateException("Cannot obtain MessageContext");

      SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
      SecurityAdaptor securityAdaptor = spiProvider.getSPI(SecurityAdaptorFactory.class).newSecurityAdapter();
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

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

                        "WSS0761.context.not.instanceof.servletendpointcontext", ex);
                throw new XWSSecurityException(ex);
            }
        } else if (context instanceof ServletEndpointContext) {
           
            MessageContext msgContext = ((ServletEndpointContext)context).getMessageContext();
            if (msgContext != null) {
                Subject subject =(Subject)msgContext.getProperty(MessageConstants.AUTH_SUBJECT);
                return subject;
               
            } else {
                return null;
            }
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.