Examples of MTOM


Examples of javax.xml.ws.soap.MTOM

                                       JAXWSAConstants.WSA_XSD);
    }

    private void loadWSFeatureAnnotation(Class<?> serviceClass, Class<?> implementorClass) {
        List<WebServiceFeature> features = new ArrayList<WebServiceFeature>();
        MTOM mtom = implInfo.getImplementorClass().getAnnotation(MTOM.class);
        if (mtom == null && serviceClass != null) {
            mtom = serviceClass.getAnnotation(MTOM.class);
        }
        if (mtom != null) {
            features.add(new MTOMFeature(mtom.enabled(), mtom.threshold()));
        } else {
            //deprecated way to set mtom
            BindingType bt = implInfo.getImplementorClass().getAnnotation(BindingType.class);
            if (bt != null
                && (SOAPBinding.SOAP11HTTP_MTOM_BINDING.equals(bt.value())
View Full Code Here

Examples of javax.xml.ws.soap.MTOM

                                       JAXWSAConstants.WSA_XSD);
    }

    private void loadWSFeatureAnnotation(Class<?> serviceClass, Class<?> implementorClass) {
        List<WebServiceFeature> features = new ArrayList<WebServiceFeature>();
        MTOM mtom = implInfo.getImplementorClass().getAnnotation(MTOM.class);       
        if (mtom == null && serviceClass != null) {
            mtom = serviceClass.getAnnotation(MTOM.class);
        }
        if (mtom != null) {
            features.add(new MTOMFeature(mtom.enabled(), mtom.threshold()));
        } else {
            //deprecated way to set mtom
            BindingType bt = implInfo.getImplementorClass().getAnnotation(BindingType.class);
            if (bt != null
                && (SOAPBinding.SOAP11HTTP_MTOM_BINDING.equals(bt.value())
View Full Code Here

Examples of javax.xml.ws.soap.MTOM

                                       JAXWSAConstants.WSA_XSD);
    }

    private void loadWSFeatureAnnotation(Class<?> serviceClass, Class<?> implementorClass) {
        List<WebServiceFeature> features = new ArrayList<WebServiceFeature>();
        MTOM mtom = implInfo.getImplementorClass().getAnnotation(MTOM.class);
        if (mtom == null && serviceClass != null) {
            mtom = serviceClass.getAnnotation(MTOM.class);
        }
        if (mtom != null) {
            features.add(new MTOMFeature(mtom.enabled(), mtom.threshold()));
        } else {
            //deprecated way to set mtom
            BindingType bt = implInfo.getImplementorClass().getAnnotation(BindingType.class);
            if (bt != null
                && (SOAPBinding.SOAP11HTTP_MTOM_BINDING.equals(bt.value())
View Full Code Here

Examples of javax.xml.ws.soap.MTOM

                                       JAXWSAConstants.WSA_XSD);
    }

    private void loadWSFeatureAnnotation(Class<?> serviceClass, Class<?> implementorClass) {
        List<WebServiceFeature> features = new ArrayList<WebServiceFeature>();
        MTOM mtom = implInfo.getImplementorClass().getAnnotation(MTOM.class);
        if (mtom == null && serviceClass != null) {
            mtom = serviceClass.getAnnotation(MTOM.class);
        }
        if (mtom != null) {
            features.add(new MTOMFeature(mtom.enabled(), mtom.threshold()));
        } else {
            //deprecated way to set mtom
            BindingType bt = implInfo.getImplementorClass().getAnnotation(BindingType.class);
            if (bt != null
                && (SOAPBinding.SOAP11HTTP_MTOM_BINDING.equals(bt.value())
View Full Code Here

Examples of javax.xml.ws.soap.MTOM

                                       JAXWSAConstants.WSA_XSD);
    }

    private void loadWSFeatureAnnotation(Class<?> serviceClass, Class<?> implementorClass) {
        List<WebServiceFeature> features = new ArrayList<WebServiceFeature>();
        MTOM mtom = implInfo.getImplementorClass().getAnnotation(MTOM.class);
        if (mtom == null && serviceClass != null) {
            mtom = serviceClass.getAnnotation(MTOM.class);
        }
        if (mtom != null) {
            features.add(new MTOMFeature(mtom.enabled(), mtom.threshold()));
        } else {
            //deprecated way to set mtom
            BindingType bt = implInfo.getImplementorClass().getAnnotation(BindingType.class);
            if (bt != null
                && (SOAPBinding.SOAP11HTTP_MTOM_BINDING.equals(bt.value())
View Full Code Here

Examples of javax.xml.ws.soap.MTOM

                                       JAXWSAConstants.WSA_XSD);
    }
   
    private void loadWSFeatureAnnotation(Class<?> serviceClass, Class<?> implementorClass) {
        List<WebServiceFeature> features = new ArrayList<WebServiceFeature>();
        MTOM mtom = implInfo.getImplementorClass().getAnnotation(MTOM.class);       
        if (mtom == null && serviceClass != null) {
            mtom = serviceClass.getAnnotation(MTOM.class);
        }
        if (mtom != null) {
            features.add(new MTOMFeature(mtom.enabled(), mtom.threshold()));
        } else {
            //deprecated way to set mtom
            BindingType bt = implInfo.getImplementorClass().getAnnotation(BindingType.class);
            if (bt != null
                && (SOAPBinding.SOAP11HTTP_MTOM_BINDING.equals(bt.value())
View Full Code Here

Examples of javax.xml.ws.soap.MTOM

            }
        }
    }

    private void configMtomAnnotation(final Class<?> clazz, final PortComponent portComponent) {
        final MTOM mtom = clazz.getAnnotation(MTOM.class);
        if (mtom != null) {
            if (portComponent.getEnableMtom() == null) {
                portComponent.setEnableMtom(mtom.enabled());
            }
            if (portComponent.getMtomThreshold() == null) {
                portComponent.setMtomThreshold(mtom.threshold());
            }
        }
    }
View Full Code Here

Examples of javax.xml.ws.soap.MTOM

        if (isMTOMEnabledCache != null) {
            return isMTOMEnabledCache.booleanValue();
        }
       
        // isMTOMEnabled is a combination of the @BindingType and the @MTOM setting.
        MTOM mtomAnnotation =
                (MTOM) getAnnoFeature(MTOMFeature.ID);
       
        // If the @MTOM annotation is set, it wins
        if (mtomAnnotation != null) {
            isMTOMEnabledCache = Boolean.valueOf(mtomAnnotation.enabled());
            return isMTOMEnabledCache.booleanValue();
        }
       
        // Else look at the bindingType
        String bindingType = getBindingType();
View Full Code Here

Examples of javax.xml.ws.soap.MTOM

                                       JAXWSAConstants.WSA_XSD);
    }
   
    private void loadWSFeatureAnnotation(Class<?> serviceClass, Class<?> implementorClass) {
        List<WebServiceFeature> features = new ArrayList<WebServiceFeature>();
        MTOM mtom = implInfo.getImplementorClass().getAnnotation(MTOM.class);       
        if (mtom == null && serviceClass != null) {
            mtom = serviceClass.getAnnotation(MTOM.class);
        }
        if (mtom != null) {
            features.add(new MTOMFeature(mtom.enabled(), mtom.threshold()));
        } else {
            //deprecated way to set mtom
            BindingType bt = implInfo.getImplementorClass().getAnnotation(BindingType.class);
            if (bt != null
                && (SOAPBinding.SOAP11HTTP_MTOM_BINDING.equals(bt.value())
View Full Code Here

Examples of javax.xml.ws.soap.MTOM

                    "enterprise.deployment.annotation.handlers.invalidtype",
                    "annotation not allowed on this element."),  annInfo);
           
        }

        MTOM mtom = null;
        Addressing addressing = null;
        RespectBinding respectBinding = null;
        // Other annotations like SchemaValidation etc to be passed on to
        // ServiceReferenceDescriptor
        Map<Class<? extends Annotation>, Annotation> otherAnnotations =
                new HashMap<Class<? extends Annotation>, Annotation>();

        for (Annotation a : annElem.getAnnotations()) {
            if (!(a.annotationType().isAnnotationPresent(
                                        WebServiceFeatureAnnotation.class)))
                continue;
            if (a instanceof MTOM) {
                mtom = (MTOM)a;
            } else if (a instanceof Addressing) {
                addressing = (Addressing)a;
            } else if (a instanceof RespectBinding) {
                respectBinding = (RespectBinding)a;
            } else {
                if (!otherAnnotations.containsKey(a.getClass())) {
                    otherAnnotations.put(a.getClass(), a);
                }
            }
        }

        String serviceRefName = !ok(annotation.name()) ?
                    defaultServiceRefName : annotation.name();
        ServiceReferenceContainer[] containers = null;
        if (annCtx instanceof ServiceReferenceContainerContext) {
            containers = ((ServiceReferenceContainerContext) annCtx).getServiceRefContainers();
        }

        if (containers == null || containers.length == 0) {
            annInfo.getProcessingContext().getErrorHandler().fine(
                    new AnnotationProcessorException(
                    localStrings.getLocalString(
                    "enterprise.deployment.annotation.handlers.invalidannotationforthisclass",
                    "Illegal annotation symbol for this class will be ignored"),
                    annInfo));
            return HandlerProcessingResultImpl.getDefaultResult(getAnnotationType(), ResultType.PROCESSED);
        }

        // now process the annotation for all the containers.
        for (ServiceReferenceContainer container : containers) {
            ServiceReferenceDescriptor aRef = null;
            try {
                aRef = container.getServiceReferenceByName(serviceRefName);
            } catch(Throwable t) {} // ignore

            if (aRef == null) {
                // time to create it...
                aRef = new ServiceReferenceDescriptor();
                aRef.setName(serviceRefName);
                container.addServiceReferenceDescriptor(aRef);
            }

            // merge other annotations
            Map<Class<? extends Annotation>, Annotation> oa =
                aRef.getOtherAnnotations();
            if (oa == null)
                aRef.setOtherAnnotations(otherAnnotations);
            else {
                for (Map.Entry<Class<? extends Annotation>, Annotation> entry :
                        otherAnnotations.entrySet()) {
                    if (!oa.containsKey(entry.getKey()))
                        oa.put(entry.getKey(), entry.getValue());
                }
            }

            // merge wsdlLocation
            if (!ok(aRef.getWsdlFileUri()) && ok(annotation.wsdlLocation()))
                aRef.setWsdlFileUri(annotation.wsdlLocation());

            if (!aRef.hasMtomEnabled() && mtom != null) {
                aRef.setMtomEnabled(mtom.enabled());
                aRef.setMtomThreshold(mtom.threshold());
            }

            // check Addressing annotation
            if (aRef.getAddressing() == null && addressing != null) {
                aRef.setAddressing(new com.sun.enterprise.deployment.Addressing(
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.