Examples of MTOMFeature


Examples of javax.xml.ws.soap.MTOMFeature

        }

        Object portObject;
        try {
            if (service instanceof RepositoryService) {
                portObject = ((RepositoryService) service).getRepositoryServicePort(new MTOMFeature());
            } else if (service instanceof NavigationService) {
                portObject = ((NavigationService) service).getNavigationServicePort(new MTOMFeature());
            } else if (service instanceof ObjectService) {
                int threshold = getSession().get(SessionParameter.WEBSERVICES_MEMORY_THRESHOLD, 4 * 1024 * 1024);
                portObject = ((ObjectService) service).getObjectServicePort(new MTOMFeature(),
                        new StreamingAttachmentFeature(null, true, threshold));
                ((BindingProvider) portObject).getRequestContext().put(
                        JAXWSProperties.HTTP_CLIENT_STREAMING_CHUNK_SIZE, CHUNK_SIZE);
            } else if (service instanceof VersioningService) {
                int threshold = getSession().get(SessionParameter.WEBSERVICES_MEMORY_THRESHOLD, 4 * 1024 * 1024);
                portObject = ((VersioningService) service).getVersioningServicePort(new MTOMFeature(),
                        new StreamingAttachmentFeature(null, true, threshold));
                ((BindingProvider) portObject).getRequestContext().put(
                        JAXWSProperties.HTTP_CLIENT_STREAMING_CHUNK_SIZE, CHUNK_SIZE);
            } else if (service instanceof DiscoveryService) {
                portObject = ((DiscoveryService) service).getDiscoveryServicePort(new MTOMFeature());
            } else if (service instanceof MultiFilingService) {
                portObject = ((MultiFilingService) service).getMultiFilingServicePort(new MTOMFeature());
            } else if (service instanceof RelationshipService) {
                portObject = ((RelationshipService) service).getRelationshipServicePort(new MTOMFeature());
            } else if (service instanceof PolicyService) {
                portObject = ((PolicyService) service).getPolicyServicePort(new MTOMFeature());
            } else if (service instanceof ACLService) {
                portObject = ((ACLService) service).getACLServicePort(new MTOMFeature());
            } else {
                throw new CmisRuntimeException("Cannot find Web Services service object!");
            }

            // add SOAP and HTTP authentication headers
View Full Code Here

Examples of javax.xml.ws.soap.MTOMFeature

        }

        Object portObject;
        try {
            if (service instanceof RepositoryService) {
                portObject = ((RepositoryService) service).getRepositoryServicePort(new MTOMFeature());
            } else if (service instanceof NavigationService) {
                portObject = ((NavigationService) service).getNavigationServicePort(new MTOMFeature());
            } else if (service instanceof ObjectService) {
                portObject = ((ObjectService) service).getObjectServicePort(new MTOMFeature());
            } else if (service instanceof VersioningService) {
                portObject = ((VersioningService) service).getVersioningServicePort(new MTOMFeature());
            } else if (service instanceof DiscoveryService) {
                portObject = ((DiscoveryService) service).getDiscoveryServicePort(new MTOMFeature());
            } else if (service instanceof MultiFilingService) {
                portObject = ((MultiFilingService) service).getMultiFilingServicePort(new MTOMFeature());
            } else if (service instanceof RelationshipService) {
                portObject = ((RelationshipService) service).getRelationshipServicePort(new MTOMFeature());
            } else if (service instanceof PolicyService) {
                portObject = ((PolicyService) service).getPolicyServicePort(new MTOMFeature());
            } else if (service instanceof ACLService) {
                portObject = ((ACLService) service).getACLServicePort(new MTOMFeature());
            } else {
                throw new CmisRuntimeException("Cannot find Web Services service object!");
            }

            // add SOAP and HTTP authentication headers
View Full Code Here

Examples of javax.xml.ws.soap.MTOMFeature

        service.addPort(portName,
                        "http://schemas.xmlsoap.org/soap/",
                        "local://Hello");
        port = service.getPort(portName,
                               Hello.class,
                               new MTOMFeature());

       

        ((BindingProvider)port).getRequestContext()
            .put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, address);
View Full Code Here

Examples of javax.xml.ws.soap.MTOMFeature

        assertNotNull("WSDL is null", wsdl);

        HelloService service = new HelloService(wsdl, serviceName);
        assertNotNull("Service is null ", service);
        //return service.getHelloPort();       
        Hello hello = service.getHelloPort(new MTOMFeature());
        try {
            updateAddressPort(hello, PORT);
        } catch (Exception e) {
            //ignore
        }
View Full Code Here

Examples of javax.xml.ws.soap.MTOMFeature

    }
   
    final void createJaxwsBinding() {
        if (getBinding() instanceof SoapBinding) {
            jaxwsBinding = new SOAPBindingImpl(getEndpointInfo().getBinding(), this);
            MTOMFeature mtomFeature = getMTOMFeature();
            if (mtomFeature != null && mtomFeature.isEnabled()) {
                ((SOAPBinding)jaxwsBinding).setMTOMEnabled(true);
            }
        } else if (getBinding() instanceof XMLBinding) {
            jaxwsBinding = new HTTPBindingImpl(getEndpointInfo().getBinding(), this);
        } else {
View Full Code Here

Examples of javax.xml.ws.soap.MTOMFeature

        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())
                || SOAPBinding.SOAP12HTTP_MTOM_BINDING.equals(bt.value()))) {
                features.add(new MTOMFeature(true));               
            }
        }
       

        Addressing addressing = null;
View Full Code Here

Examples of javax.xml.ws.soap.MTOMFeature

        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())
                || SOAPBinding.SOAP12HTTP_MTOM_BINDING.equals(bt.value()))) {
                features.add(new MTOMFeature(true));
            }
        }


        Addressing addressing = null;
View Full Code Here

Examples of javax.xml.ws.soap.MTOMFeature

    private void setMTOMFeatures(DataBinding databinding) {
        if (this.wsFeatures != null) {
            for (WebServiceFeature wsf : this.wsFeatures) {
                if (wsf instanceof MTOMFeature) {
                    databinding.setMtomEnabled(true);
                    MTOMFeature f = (MTOMFeature) wsf;
                    if (f.getThreshold() > 0) {
                        databinding.setMtomThreshold(((MTOMFeature)wsf).getThreshold());
                    }
                }
            }
        }
View Full Code Here

Examples of javax.xml.ws.soap.MTOMFeature

        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())
                || SOAPBinding.SOAP12HTTP_MTOM_BINDING.equals(bt.value()))) {
                features.add(new MTOMFeature(true));
            }
        }


        Addressing addressing = null;
View Full Code Here

Examples of javax.xml.ws.soap.MTOMFeature

    private void setMTOMFeatures(DataBinding databinding) {
        if (this.wsFeatures != null) {
            for (WebServiceFeature wsf : this.wsFeatures) {
                if (wsf instanceof MTOMFeature) {
                    databinding.setMtomEnabled(true);
                    MTOMFeature f = (MTOMFeature) wsf;
                    if (f.getThreshold() > 0) {
                        databinding.setMtomThreshold(((MTOMFeature)wsf).getThreshold());
                    }
                }
            }
        }
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.