Examples of WebServiceContext


Examples of javax.xml.ws.WebServiceContext

    @Test
    public void testEndpoint() throws Exception {  
        GreeterImpl greeter = new GreeterImpl();
        EndpointImpl endpoint = new EndpointImpl(getBus(), greeter, (String)null);
        WebServiceContext ctx = greeter.getContext();
        assertNull(ctx);
        try {
            String address = "http://localhost:8080/test";
            endpoint.publish(address);
        } catch (IllegalArgumentException ex) {
View Full Code Here

Examples of javax.xml.ws.WebServiceContext

        serviceFactory.setServiceClass(GreeterImpl.class);
       
        EndpointImpl endpoint = new EndpointImpl(getBus(), greeter,
                                                 new JaxWsServerFactoryBean(serviceFactory));
        WebServiceContext ctx = greeter.getContext();
        assertNull(ctx);
        try {
            String address = "http://localhost:8080/test";
            endpoint.publish(address);
        } catch (IllegalArgumentException ex) {
View Full Code Here

Examples of javax.xml.ws.WebServiceContext

        org.apache.axis2.context.MessageContext msgContext =
                jaxwsMessageContext.getAxisMessageContext();
        ServiceContext serviceContext = msgContext.getServiceContext();
        SOAPMessageContext soapMessageContext = null;
        if (serviceContext != null) {
            WebServiceContext wsc =
                    (WebServiceContext)serviceContext.getProperty(WEBSERVICE_MESSAGE_CONTEXT);
            if (wsc != null) {
                soapMessageContext = (SOAPMessageContext)wsc.getMessageContext();
            }
        }
        OperationDescription op = jaxwsMessageContext.getOperationDescription();

        if (op != null && soapMessageContext != null) {
View Full Code Here

Examples of javax.xml.ws.WebServiceContext

            // Create MessageContext for current invocation.
            if (injectionDesc != null && injectionDesc.hasResourceAnnotation()) {
                javax.xml.ws.handler.MessageContext soapMessageContext =
                        createSOAPMessageContext(mc);
                //Get WebServiceContext from ServiceContext
                WebServiceContext ws =
                        (WebServiceContext)serviceContext.getProperty(WEBSERVICE_MESSAGE_CONTEXT);
                //Add the MessageContext for current invocation
                if (ws != null) {
                    updateWebServiceContext(ws, soapMessageContext);
                }
View Full Code Here

Examples of javax.xml.ws.WebServiceContext

                    callContext.setCurrentOperation(Operation.INJECTION);
                    callContext.setCurrentAllowedStates(StatelessContext.getStates());                   
                    objectRecipe.setProperty("sessionContext", new StaticRecipe(sessionContext));
                }    
               
                WebServiceContext wsContext;
                // This is a fix for GERONIMO-3444
                synchronized(this){
                    try {
                        wsContext = (WebServiceContext) ctx.lookup("java:comp/WebServiceContext");
                    } catch (NamingException e) {
View Full Code Here

Examples of javax.xml.ws.WebServiceContext

        if (this.annotationProcessor != null) {
            // assume injection was already done
            return;
        }
       
        WebServiceContext wsContext = null;
        try {
            InitialContext ctx = new InitialContext();
            wsContext = (WebServiceContext) ctx.lookup("java:comp/WebServiceContext");
        } catch (NamingException e) {
            throw new WebServiceException("Failed to lookup WebServiceContext", e);
View Full Code Here

Examples of javax.xml.ws.WebServiceContext

     * This method will provide the necessary function in order to inject
     * a WebServiceContext instance on a member of the service implementation class.
     */
    protected void performWebServiceContextInjection(MessageContext mc, Object serviceImpl)
                                                                                           throws ResourceInjectionException {
        WebServiceContext wsContext = createWebServiceContext(mc);
        // Inject WebServiceContext
        injectWebServiceContext(mc, wsContext, serviceImpl);
        saveWebServiceContext(mc, wsContext);
    }
View Full Code Here

Examples of javax.xml.ws.WebServiceContext

                                                                    throws ResourceInjectionException {
        javax.xml.ws.handler.MessageContext soapMessageContext = createSOAPMessageContext(mc);
        ServiceContext serviceContext = mc.getAxisMessageContext().getServiceContext();

        //Get WebServiceContext from ServiceContext
        WebServiceContext ws =
                (WebServiceContext) serviceContext.getProperty(WEBSERVICE_MESSAGE_CONTEXT);

        //Add the MessageContext for current invocation
        if (ws != null) {
            updateWebServiceContext(ws, soapMessageContext);
View Full Code Here

Examples of javax.xml.ws.WebServiceContext

        org.apache.axis2.context.MessageContext msgContext =
            jaxwsMessageContext.getAxisMessageContext();
        ServiceContext serviceContext = msgContext.getServiceContext();
        SOAPMessageContext soapMessageContext = null;
        if (serviceContext != null) {
            WebServiceContext wsc =
                (WebServiceContext)serviceContext.getProperty(EndpointLifecycleManagerImpl.WEBSERVICE_MESSAGE_CONTEXT);
            if (wsc != null) {
                soapMessageContext = (SOAPMessageContext)wsc.getMessageContext();
            }
        }
        return soapMessageContext;
    }
View Full Code Here

Examples of javax.xml.ws.WebServiceContext

            // This is a fix for GERONIMO-3444
            synchronized(this){
                try {
                    ctx.lookup("java:comp/WebServiceContext");
                } catch (NamingException e) {
                    WebServiceContext wsContext;
                    wsContext = new EjbWsContext(sessionContext);
                    ctx.bind("java:comp/WebServiceContext", wsContext);
                }
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.