Package org.apache.axis2.jaxws.description.builder

Examples of org.apache.axis2.jaxws.description.builder.DescriptionBuilderComposite


           
         // now if this is a web service impl with an SEI, get the SEI props
            if(dbc.getWebServiceAnnot() != null
                    &&
                    !DescriptionUtils.isEmpty(dbc.getWebServiceAnnot().endpointInterface())) {
                DescriptionBuilderComposite seiDBC = dbcMap.get(dbc.getWebServiceAnnot().endpointInterface());
                if(seiDBC != null
                        &&
                        seiDBC.getProperties() != null
                        &&
                        !seiDBC.getProperties().isEmpty()) {
                    props.putAll(seiDBC.getProperties());
                }
            }
        }
       
        return props;
View Full Code Here


     * will be returned.
     */
    public DescriptionBuilderComposite getDescriptionBuilderComposite(QName serviceQName,
                                                                      Integer portCompositeIndex) {
       
        DescriptionBuilderComposite dbc = null;
       
        // if the service QName was specified let's attempt to get the correct
        // PortComposite list
        if(serviceQName != null
                &&
View Full Code Here

                //in the tooling that allows for the wsdllocation to be specifed on either the
                //impl. class, or the SEI, or both. So, we need to look for the wsdl as follows:
                //          1. If the Wsdl exists on the SEI, then check for it on the impl.
                //          2. If it is not found in either location, in that order, then generate

                DescriptionBuilderComposite seic =
                        getDBCMap().get(composite.getWebServiceAnnot().endpointInterface());

                try {
                    if (seic == null) {
                        if (log.isDebugEnabled()) {
                            log.debug("The SEI class " + composite.getWebServiceAnnot().endpointInterface() + " was not found.");
                        }
                    }
                    if (seic != null && seic.getWsdlDefinition() != null) {
                        // set the wsdl def from the SEI composite
                        if (log.isDebugEnabled()) {
                            log.debug("Get the wsdl definition from the SEI composite.");
                        }
                        URL url = seic.getWsdlURL();
                        this.wsdlURL = url.toString();
                        if (log.isDebugEnabled() ) {
                            if (configContext != null) {
                                log.debug("new WSDL4JWrapper-ConfigContext not null2");
                            } else {
                                log.debug("new WSDL4JWrapper-ConfigContext null2");
                            }
                        }
                        this.wsdlWrapper =
                                new WSDL4JWrapper(seic.getWsdlURL(),
                                                  seic.getWsdlDefinition(),
                                                  configContext,
                                                  this.catalogManager);
                           
                    } else if (composite.getWsdlDefinition() != null) {
                       
                        //set the wsdl def from the impl. class composite
                        if (log.isDebugEnabled()) {
                            log.debug("Get the wsdl definition from the impl class composite.");
                        }
                        if (log.isDebugEnabled() ) {
                            if (configContext != null) {
                                log.debug("new WSDL4JWrapper-ConfigContext not null3");
                            } else {
                                log.debug("new WSDL4JWrapper-ConfigContext null3");
                            }
                        }
                        URL url = composite.getWsdlURL();
                        this.wsdlURL = url == null ? null : url.toString();
                        this.wsdlWrapper = new WSDL4JWrapper(composite.getWsdlURL(),
                                                             composite.getWsdlDefinition(),
                                                             configContext,
                                                             this.catalogManager);
                                                           
                    } else {
                      String wsdlLocation = null;
                      // first check to see if the wsdlLocation is on the SEI
                      if(seic != null
                          &&
                          seic.getWebServiceAnnot() != null) {
                          if (log.isDebugEnabled()) {
                              log.debug("Get the wsdl location from the SEI composite.");
                          }
                          wsdlLocation = seic.getWebServiceAnnot().wsdlLocation();
                      }
                                           
                      // now check the impl
                      if(wsdlLocation == null
                              ||
View Full Code Here

         *    on all the ports under it.
         * 2) By setting the property SEI_MTOM_ENABLEMENT_MAP to a list of ports keyed by SEI name with a
         *    Boolean value indicating if MTOM should be enabled for that port.
         */
        if (checkOldEnablementMethod) {
            DescriptionBuilderComposite sparseComposite = getDescriptionBuilderComposite().getSparseComposite(key);
            if(sparseComposite != null
                    &&
                    seiClass != null) {
                Map<String, Boolean> seiToMTOM = (Map<String, Boolean>)
                    sparseComposite.getProperties().get(MDQConstants.SEI_MTOM_ENABLEMENT_MAP);
                if(seiToMTOM != null
                        &&
                        seiToMTOM.get(seiClass.getName()) != null) {
                    mtomEnabled = seiToMTOM.get(seiClass.getName());
                }
View Full Code Here

            log.debug("getBindingProperties, serviceDelegateKey= " + serviceDelegateKey +
                      ", key= " + key);
        }

        Map<String, Object> bindingProps = null;
        DescriptionBuilderComposite sparseComposite = getDescriptionBuilderComposite().getSparseComposite(serviceDelegateKey);
        if(sparseComposite != null) {
            Map<String, Map<String, Object>> allBindingProps = (Map<String, Map<String, Object>>)
                sparseComposite.getProperties().get(MDQConstants.BINDING_PROPS_MAP);
            bindingProps = allBindingProps != null ? (Map<String, Object>) allBindingProps.get(key) : null;
        }

        if(log.isDebugEnabled()) {
            log.debug("getBindingProperties, serviceDelegateKey= " + serviceDelegateKey +
View Full Code Here

                }

                //    setWebServiceAnnotDefaults(true=impl); Must happen before we start checking annot
                if (!DescriptionUtils.isEmpty(composite.getWebServiceAnnot().endpointInterface())) {

                    DescriptionBuilderComposite seic =
                            dbcMap.get(composite.getWebServiceAnnot().endpointInterface());

                    //Verify that we can find the SEI in the composite list
                    if (seic == null) {
                        throw ExceptionFactory.makeWebServiceException(
View Full Code Here

     *
     * @param methodList The current collection of methods, including overloaded ones
     * @param dbc The composite to be checked for methods to be added to the collection
     */
    private void addSuperClassMethods(List<MethodDescriptionComposite> methodList, DescriptionBuilderComposite dbc) {
        DescriptionBuilderComposite superDBC = dbcMap.get(dbc.getSuperClassName());
        if (superDBC != null) {
            Iterator<MethodDescriptionComposite> mIter = superDBC.getMethodDescriptionsList().iterator();
            while (mIter.hasNext()) {
                MethodDescriptionComposite mdc = mIter.next();
                methodList.add(mdc);
            }
            addSuperClassMethods(methodList, superDBC);
View Full Code Here

   
    /* (non-Javadoc)
     * @see org.apache.axis2.jaxws.description.ServiceDescription#getHandlerChain(java.lang.Object)
     */
    public HandlerChainsType getHandlerChain(Object sparseCompositeKey) {
        DescriptionBuilderComposite sparseComposite = null;

        // If there is a HandlerChainsType in the sparse composite for this ServiceDelegate
        // (i.e. this sparseCompositeKey), then return that.
        if (sparseCompositeKey != null) {
            sparseComposite = composite.getSparseComposite(sparseCompositeKey);
            if (sparseComposite != null && sparseComposite.getHandlerChainsType() != null) {
                return sparseComposite.getHandlerChainsType();
            }
        }
       
        // If there is no HandlerChainsType in the composite, then read in the file specified
        // on the HandlerChain annotation if it is present.
        if (handlerChainsType == null) {

            getAnnoHandlerChainAnnotation(sparseCompositeKey);
            if (handlerChainAnnotation != null) {

                String handlerFileName = handlerChainAnnotation.file();

                if (log.isDebugEnabled()) {
                    log.debug("EndpointDescriptionImpl.getHandlerChain: fileName: "
                              + handlerFileName + " className: " + composite.getClassName());
                }

                String className = composite.getClassName();

                ClassLoader classLoader = composite.getClassLoader();

                InputStream is =
                        DescriptionUtils.openHandlerConfigStream(handlerFileName,
                                                                 className,
                                                                 classLoader);
                if (is == null) {
                    // config stream is still null.  This may mean the @HandlerChain annotation is on a *driver* class
                    // next to a @WebServiceRef annotation, so the path is relative to the class declaring @HandlerChain
                    // and NOT relative to the Service or Endpoint class, which also means we should use the sparseComposite
                    // since that is where the @HandlerChain annotation info would have been loaded.
                    if (sparseComposite != null) {
                        String handlerChainDeclaringClass = (String)sparseComposite.getProperties().get(MDQConstants.HANDLER_CHAIN_DECLARING_CLASS);
                        if (handlerChainDeclaringClass != null) {
                            className = handlerChainDeclaringClass;
                            is = DescriptionUtils.openHandlerConfigStream(handlerFileName, className, classLoader);
                        }
                    }
View Full Code Here

                            (HandlerChain) getAnnotation(serviceClass, HandlerChain.class);
            }
        }
  if (handlerChainAnnotation == null) {
            if (sparseCompositeKey != null) {
                DescriptionBuilderComposite sparseComposite = composite.getSparseComposite(sparseCompositeKey);
                if (sparseComposite != null && sparseComposite.getHandlerChainAnnot() != null) {
                    handlerChainAnnotation = sparseComposite.getHandlerChainAnnot();
                }
            }
        }

        return handlerChainAnnotation;
View Full Code Here

    }
   
    private List<Annotation> getSEIFeatureList(Object serviceDelegate, Class seiClass) {
        List<Annotation> featureList = null;

        DescriptionBuilderComposite sparseComposite = getDescriptionBuilderComposite().getSparseComposite(serviceDelegate);
        // The Features are only set on the sparse composite based on Depoyment Descriptor information.
        // And the information is keyed by the SEI class.  Both need to be non-null to get the value
        if (sparseComposite != null && seiClass != null) {
            Map<String, List<Annotation>> featureMap = (Map<String, List<Annotation>>) sparseComposite.getProperties().get(MDQConstants.SEI_FEATURES_MAP);
            if (featureMap != null) {
                featureList = featureMap.get(seiClass.getName());
            }
        }
        return featureList;
View Full Code Here

TOP

Related Classes of org.apache.axis2.jaxws.description.builder.DescriptionBuilderComposite

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.