features.add(new MTOMFeature(mtom.enabled(), mtom.threshold())); } else { && (SOAPBinding.SOAP11HTTP_MTOM_BINDING.equals(bt.value()) || SOAPBinding.SOAP12HTTP_MTOM_BINDING.equals(bt.value()))) { features.add(new MTOMFeature(true));
public MTOMFeature getObject() throws Exception { if(feature==null) feature = new MTOMFeature(enabled,threshold); return feature; }
Pass MTOMFeature() as argument: MtomService port = service.getMailServicePort(new MTOMFeature());
/** * Sets MTOM feature, overriding any existing feature. This is necessary for compatibility * with the existing {@link SOAPBinding.setMTOMEnabled}. * @param b if MTOM will be enabled */ void setMTOMEnabled(boolean b) { wsfeatures.put(MTOMFeature.class, new MTOMFeature(b)); }
/** * Sets MTOM feature, overriding any existing feature. This is necessary for compatibility * with the existing {@link SOAPBinding.setMTOMEnabled}. * @param b if MTOM will be enabled */ void setMTOMEnabled(boolean b) { wsfeatures.put(MTOMFeature.class, new MTOMFeature(b)); }
/** * Sets MTOM feature, overriding any existing feature. This is necessary for compatibility * with the existing {@link SOAPBinding.setMTOMEnabled}. * @param b if MTOM will be enabled */ void setMTOMEnabled(boolean b) { wsfeatures.put(MTOMFeature.class, new MTOMFeature(b)); }
import javax.xml.ws.soap.MTOMFeature; public class ArchiveMessageSerializer { public String serializeArchiveReportWithDefTags(ArchiveMetadataType metaData) throws UnsupportedEncodingException { final ByteArrayOutputStream buffer = new ByteArrayOutputStream(); RedirectionTransportFactory.getRegistry().registerRedirectionInThread(buffer); final Service service = new Service(); final Port port = service.getPort(new MTOMFeature()); port.someMethod(metaData); return buffer.toString("iso-8859-1"); } }
/** * Translates the requested intents to web service features. * * @param requestedIntents Requested intents. * @return Resolved feature sets. */ public WebServiceFeature[] getFeatures(List<QName> requestedIntents) { List<WebServiceFeature> features = new LinkedList<>(); if (requestedIntents.contains(MayProvideIntents.MESSAGE_OPTIMIZATION)) { features.add(new MTOMFeature()); } resolveBinding(requestedIntents, features); features.add(new AddressingFeature()); WebServiceFeature[] webServiceFeatures = new WebServiceFeature[features.size()]; webServiceFeatures = features.toArray(webServiceFeatures); return webServiceFeatures; }
MtomCodec(SOAPVersion version, StreamSOAPCodec codec, WSFeatureList features){ super(version, features); this.codec = codec; sf = features.get(SerializationFeature.class); MTOMFeature mtom = features.get(MTOMFeature.class); if(mtom == null) this.mtomFeature = new MTOMFeature(); else this.mtomFeature = mtom; }
MtomCodec(SOAPVersion version, StreamSOAPCodec codec, WSFeatureList features){ super(version, features); this.codec = codec; sf = features.get(SerializationFeature.class); MTOMFeature mtom = features.get(MTOMFeature.class); if(mtom == null) this.mtomFeature = new MTOMFeature(); else this.mtomFeature = mtom; }
MtomCodec(SOAPVersion version, StreamSOAPCodec codec, WSFeatureList features){ super(version, features); this.codec = codec; sf = features.get(SerializationFeature.class); MTOMFeature mtom = features.get(MTOMFeature.class); if(mtom == null) this.mtomFeature = new MTOMFeature(); else this.mtomFeature = mtom; }
@Override public WebServiceFeatureList createBuiltinFeatureList() { WebServiceFeatureList r=super.createBuiltinFeatureList(); Boolean mtom = isMTOMEnabled(); if(mtom != null) r.add(new MTOMFeature(mtom)); return r; }
@Override public WebServiceFeatureList createBuiltinFeatureList() { WebServiceFeatureList r = super.createBuiltinFeatureList(); Boolean mtom = isMTOMEnabled(); if (mtom != null) { r.add(new MTOMFeature(mtom)); } return r; }
@Override public WebServiceFeatureList createBuiltinFeatureList() { WebServiceFeatureList r=super.createBuiltinFeatureList(); Boolean mtom = isMTOMEnabled(); if(mtom != null) r.add(new MTOMFeature(mtom)); return r; }
@Override public WebServiceFeatureList createBuiltinFeatureList() { WebServiceFeatureList r=super.createBuiltinFeatureList(); Boolean mtom = isMTOMEnabled(); if(mtom != null) r.add(new MTOMFeature(mtom)); return r; }
/** * Create MTOM feature from config. * * @param config the soap config * @return the MTOM feature */ public MTOMFeature getMtom(SOAPBindingModel config) { if (config.getMtomConfig() == null) { return new MTOMFeature(_mtomEnabled); } MTOMFeature mtom = null; if (config.getMtomConfig().getThreshold() != null) { mtom = new MTOMFeature(true, config.getMtomConfig().getThreshold()); } else if (config.getMtomConfig().isEnabled() != null) { mtom = new MTOMFeature(config.getMtomConfig().isEnabled()); } else { mtom = new MTOMFeature(_mtomEnabled); } return mtom; }
/** * Create MTOM feature from config. * * @param config the soap config * @return the MTOM feature */ public MTOMFeature getMtom(SOAPBindingModel config) { if (config.getMtomConfig() == null) { return new MTOMFeature(_mtomEnabled); } MTOMFeature mtom = null; if (config.getMtomConfig().getThreshold() != null) { mtom = new MTOMFeature(true, config.getMtomConfig().getThreshold()); } else if (config.getMtomConfig().isEnabled() != null) { mtom = new MTOMFeature(config.getMtomConfig().isEnabled()); } else { mtom = new MTOMFeature(_mtomEnabled); } return mtom; }
private ImagingDocumentSourcePortType port() throws Exception { ImagingDocumentSourcePortType port = service.getImagingDocumentSourcePortSoap12( new AddressingFeature(true, true), new MTOMFeature()); XDSUtils.ensureMustUnderstandHandler(port); XDSUtils.setEndpointAddress(port, url); return port; }
private Hello getPort(int threshold) { URL wsdl = getClass().getResource("/wsdl_systest/mtom.wsdl"); assertNotNull("WSDL is null", wsdl); HelloService service = new HelloService(wsdl, serviceName); assertNotNull("Service is null ", service); //return service.getHelloPort(); MTOMFeature mtomFeature = new MTOMFeature(); if (threshold > 0) { mtomFeature = new MTOMFeature(true, threshold); } Hello hello = service.getHelloPort(mtomFeature); try { updateAddressPort(hello, PORT); } catch (Exception e) { //ignore } return hello; } }
private HelloWS createService() throws Exception { URL wsdl = getClass().getResource("/wsdl_systest/mtom_provider_validate.wsdl"); assertNotNull(wsdl); HelloWSClient service = new HelloWSClient(wsdl, serviceName); assertNotNull(service); HelloWS port = service.getHello(new MTOMFeature()); updateAddressPort(port, PORT); return port; } }