Package com.sun.enterprise.web

Examples of com.sun.enterprise.web.WebComponentInvocation


    public QName[] getHeaders() {
        return new QName[0];
    }

    public boolean handleRequest(MessageContext context) {
        WebComponentInvocation inv = null;

        try {
            WebServiceContractImpl wscImpl = WebServiceContractImpl.getInstance();
            InvocationManager invManager = wscImpl.getInvocationManager();
            inv = (WebComponentInvocation) invManager.getCurrentInvocation();
            com.sun.xml.rpc.spi.runtime.Tie tie =
                    (com.sun.xml.rpc.spi.runtime.Tie) inv.getWebServiceTie();
            if (tie == null) {
                Implementor implementor = (Implementor)
                        context.getProperty(MessageContextProperties.IMPLEMENTOR);
                tie = implementor.getTie();
                inv.setWebServiceTie(tie);
            }
            inv.setWebServiceMethod(wsUtil.getInvMethod(tie, context));

        } catch(Exception e) {
            logger.log(Level.WARNING, format(rb.getString("preWebHandlerError"), e.toString()));
            wsUtil.throwSOAPFaultException(e.getMessage(), context);
        }
View Full Code Here


    public QName[] getHeaders() {
        return new QName[0];
    }

    public boolean handleRequest(MessageContext context) {
        WebComponentInvocation inv = null;

        try {
            WebServiceContractImpl wscImpl = WebServiceContractImpl.getInstance();
            InvocationManager invManager = wscImpl.getInvocationManager();
            inv = (WebComponentInvocation) invManager.getCurrentInvocation();
            Method webServiceMethodInPreHandler = inv.getWebServiceMethod();
            if( webServiceMethodInPreHandler != null ) {
                // Now that application handlers have run, do another method
                // lookup and compare the results with the original one.  This
                // ensures that the application handlers have not changed
                // the message context in any way that would impact which
                // method is invoked.
                Method postHandlerMethod = wsUtil.getInvMethod(
                        (com.sun.xml.rpc.spi.runtime.Tie)inv.getWebServiceTie(), context);
                if( !webServiceMethodInPreHandler.equals(postHandlerMethod) ) {
                    throw new UnmarshalException("Original method " + webServiceMethodInPreHandler +
                            " does not match post-handler method ");
                }
            }
View Full Code Here

      }
        }
        // END OF IASRI 4713234
        // END IASRI 4688449

        ComponentInvocation inv = new WebComponentInvocation(wm, instance);
        try {
            im.preInvoke(inv);
            if (eventType == InstanceEvent.EventType.BEFORE_SERVICE_EVENT) {
                // Emit monitoring probe event
                wm.beforeServiceEvent(event.getWrapper().getName());
                // enlist resources with TM for service method
                Transaction tran;
                if ((tran = tm.getTransaction()) != null) {
                    inv.setTransaction(tran);
                }
                tm.enlistComponentResources();
            }
        } catch (Exception ex) {
            im.postInvoke(inv); // See CR 6920895
View Full Code Here

                "containerListener.exceptionDuringHandleEvent");
            msg = MessageFormat.format(msg, new Object[] { eventType, wm });
            _logger.log(Level.SEVERE, msg, ie);
        }

        ComponentInvocation inv = new WebComponentInvocation(wm, instance);
        try {
            im.postInvoke(inv);
        } catch (Exception ex) {
            String msg = _rb.getString(
                "containerListener.exceptionDuringHandleEvent");
View Full Code Here

        }
    }

    private void preInvoke(WebModule ctx) {
        WebModule wm = (WebModule)ctx;
        ComponentInvocation inv = new WebComponentInvocation(wm);
        invocationMgr.preInvoke(inv);
    }
View Full Code Here

        invocationMgr.preInvoke(inv);
    }

    private void postInvoke(WebModule ctx) {
        WebModule wm = (WebModule)ctx;
        ComponentInvocation inv = new WebComponentInvocation(wm);
        invocationMgr.postInvoke(inv);
    }
View Full Code Here

        }
    }

    private void preInvoke(WebModule ctx) {
        WebModule wm = (WebModule)ctx;
        ComponentInvocation inv = new WebComponentInvocation(wm);
        invocationMgr.preInvoke(inv);
    }
View Full Code Here

        invocationMgr.preInvoke(inv);
    }

    private void postInvoke(WebModule ctx) {
        WebModule wm = (WebModule)ctx;
        ComponentInvocation inv = new WebComponentInvocation(wm);
        invocationMgr.postInvoke(inv);
    }
View Full Code Here

            final String uri = wsEndpointDescriptor.getURI();
            final Adapter adapter =
                    JAXWSAdapterRegistry.getInstance().getAdapter(wsEndpointDescriptor.getContextRoot(), uri, uri);

            final WebModule webModule = AppServRegistry.getWebModule(wsEndpointDescriptor.getWSServiceEndpoint());
            final ComponentInvocation invocation = new WebComponentInvocation(webModule);

            return new Web109Adapter(wsEndpointDescriptor.getWSServiceName().toString(),
                wsPath,
                adapter.getEndpoint(),
                new ServletFakeArtifactSet(wsEndpointDescriptor.getRequestURL(), wsEndpointDescriptor.getUrlPattern()),
View Full Code Here

        ComponentInvocation inv;
        if (eventType == InstanceEvent.EventType.BEFORE_INIT_EVENT) {
          // The servletName is not avaiable from servlet instance before servlet init.
          // We have to pass the servletName to ComponentInvocation so it can be retrieved
          // in RealmAdapter.getServletName().
          inv = new WebComponentInvocation(wm, instance, event.getWrapper().getName());
        } else {
          inv = new WebComponentInvocation(wm, instance);
        }
       
        try {
            im.preInvoke(inv);
            if (eventType == InstanceEvent.EventType.BEFORE_SERVICE_EVENT) {
View Full Code Here

TOP

Related Classes of com.sun.enterprise.web.WebComponentInvocation

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.