Examples of XsdStringType


Examples of org.apache.cxf.jaxws.handler.types.XsdStringType

        ParamValueType p = new ParamValueType();
        CString pName = new CString();
        pName.setValue("foo");
        p.setParamName(pName);
        XsdStringType pValue = new XsdStringType();
        pValue.setValue("1");
        p.setParamValue(pValue);
        params.add(p);

        p = new ParamValueType();
        pName = new CString();
        pName.setValue("bar");
        p.setParamName(pName);
        pValue = new XsdStringType();
        pValue.setValue("2");
        p.setParamValue(pValue);
        params.add(p);

        List<Handler> chain = builder.buildHandlerChainFromConfiguration(hc);
        assertEquals(1, chain.size());
View Full Code Here

Examples of org.apache.geronimo.xbeans.javaee.XsdStringType

                        resourceRef.setResSharingScope(resScope);

                        // mappedName
                        String mappdedNameAnnotation = annotation.mappedName();
                        if (!mappdedNameAnnotation.equals("")) {
                            XsdStringType mappedName = resourceRef.addNewMappedName();
                            mappedName.setStringValue(mappdedNameAnnotation);
                            resourceRef.setMappedName(mappedName);
                        }

                    }
                    catch (Exception anyException) {
View Full Code Here

Examples of org.apache.geronimo.xbeans.javaee.XsdStringType

                    }

                    // mappedName
                    String mappdedNameAnnotation = annotation.mappedName();
                    if (!mappdedNameAnnotation.equals("")) {
                        XsdStringType mappedName = ejbLocalRef.addNewMappedName();
                        mappedName.setStringValue(mappdedNameAnnotation);
                        ejbLocalRef.setMappedName(mappedName);
                    }

                    // description
                    String descriptionAnnotation = annotation.description();
                    if (!descriptionAnnotation.equals("")) {
                        DescriptionType description = ejbLocalRef.addNewDescription();
                        description.setStringValue(descriptionAnnotation);
                    }

                    // injectionTarget
                    if (method != null || field != null) {                            // No class-level injection
                        InjectionTargetType injectionTarget = ejbLocalRef.addNewInjectionTarget();
                        FullyQualifiedClassType qualifiedClass = injectionTarget.addNewInjectionTargetClass();
                        JavaIdentifierType javaType = injectionTarget.addNewInjectionTargetName();
                        if (method != null) {
                            qualifiedClass.setStringValue(method.getDeclaringClass().getName());
                            javaType.setStringValue(method.getName().substring(3));   // method should start with "set"
                            injectionTarget.setInjectionTargetClass(qualifiedClass);
                            injectionTarget.setInjectionTargetName(javaType);
                        }
                        else if (field != null) {
                            qualifiedClass.setStringValue(field.getDeclaringClass().getName());
                            javaType.setStringValue(field.getName());
                            injectionTarget.setInjectionTargetClass(qualifiedClass);
                            injectionTarget.setInjectionTargetName(javaType);
                        }
                    }

                }
                catch (Exception anyException) {
                    log.debug("EJBAnnotationHelper: Exception caught while processing <ejb-local-ref>");
                    anyException.printStackTrace();
                }
            }
        }                                                                           // end if local
        else if (remoteFlag) {                                                      // remote

            //--------------------------------------------------------------------------------------
            // 2. <ejb-ref>
            //--------------------------------------------------------------------------------------

            log.debug("addEJB(): <ejb-ref> found");

            String remoteRefName = annotation.name();
            if (remoteRefName.equals("")) {
                if (method != null) {
                    remoteRefName = method.getDeclaringClass().getName() + "/" + method.getName().substring(3); // method should start with "set"
                } else if (field != null) {
                    remoteRefName = field.getDeclaringClass().getName() + "/" + field.getName();
                }
            }

            boolean exists = false;
            EjbRefType[] ejbRefEntries = annotatedApp.getEjbRefArray();
            for (EjbRefType ejbRefEntry : ejbRefEntries) {
                if (ejbRefEntry.getEjbRefName().getStringValue().trim().equals(remoteRefName)) {
                    exists = true;
                    break;
                }
            }
            if (!exists) {
                try {

                    log.debug("addEJB(): Does not exist in DD: " + remoteRefName);

                    // Doesn't exist in deployment descriptor -- add new
                    EjbRefType ejbRef = annotatedApp.addNewEjbRef();

                    //------------------------------------------------------------------------------
                    // <ejb-ref> required elements:
                    //------------------------------------------------------------------------------

                    // ejb-ref-name
                    EjbRefNameType ejbRefName = ejbRef.addNewEjbRefName();
                    ejbRefName.setStringValue(remoteRefName);
                    ejbRef.setEjbRefName(ejbRefName);

                    //------------------------------------------------------------------------------
                    // <ejb-ref> optional elements:
                    //------------------------------------------------------------------------------

                    // remote
                    if (interfce != null) {
                        String remoteAnnotation = interfce.getName();
                        if (!remoteAnnotation.equals("")) {
                            RemoteType remote = ejbRef.addNewRemote();
                            remote.setStringValue(remoteAnnotation);
                            ejbRef.setRemote(remote);
                        }
                    }

                    // ejb-link
                    String beanName = annotation.beanName();
                    if (!beanName.equals("")) {
                        EjbLinkType ejbLink = ejbRef.addNewEjbLink();
                        ejbLink.setStringValue(beanName);
                        ejbRef.setEjbLink(ejbLink);
                    }

                    // mappedName
                    String mappdedNameAnnotation = annotation.mappedName();
                    if (!mappdedNameAnnotation.equals("")) {
                        XsdStringType mappedName = ejbRef.addNewMappedName();
                        mappedName.setStringValue(mappdedNameAnnotation);
                        ejbRef.setMappedName(mappedName);
                    }

                    // description
                    String descriptionAnnotation = annotation.description();
                    if (!descriptionAnnotation.equals("")) {
                        DescriptionType description = ejbRef.addNewDescription();
                        description.setStringValue(descriptionAnnotation);
                    }

                    // injectionTarget
                    if (method != null || field != null) {                            // No class-level injection
                        InjectionTargetType injectionTarget = ejbRef.addNewInjectionTarget();
                        FullyQualifiedClassType qualifiedClass = injectionTarget.addNewInjectionTargetClass();
                        JavaIdentifierType javaType = injectionTarget.addNewInjectionTargetName();
                        if (method != null) {
                            qualifiedClass.setStringValue(method.getDeclaringClass().getName());
                            javaType.setStringValue(method.getName().substring(3));   // method should start with "set"
                            injectionTarget.setInjectionTargetClass(qualifiedClass);
                            injectionTarget.setInjectionTargetName(javaType);
                        }
                        else if (field != null) {
                            qualifiedClass.setStringValue(field.getDeclaringClass().getName());
                            javaType.setStringValue(field.getName());
                            injectionTarget.setInjectionTargetClass(qualifiedClass);
                            injectionTarget.setInjectionTargetName(javaType);
                        }
                    }

                }
                catch (Exception anyException) {
                    log.debug("EJBAnnotationHelper: Exception caught while processing <ejb-ref>");
                    anyException.printStackTrace();
                }
            }
        }                                                                           // end if remote
        else {                                                                      // ambiguous

            //--------------------------------------------------------------------------------------
            // 3. <UNKNOWN>
            //--------------------------------------------------------------------------------------
            log.debug("addEJB(): <UNKNOWN> found");

            String remoteRefName = annotation.name();
            if (remoteRefName.equals("")) {
                if (method != null) {
                    remoteRefName = method.getDeclaringClass().getName() + "/" + method.getName().substring(3); // method should start with "set"
                } else if (field != null) {
                    remoteRefName = field.getDeclaringClass().getName() + "/" + field.getName();
                }
            }

            boolean exists = false;
            EjbRefType[] ejbRefEntries = annotatedApp.getEjbRefArray();
            for (EjbRefType ejbRefEntry : ejbRefEntries) {
                if (ejbRefEntry.getEjbRefName().getStringValue().trim().equals(remoteRefName)) {
                    exists = true;
                    break;
                }
            }
            if (!exists) {
                try {

                    log.debug("addEJB(): Does not exist in DD: " + remoteRefName);

                    // Doesn't exist in deployment descriptor -- add as an <ejb-ref> to the
                    // ambiguous list so that it can be resolved later
                    EjbRefType ejbRef = EjbRefType.Factory.newInstance();
                    annotatedApp.getAmbiguousEjbRefs().add(ejbRef);

                    //------------------------------------------------------------------------------
                    // <ejb-ref> required elements:
                    //------------------------------------------------------------------------------

                    // ejb-ref-name
                    EjbRefNameType ejbRefName = ejbRef.addNewEjbRefName();
                    ejbRefName.setStringValue(remoteRefName);
                    ejbRef.setEjbRefName(ejbRefName);

                    //------------------------------------------------------------------------------
                    // <ejb-ref> optional elements:
                    //------------------------------------------------------------------------------

                    // remote
                    if (interfce != null) {
                        String remoteAnnotation = interfce.getName();
                        if (!remoteAnnotation.equals("")) {
                            RemoteType remote = ejbRef.addNewRemote();
                            remote.setStringValue(remoteAnnotation);
                            ejbRef.setRemote(remote);
                        }
                    }

                    // ejb-link
                    String beanName = annotation.beanName();
                    if (!beanName.equals("")) {
                        EjbLinkType ejbLink = ejbRef.addNewEjbLink();
                        ejbLink.setStringValue(beanName);
                        ejbRef.setEjbLink(ejbLink);
                    }

                    // mappedName
                    String mappdedNameAnnotation = annotation.mappedName();
                    if (!mappdedNameAnnotation.equals("")) {
                        XsdStringType mappedName = ejbRef.addNewMappedName();
                        mappedName.setStringValue(mappdedNameAnnotation);
                        ejbRef.setMappedName(mappedName);
                    }

                    // description
                    String descriptionAnnotation = annotation.description();
View Full Code Here

Examples of org.apache.geronimo.xbeans.javaee.XsdStringType

                        }

                        // env-entry-value
                        String mappdedNameAnnotation = annotation.mappedName();
                        if (!mappdedNameAnnotation.equals("")) {
                            XsdStringType value = envEntry.addNewEnvEntryValue();
                            value.setStringValue(mappdedNameAnnotation);
                            envEntry.setMappedName(value);
                        }

                        //------------------------------------------------------------------------------
                        // <env-entry> optional elements:
View Full Code Here

Examples of org.apache.geronimo.xbeans.javaee.XsdStringType

            serviceRef.setServiceRefType(qualifiedClass);
        }

        // mapped-name
        if (!serviceRef.isSetMappedName() && annotation.mappedName().trim().length() > 0) {
            XsdStringType mappedName = serviceRef.addNewMappedName();
            mappedName.setStringValue(annotation.mappedName().trim());
            serviceRef.setMappedName(mappedName);
        }

        // WSDL document location
        if (!serviceRef.isSetWsdlFile()) {
View Full Code Here

Examples of org.apache.geronimo.xbeans.javaee.XsdStringType

                            serviceRef.setServiceRefType(serviceRefTypeClass);
                        }

                        // mappedName
                        if (!serviceRef.isSetMappedName() && annotation.mappedName().trim().length() > 0) {
                            XsdStringType mappedName = serviceRef.addNewMappedName();
                            mappedName.setStringValue(annotation.mappedName().trim());
                            serviceRef.setMappedName(mappedName);
                        }
                    }
                    catch (Exception anyException) {
                        log.debug("SwitchServiceRefBuilder: Exception caught while processing <service-ref>");
View Full Code Here

Examples of org.apache.geronimo.xbeans.javaee.XsdStringType

            }

            // mappedName
            String mappdedNameAnnotation = annotation.mappedName();
            if (!mappdedNameAnnotation.equals("")) {
                XsdStringType mappedName = resourceEnvRef.addNewMappedName();
                mappedName.setStringValue(mappdedNameAnnotation);
                resourceEnvRef.setMappedName(mappedName);
            }
        }
View Full Code Here

Examples of org.apache.geronimo.xbeans.javaee.XsdStringType

            }

            // mappedName
            String mappdedNameAnnotation = annotation.mappedName();
            if (!mappdedNameAnnotation.equals("")) {
                XsdStringType mappedName = messageDestinationRef.addNewMappedName();
                mappedName.setStringValue(mappdedNameAnnotation);
                messageDestinationRef.setMappedName(mappedName);
            }
        }
View Full Code Here

Examples of org.apache.geronimo.xbeans.javaee.XsdStringType

                        resourceRef.setResSharingScope(resScope);

                        // mappedName
                        String mappdedNameAnnotation = annotation.mappedName();
                        if (!mappdedNameAnnotation.equals("")) {
                            XsdStringType mappedName = resourceRef.addNewMappedName();
                            mappedName.setStringValue(mappdedNameAnnotation);
                            resourceRef.setMappedName(mappedName);
                        }

                    }
                    catch (Exception anyException) {
View Full Code Here

Examples of org.apache.geronimo.xbeans.javaee.XsdStringType

                        }

                        // mappedName
                        String mappdedNameAnnotation = annotation.mappedName();
                        if (!mappdedNameAnnotation.equals("")) {
                            XsdStringType mappedName = envEntry.addNewMappedName();
                            mappedName.setStringValue(mappdedNameAnnotation);
                            envEntry.setMappedName(mappedName);
                        }

                        //------------------------------------------------------------------------------
                        // <env-entry> optional elements:
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.