Package com.sun.enterprise.webservice.monitoring

Examples of com.sun.enterprise.webservice.monitoring.Endpoint


         /**
         * This requirement came from the jbi team. If the WebServiceEndpoint
         * is a jbi endpoint which is private throw an error whenever a get
         * or a post request is made
         */
        Endpoint endpt = wsEngine_.getEndpoint(request.getServletPath());
        if (endpt != null) {
            if((endpt.getDescriptor() != null) &&(endpt.getDescriptor().isJBIPrivate())) {
            String message = endpt.getDescriptor().getWebService().getName()+
                    " is a JBI private service; Access is denied.";
            response.setContentType("text/xml");
            (new WsUtil()).writeInvalidMethodType(response, message);
            return;
            }
        }
        if (("Tester".equalsIgnoreCase(request.getQueryString())) &&
             (!(HTTPBinding.HTTP_BINDING.equals(endpoint.getProtocolBinding())))) {
           
            if (endpt!=null && Boolean.parseBoolean(endpt.getDescriptor().getDebugging())) {
                WebServiceTesterServlet.invoke(request, response,
                        endpt.getDescriptor());
                return;
            }
        }       
       
        // lookup registered URLs and get the appropriate adapter;
View Full Code Here


         /**
         * This requirement came from the jbi team. If the WebServiceEndpoint
         * is a jbi endpoint which is private throw an error whenever a get
         * or a post request is made
         */
        Endpoint endpt = wsEngine_.getEndpoint(request.getServletPath());
        if((endpt != null) ) {
            if ((endpt.getDescriptor() != null) && (endpt.getDescriptor().isJBIPrivate())) {
                String message = endpt.getDescriptor().getWebService().getName() +
                        " is a JBI private service; Access is denied.";
                response.setContentType("text/xml");
                (new WsUtil()).writeInvalidMethodType(response, message);
                return;
            }
        }

        if (("Tester".equalsIgnoreCase(request.getQueryString())) &&
            (!(HTTPBinding.HTTP_BINDING.equals(endpoint.getProtocolBinding())))) {
           
           
            if((endpt != null) && ((endpt.getDescriptor().isSecure()) ||
               (endpt.getDescriptor().getMessageSecurityBinding() != null||
                endpoint.hasSecurePipeline())) {
                String message = endpt.getDescriptor().getWebService().getName() +
                    "is a secured web service; Tester feature is not supported for secured services";
                (new WsUtil()).writeInvalidMethodType(response, message);               
                return;
            }
           
             if (endpt != null)  {
                if ((endpt.getDescriptor() != null) && (endpt.getDescriptor().isJBIPrivate())) {
                    String message = endpt.getDescriptor().getWebService().getName() +
                            " is a JBI private service; Access is denied.";
                    response.setContentType("text/xml");
                    (new WsUtil()).writeInvalidMethodType(response, message);
                    return;
                }
            }

            if (endpt!=null && Boolean.parseBoolean(endpt.getDescriptor().getDebugging())) {
                Loader loader = (Loader) endpt.getDescriptor().getBundleDescriptor().getExtraAttribute("WEBLOADER");
                if (loader != null) {
                    endpt.getDescriptor().getBundleDescriptor().setClassLoader(loader.getClassLoader());
                    endpt.getDescriptor().getBundleDescriptor().removeExtraAttribute("WEBLOADER");
                }
                WebServiceTesterServlet.invoke(request, response,
                        endpt.getDescriptor());
                return;
            }
        }
       
        // If it is not a "Tester request" and it is not a WSDL request,
View Full Code Here

        HttpServletResponse httpResponse =
                (HttpServletResponse) request.get(javax.xml.ws.handler.MessageContext.SERVLET_RESPONSE);

        String messageId=null;
        if (wsEngine.getGlobalMessageListener()!=null) {
            Endpoint endpt;
            if(endpoint.implementedByWebComponent()) {
                endpt = wsEngine.getEndpoint(httpRequest.getServletPath());
            } else {
                endpt = wsEngine.getEndpoint(httpRequest.getRequestURI());
            }            
            messageId = wsEngine.preProcessRequest(endpt)
            if (messageId!=null) {
                ctxt.put(EndpointImpl.MESSAGE_ID, messageId);
                ThreadLocalInfo config = new ThreadLocalInfo(messageId, httpRequest);
                wsEngine.getThreadLocal().set(config);
            }
        }
                               
        JAXWSEndpointImpl endpt = null;
        try {
            if (wsEngine.getGlobalMessageListener()!=null) {
                if(endpoint.implementedByWebComponent()) {
                    endpt =
                        (JAXWSEndpointImpl)wsEngine.getEndpoint(httpRequest.getServletPath());
                } else {
                    endpt =
                        (JAXWSEndpointImpl)wsEngine.getEndpoint(httpRequest.getRequestURI());
                }            
                endpt.processRequest(ctxt);
            }
        } catch (Exception e) {
            // temporary - need to send back SOAP fault message
        }

  Packet pipeResponse = next.process(request);
      
        //Make the response packet available in the MessageContext
        ((SOAPMessageContextImpl)ctxt).setPacket(pipeResponse);
       
       
        try {
            if (endpt != null) {
                endpt.processResponse(ctxt);
            }
   
        } catch (Exception e) {
            // temporary - need to send back SOAP fault message
        }
View Full Code Here

        throws ServletException {
       
        WebServiceEngineImpl wsEngine_ = WebServiceEngineImpl.getInstance();
       
        if ("Tester".equalsIgnoreCase(request.getQueryString())) {           
            Endpoint endpt = wsEngine_.getEndpoint(request.getServletPath());
            if (endpt!=null && Boolean.parseBoolean(endpt.getDescriptor().getDebugging())) {
                WebServiceTesterServlet.invoke(request, response,
                        endpt.getDescriptor());
                return;
            }
        }       
               
        if (delegate_ != null) {
            // check if we need to trace this...       
            String messageId=null;
            if (wsEngine_.getGlobalMessageListener()!=null) {
                Endpoint endpt = wsEngine_.getEndpoint(request.getServletPath());               
                messageId = wsEngine_.preProcessRequest(endpt)
                if (messageId!=null) {
                    ThreadLocalInfo config = new ThreadLocalInfo(messageId, request);
                    wsEngine_.getThreadLocal().set(config);
                }
View Full Code Here

        throws ServletException {
       
        // test for tester servlet invocation.
        if ("Tester".equalsIgnoreCase(request.getQueryString())) {
           
            Endpoint endpt = WebServiceEngineImpl.getInstance().getEndpoint(request.getServletPath());
            if (endpt!=null && Boolean.parseBoolean(endpt.getDescriptor().getDebugging())) {
                Loader loader = (Loader) endpt.getDescriptor().getBundleDescriptor().getExtraAttribute("WEBLOADER");
                if (loader != null) {
                    endpt.getDescriptor().getBundleDescriptor().setClassLoader(loader.getClassLoader());
                    endpt.getDescriptor().getBundleDescriptor().removeExtraAttribute("WEBLOADER");
                }
                WebServiceTesterServlet.invoke(request, response,
                        endpt.getDescriptor());
                return;
            }
        }       
        if (delegate_ != null) {
            delegate_.doGet(request, response);
View Full Code Here

        /**
         * This requirement came from the jbi team. If the WebServiceEndpoint
         * is a jbi endpoint which is private throw an error whenever a get
         * or a post request is made
         */
        Endpoint endpoint = WebServiceEngineImpl.getInstance().getEndpoint(hreq.getRequestURI());
        if(endpoint != null) {
            if ((endpoint.getDescriptor()!= null) && (endpoint.getDescriptor().isJBIPrivate())) {
                String message = endpoint.getDescriptor().getWebService().getName() +
                        " is a JBI private service; Access is denied.";
                hresp.setContentType("text/xml");
                (new WsUtil()).writeInvalidMethodType(hresp, message);
                return;
            }
        }


        // check if it is a tester servlet invocation
        if ("Tester".equalsIgnoreCase(query)) {
           
            if((endpoint.getDescriptor().isSecure()) ||
               (endpoint.getDescriptor().getMessageSecurityBinding() != null)) {
                String message = endpoint.getDescriptor().getWebService().getName() +
                    "is a secured web service; Tester feature is not supported for secured services";
                (new WsUtil()).writeInvalidMethodType(hresp, message);               
                return;
            }     
           
             if((endpoint!= null) ){
                if ((endpoint.getDescriptor()!= null) && (endpoint.getDescriptor().isJBIPrivate())) {
                    String message = endpoint.getDescriptor().getWebService().getName() +
                            " is a JBI private service; Access is denied.";
                    hresp.setContentType("text/xml");
                    (new WsUtil()).writeInvalidMethodType(hresp, message);
                    return;
                }
            }

            if (endpoint!=null && Boolean.parseBoolean(endpoint.getDescriptor().getDebugging())) {
                dispatch = false;
                WebServiceTesterServlet.invoke(hreq, hresp,
                                               endpoint.getDescriptor());
            }
        }

        if (dispatch) {
            EjbRuntimeEndpointInfo ejbEndpoint =
View Full Code Here

    }

    private void sendAuthenticationEvents(boolean success,        
            String url, WebPrincipal principal) {
       
        Endpoint endpoint = WebServiceEngineImpl.getInstance().getEndpoint(url);
        if (endpoint==null) {
            return;
        }
       
        for (AuthenticationListener listener : WebServiceEngineImpl.getInstance().getAuthListeners()) {
            if (success) {
                listener.authSucess(endpoint.getDescriptor().getBundleDescriptor(),
                        endpoint, principal);
            } else {
                listener.authFailure(endpoint.getDescriptor().getBundleDescriptor(),
                        endpoint, principal);
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.webservice.monitoring.Endpoint

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.