Package com.sun.enterprise.deployment

Examples of com.sun.enterprise.deployment.WebServicesDescriptor


            if (getParentNode() instanceof WebBundleRuntimeNode) {
                parent = ((WebBundleRuntimeNode) getParentNode()).getWebBundleDescriptor();
            } else {
                parent = (BundleDescriptor) getParentNode().getDescriptor();
            }
            WebServicesDescriptor webServices = parent.getWebServices();
            descriptor = webServices.getWebServiceByName(value);
        } else if( WebServicesTagNames.CLIENT_WSDL_PUBLISH_URL.equals
                   (element.getQName()) ) {
            if( descriptor == null ) {
                DOLUtils.getDefaultLogger().info
                    ("Warning : WebService descriptor is null for "
View Full Code Here


     * @param parent node to add the runtime xml info
     * @param the bundle descriptor
     */       
    public void writeWebServiceRuntimeInfo(Node parent,
                                           BundleDescriptor bundle) {
        WebServicesDescriptor webServices = bundle.getWebServices();
        if( webServices != null ) {
            for(Iterator iter = webServices.getWebServices().iterator();
                iter.hasNext();) {
                WebService next = (WebService) iter.next();
                if( next.hasClientPublishUrl() ) {
                    writeDescriptor
                        (parent, WebServicesTagNames.WEB_SERVICE, next);
View Full Code Here

        if(portName == null) {
            portName = "";
        }
       
        // Check if the same endpoint is already defined in webservices.xml
        WebServicesDescriptor wsDesc = bundleDesc.getWebServices();
        WebServiceEndpoint endpoint = wsDesc.getEndpointByName(portComponentName);
        WebService newWS;
        if(endpoint == null) {
            // Check if a service with the same name is already present
            // If so, add this endpoint to the existing service
            if (svcName.length()!=0) {
                newWS = wsDesc.getWebServiceByName(svcName);
            } else {
                newWS = wsDesc.getWebServiceByName(((Class)annElem).getSimpleName()+"Service");
            }
            if(newWS==null) {
                newWS = new WebService();
                // service name from annotation
                if (svcName.length()!=0) {
                    newWS.setName(svcName);
                } else {
                    newWS.setName(((Class)annElem).getSimpleName()+"Service");           
                }
                wsDesc.addWebService(newWS);
            }
            endpoint = new WebServiceEndpoint();
            // port-component-name is fully qualified class name
            endpoint.setEndpointName(portComponentName);
            newWS.addEndpoint(endpoint);           
            wsDesc.setSpecVersion(com.sun.enterprise.deployment.node.WebServicesDescriptorNode.SPEC_VERSION);           
        } else {
            newWS = endpoint.getWebService();
        }

        // If wsdl-service is specified in the descriptor, then the targetnamespace
View Full Code Here

     * @param node name
     * @param the descriptor to write
     * @return the DOM tree top node
     */   
    public Node writeDescriptor(Node parent, String nodeName, WebComponentDescriptor descriptor) {       
        WebServicesDescriptor webServices =
            descriptor.getWebBundleDescriptor().getWebServices();

        // only write servlet runtime elements if there is a runas identity
        // or the servlet is exposed as a web service
        if ( (descriptor.getRunAsIdentity() != null) ||
             webServices.hasEndpointsImplementedBy(descriptor) ) {
            Node servletNode =  appendChild(parent, nodeName);
            appendTextChild(servletNode, RuntimeTagNames.SERVLET_NAME, descriptor.getCanonicalName());

            if( descriptor.getRunAsIdentity() != null ) {
                appendTextChild(servletNode, RuntimeTagNames.PRINCIPAL_NAME,
View Full Code Here

            (element.getQName())) {
            Object parentDesc = getParentNode().getDescriptor();
            if (parentDesc instanceof EjbDescriptor) {
                EjbBundleDescriptor bundle =
                    ((EjbDescriptor) parentDesc).getEjbBundleDescriptor();
                WebServicesDescriptor webServices = bundle.getWebServices();
                descriptor = webServices.getEndpointByName(value);
            } else if( parentDesc instanceof WebComponentDescriptor) {
                WebBundleDescriptor bundle = ((WebComponentDescriptor) parentDesc).getWebBundleDescriptor();
                WebServicesDescriptor webServices = bundle.getWebServices();
                descriptor = webServices.getEndpointByName(value);
            }
            if (descriptor==null) {
                DOLUtils.getDefaultLogger().log(Level.SEVERE, "enterprise.port_component_name_unknown",               
                    new Object[] { value });                       
            }
View Full Code Here

     * @param the ejb endpoint
     */       
    public void writeWebServiceEndpointInfo(Node parent, EjbDescriptor ejb) {
                                           
        EjbBundleDescriptor bundle = ejb.getEjbBundleDescriptor();
        WebServicesDescriptor webServices = bundle.getWebServices();
        Collection endpoints = webServices.getEndpointsImplementedBy(ejb);
        for(Iterator iter = endpoints.iterator(); iter.hasNext();) {
            WebServiceEndpoint next = (WebServiceEndpoint) iter.next();
            writeDescriptor(parent, WebServicesTagNames.WEB_SERVICE_ENDPOINT,
                            next);
        }
View Full Code Here

     */       
    public void writeWebServiceEndpointInfo
        (Node parent, WebComponentDescriptor webComp) {
       
        WebBundleDescriptor bundle = webComp.getWebBundleDescriptor();
        WebServicesDescriptor webServices = bundle.getWebServices();
        Collection endpoints = webServices.getEndpointsImplementedBy(webComp);
        for(Iterator iter = endpoints.iterator(); iter.hasNext();) {
            WebServiceEndpoint next = (WebServiceEndpoint) iter.next();
            writeDescriptor(parent, WebServicesTagNames.WEB_SERVICE_ENDPOINT,
                            next);
        }
View Full Code Here

  super(module);
  this.ejbModuleName = module.getName() ;
  this.applicationName = module.getParentName();
  if(isStandAloneModule(applicationName))
      this.applicationName = "null";
  WebServicesDescriptor wsDesc = ejbBundle.getWebServices();
  if (wsDesc.hasWebServices()) {
      hasWebServices = true;
      Vector endpointList = new Vector();
      for (Iterator endpoints = wsDesc.getEndpoints().iterator();
        endpoints.hasNext();) {
    WebServiceEndpoint wse = (WebServiceEndpoint) endpoints.next();
    endpointList.add(wse.getEndpointAddressUri());
      }
      endpointAddresses = new String[endpointList.size()];
View Full Code Here

        String ctxRoot = null;
        if ( bundleDescriptor instanceof WebBundleDescriptor) {
            ctxRoot = ((WebBundleDescriptor) bundleDescriptor).getContextRoot();
        }

        WebServicesDescriptor wss = bundleDescriptor.getWebServices();
        if ( wss != null) {
            java.util.Collection wsEps = wss.getEndpoints();

            for (Iterator it = wsEps.iterator(); it.hasNext();) {
                WebServiceEndpoint nextDescriptor =
                        (WebServiceEndpoint) it.next();
View Full Code Here

        String ctxRoot = null;
        if ( bundleDescriptor instanceof WebBundleDescriptor) {
            ctxRoot = ((WebBundleDescriptor) bundleDescriptor).getContextRoot();
        }

        WebServicesDescriptor wsd = bundleDescriptor.getWebServices();
        if ( wsd == null) {
            return;
        }

        java.util.Collection wsEps = wsd.getEndpoints();

        for (Iterator it = wsEps.iterator(); it.hasNext();) {
            WebServiceEndpoint nextDescriptor = (WebServiceEndpoint) it.next();

            try {
View Full Code Here

TOP

Related Classes of com.sun.enterprise.deployment.WebServicesDescriptor

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.