Package javax.xml.ws.handler

Examples of javax.xml.ws.handler.MessageContext


   
    private static AssertionWrapper fetchSAMLAssertionFromWSSecuritySAMLToken(
        WebServiceContext wsContext
    ) {
       
        MessageContext messageContext = wsContext.getMessageContext();
        final List<WSHandlerResult> handlerResults =
            CastUtils.cast((List<?>) messageContext.get(WSHandlerConstants.RECV_RESULTS));
       
        if (handlerResults != null && handlerResults.size() > 0) {
            WSHandlerResult handlerResult = handlerResults.get(0);
            List<WSSecurityEngineResult> engineResults = handlerResult.getResults();
           
View Full Code Here


  
        // Find processed token corresponding to the URI
        if (referenceURI.charAt(0) == '#') {
            referenceURI = referenceURI.substring(1);
        }
        MessageContext messageContext = wsContext.getMessageContext();
        final List<WSHandlerResult> handlerResults =
            CastUtils.cast((List<?>) messageContext.get(WSHandlerConstants.RECV_RESULTS));
       
        if (handlerResults != null && handlerResults.size() > 0) {
            WSHandlerResult handlerResult = handlerResults.get(0);
            List<WSSecurityEngineResult> engineResults = handlerResult.getResults();
           
View Full Code Here

        }
    }
   
    public SOAPMessage invoke(SOAPMessage request) {
        try {
            final MessageContext messageContext = ctx.getMessageContext();

            ContinuationProvider contProvider =
                (ContinuationProvider) messageContext.get(ContinuationProvider.class.getName());
            final Continuation continuation = contProvider.getContinuation();
            synchronized (continuation) {
                if (continuation.isNew()) {

                    new Thread(new Runnable() {
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

             * JAX-WS MessageContex. 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 getContextData()
             * for the duration of this call.
             */
            MessageContext messageContext = (MessageContext)context.getContextData();
           
            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);

            // Try to get JAX-RPC context, should throw an exception since it's JAX-WS
View Full Code Here

        }
    }

    private boolean handleMessageInternal(SoapMessage message) {
       
        MessageContext context = createProtocolMessageContext(message);
        if (context == null) {
            return true;
        }
               
        HandlerChainInvoker invoker = getInvoker(message);
View Full Code Here

        }
    }

    private boolean handleMessageInternal(SoapMessage message) {
       
        MessageContext context = createProtocolMessageContext(message);
        if (context == null) {
            return true;
        }
               
        HandlerChainInvoker invoker = getInvoker(message);
View Full Code Here

    public final MessageContext getMessageContext() {
        return ctx;
    }

    private HttpServletRequest getHttpServletRequest() {
        MessageContext ctx = getMessageContext();
        return (ctx != null) ? (HttpServletRequest)ctx.get(HTTPConstants.MC_HTTP_SERVLETREQUEST) : null;
    }
View Full Code Here

        }
    }

    public static void storeCXfResponseContext(Message response, Map<String, Object> context) {
        if (context != null) {
            MessageContext messageContext = new WrappedMessageContext(context, null, Scope.HANDLER);
            response.put(Client.RESPONSE_CONTEXT, messageContext);

        }
    }
View Full Code Here

    protected Object invoke(Exchange exchange,
                            Object serviceObject,
                            Method m,
                            List<Object> params) {

        MessageContext ctx = ContextPropertiesMapping.createWebServiceContext(exchange);
        WebServiceContextImpl.setMessageContext(ctx);

        Object[] paramArray = new Object[] {};
        if (params != null) {
            paramArray = params.toArray();
View Full Code Here

TOP

Related Classes of javax.xml.ws.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.