public static void enableSoapClientOutputAttachments(JaxWsProxyFactoryBean pfb){ Map<String,Object> props = new HashMap<String, Object>(); props.put(AttachmentOutInterceptor.WRITE_ATTACHMENTS, Boolean.TRUE); pfb.setProperties(props); pfb.getOutInterceptors().add(new SwAOutInterceptor()); pfb.getOutInterceptors().add(new AttachmentOutInterceptor()); }
getMultipartType(), writeOptionalTypeParameters(), getRootHeaders()); serializer.setXop(mtomEnabled);
getMultipartType(), writeOptionalTypeParameters(), getRootHeaders()); serializer.setXop(mtomEnabled);
public Binding createBinding(BindingInfo bi) { XMLBinding binding = new XMLBinding(bi); binding.getInInterceptors().add(new AttachmentInInterceptor()); binding.getInInterceptors().add(new DatabindingInSetupInterceptor()); binding.getOutInterceptors().add(new AttachmentOutInterceptor()); binding.getOutInterceptors().add(new ContentTypeOutInterceptor()); binding.getOutInterceptors().add(new DatabindingOutSetupInterceptor()); binding.getInFaultInterceptors().add(new XMLFaultInInterceptor()); binding.getOutFaultInterceptors().add(new ContentTypeOutInterceptor()); binding.getOutFaultInterceptors().add(new StaxOutInterceptor()); binding.getOutFaultInterceptors().add(new XMLFaultOutInterceptor()); return binding; }
getMultipartType(), writeOptionalTypeParameters(), getRootHeaders()); serializer.setXop(mtomEnabled); String contentTransferEncoding = (String)message.getContextualProperty(
public Binding createBinding(BindingInfo binding) { XMLBinding xb = new XMLBinding(binding); xb.getInInterceptors().add(new AttachmentInInterceptor()); xb.getInInterceptors().add(new StaxInInterceptor()); xb.getInInterceptors().add(new DocLiteralInInterceptor()); xb.getInInterceptors().add(new XMLMessageInInterceptor()); xb.getOutInterceptors().add(new AttachmentOutInterceptor()); xb.getOutInterceptors().add(new StaxOutInterceptor()); xb.getOutInterceptors().add(new WrappedOutInterceptor()); xb.getOutInterceptors().add(new XMLMessageOutInterceptor()); xb.getInFaultInterceptors().add(new XMLFaultInInterceptor()); xb.getOutFaultInterceptors().add(new StaxOutInterceptor()); xb.getOutFaultInterceptors().add(new XMLFaultOutInterceptor()); return xb; }
getMultipartType(), writeOptionalTypeParameters(), getRootHeaders()); serializer.setXop(mtomEnabled); String contentTransferEncoding = (String)message.getContextualProperty(
@Override public void activate() throws Exception { super.activate(); outList = new ArrayList<Interceptor<? extends Message>>(); if (isMtomEnabled()) { outList.add(new JbiOutInterceptor()); outList.add(new MtomCheckInterceptor(true)); outList.add(new AttachmentOutInterceptor()); } outList.add(new JbiOutInterceptor()); if (isSchemaValidationEnabled()) { outList.add(new SchemaValidationOutInterceptor(isUseJBIWrapper(), isUseSOAPEnvelope())); } outList.add(new JbiOutWsdl1Interceptor(isUseJBIWrapper(), isUseSOAPEnvelope())); outList.add(new SoapPreProtocolOutInterceptor()); outList.add(new SoapOutInterceptor(getBus())); outList.add(new StaxOutInterceptor()); }
public Binding createBinding(BindingInfo binding) { XMLBinding xb = new XMLBinding(binding); xb.getInInterceptors().add(new AttachmentInInterceptor()); xb.getInInterceptors().add(new StaxInInterceptor()); xb.getInInterceptors().add(new DocLiteralInInterceptor()); xb.getInInterceptors().add(new XMLMessageInInterceptor()); xb.getOutInterceptors().add(new AttachmentOutInterceptor()); xb.getOutInterceptors().add(new StaxOutInterceptor()); xb.getOutInterceptors().add(new WrappedOutInterceptor()); xb.getOutInterceptors().add(new XMLMessageOutInterceptor()); xb.getInFaultInterceptors().add(new XMLFaultInInterceptor()); xb.getOutFaultInterceptors().add(new StaxOutInterceptor()); xb.getOutFaultInterceptors().add(new XMLFaultOutInterceptor()); return xb; }
/** * Copy NormalizedMessage attachments to SoapMessage attachments */ private void fromNMSAttachments(Message message, NormalizedMessage normalizedMessage) { Set attachmentNames = normalizedMessage.getAttachmentNames(); Collection<Attachment> attachmentList = new ArrayList<Attachment>(); for (Iterator it = attachmentNames.iterator(); it.hasNext();) { String id = (String) it.next(); DataHandler handler = normalizedMessage.getAttachment(id); Attachment attachment = new AttachmentImpl(id, handler); attachmentList.add(attachment); } message.setAttachments(attachmentList); if (message instanceof SoapMessage) { SoapMessage soapMessage = (SoapMessage)message; SoapVersion soapVersion = soapMessage.getVersion(); message.put(Message.CONTENT_TYPE, soapVersion.getContentType()); } if (attachmentList.size() > 0) { message.put(org.apache.cxf.message.Message.MTOM_ENABLED, true); message.put("write.attachments", true); message.getInterceptorChain().add(new AttachmentOutInterceptor()); } }
public Binding createBinding(BindingInfo binding) { JBIBindingInfo bindingInfo = (JBIBindingInfo) binding; JBIBinding jb = new JBIBinding(bindingInfo); jb.getInInterceptors().add(new StaxInInterceptor()); jb.getInInterceptors().add(new JBIOperationInInterceptor()); jb.getInInterceptors().add(new JBIWrapperInInterceptor()); jb.getOutInterceptors().add(new StaxOutInterceptor()); jb.getOutInterceptors().add(new JBIWrapperOutInterceptor()); jb.getOutFaultInterceptors().add(new StaxOutInterceptor()); jb.getOutFaultInterceptors().add(new JBIFaultOutInterceptor()); jb.getInFaultInterceptors().add(new JBIFaultInInterceptor()); if (bindingInfo.getJBIBindingConfiguration().isMtomEnabled()) { jb.getInInterceptors().add(new AttachmentInInterceptor()); jb.getOutInterceptors().add(new AttachmentOutInterceptor()); } return jb; }
sb.getOutFaultInterceptors().add(new AttachmentOutInterceptor()); sb.getInInterceptors().add(new SoapActionInInterceptor()); sb.getOutInterceptors().add(new AttachmentOutInterceptor()); sb.getOutInterceptors().add(new StaxOutInterceptor()); sb.getOutInterceptors().add(SoapHeaderOutFilterInterceptor.INSTANCE);
sb.getOutFaultInterceptors().add(new AttachmentOutInterceptor()); sb.getInInterceptors().add(new SoapActionInInterceptor()); sb.getOutInterceptors().add(new AttachmentOutInterceptor()); sb.getOutInterceptors().add(new StaxOutInterceptor()); sb.getOutInterceptors().add(SoapHeaderOutFilterInterceptor.INSTANCE);
new SetStatusInterceptor()); cxfService.getOutInterceptors().add(new AttachmentOutInterceptor()); cxfService.getOutInterceptors().add( new MtomCheckInterceptor(isMtomEnabled())); ep.getOutFaultInterceptors().addAll(getOutFaultInterceptors()); ep.getOutInterceptors().add(new AttachmentOutInterceptor()); ep.getOutInterceptors().add(new StaxOutInterceptor()); ep.getOutInterceptors().add(new SoapOutInterceptor(getBus()));