Package org.glassfish.ejb.api

Examples of org.glassfish.ejb.api.EJBInvocation


        //does not have the jaxwsContextDelegate set
        //set it using this method
        synchronized (this) {
            addWSContextInfo(wsCtxt);
            if (inv != null && inv instanceof EJBInvocation) {
                EJBInvocation ejbInv = (EJBInvocation) inv;
                ejbInv.setWebServiceContext(wsCtxt);
            }
        }
        adapterInvInfo.setAdapter(adapter);
        return adapterInvInfo;
    }
View Full Code Here


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

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

        try {
            WebServiceContractImpl wscImpl = WebServiceContractImpl.getInstance();
            InvocationManager invManager = wscImpl.getInvocationManager();
            inv = (EJBInvocation) invManager.getCurrentInvocation();
            Method method = wsUtil.getInvMethod(
                    (com.sun.xml.rpc.spi.runtime.Tie)inv.getWebServiceTie(), context);
            inv.setWebServiceMethod(method);
            if ( !inv.authorizeWebService(method)  ) {
                throw new Exception(format(logger.getResourceBundle().getString(LogUtils.CLIENT_UNAUTHORIZED),
                        method.toString()));
            }

        } catch(Exception e) {
View Full Code Here

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

    public boolean handleRequest(MessageContext context) {
        EJBInvocation inv = null;
        try {
            WebServiceContractImpl wscImpl = WebServiceContractImpl.getInstance();
            InvocationManager invManager = wscImpl.getInvocationManager();
            inv = (EJBInvocation) 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

        //does not have the jaxwsContextDelegate set
        //set it using this method
        synchronized (this) {
            addWSContextInfo(wsCtxt);
            if (inv != null && inv instanceof EJBInvocation) {
                EJBInvocation ejbInv = (EJBInvocation) inv;
                ejbInv.setWebServiceContext(wsCtxt);
            }
        }
        adapterInvInfo.setAdapter(adapter);
        return adapterInvInfo;
    }
View Full Code Here

    public boolean isUserInRole(String role) {
        WebServiceContractImpl wscImpl = WebServiceContractImpl.getInstance();
        InvocationManager mgr = wscImpl.getInvocationManager();
        if (ComponentInvocation.ComponentInvocationType.EJB_INVOCATION.equals(mgr.getCurrentInvocation().getInvocationType())) {
           EJBInvocation inv = (EJBInvocation)mgr.getCurrentInvocation();
           boolean res = inv.isCallerInRole(role);
           return res;
        }
        // This is a servlet endpoint
        boolean ret = this.jaxwsContextDelegate.isUserInRole(role);
        //handling for webservice with WS-Security
View Full Code Here

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

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

        try {
            WebServiceContractImpl wscImpl = WebServiceContractImpl.getInstance();
            InvocationManager invManager = wscImpl.getInvocationManager();
            inv = (EJBInvocation) invManager.getCurrentInvocation();
            Method method = wsUtil.getInvMethod(
                    (com.sun.xml.rpc.spi.runtime.Tie)inv.getWebServiceTie(), context);
            inv.setWebServiceMethod(method);
            if ( !inv.authorizeWebService(method)  ) {
                throw new Exceptionformat( rb.getString ("client.unauthorized")
                        , method.toString()));
            }

        } catch(Exception e) {
View Full Code Here

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

    public boolean handleRequest(MessageContext context) {
        EJBInvocation inv = null;
        try {
            WebServiceContractImpl wscImpl = WebServiceContractImpl.getInstance();
            InvocationManager invManager = wscImpl.getInvocationManager();
            inv = (EJBInvocation) 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

        //Issue 10776 The wsCtxt created using WebServiceReferenceManagerImpl
        //does not have the jaxwsContextDelegate set
        //set it using this method
        addWSContextInfo(wsCtxt);
        if (inv != null) {
            EJBInvocation ejbInv = (EJBInvocation) inv;
            ejbInv.setWebServiceContext(wsCtxt);
        }
        adapterInvInfo.setAdapter(adapter);
        return adapterInvInfo;
    }
View Full Code Here

        //does not have the jaxwsContextDelegate set
        //set it using this method
        synchronized (this) {
            addWSContextInfo(wsCtxt);
            if (inv != null && inv instanceof EJBInvocation) {
                EJBInvocation ejbInv = (EJBInvocation) inv;
                ejbInv.setWebServiceContext(wsCtxt);
            }
        }
        adapterInvInfo.setAdapter(adapter);
        return adapterInvInfo;
    }
View Full Code Here

        // If ejb, use isCallerInRole 
        if (isContainerContextAEJBContainerObject() && roleName == null) {
            ComponentInvocation componentInvocation =
                    ConnectorRuntime.getRuntime().getInvocationManager().getCurrentInvocation();
            EJBInvocation ejbInvocation = (EJBInvocation) componentInvocation;
            EJBContext ejbcontext = ejbInvocation.getEJBContext();
            Set s = groupNameSecurityMap.keySet();
            Iterator i = s.iterator();
            while (i.hasNext()) {
                String entry = (String) i.next();
                boolean isInRole = false;
View Full Code Here

TOP

Related Classes of org.glassfish.ejb.api.EJBInvocation

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.