public Document getDocument() { return AxiomUtils.toDocument(axiomMessage.getSOAPEnvelope()); }
String contentType = outputFormat.getContentType(); if (!(outputFormat.isDoingSWA() || outputFormat.isOptimized())) { String charsetEncoding = axiomMessage.getCharsetEncoding(); contentType += "; charset=" + charsetEncoding; axiomMessage.serialize(outputStream, outputFormat); axiomMessage.serializeAndConsume(outputStream, outputFormat);
} else { message = ((SOAPFactory)envelope.getOMFactory()).createSOAPMessage(); message.setSOAPEnvelope(envelope); message.serialize(out, format, preserve);
/** * Create a new, empty {@code AxiomSoapMessage}. * * @param soapFactory the AXIOM SOAPFactory */ public AxiomSoapMessage(SOAPFactory soapFactory, boolean payloadCaching, boolean langAttributeOnSoap11FaultString) { SOAPEnvelope soapEnvelope = soapFactory.getDefaultEnvelope(); axiomFactory = soapFactory; axiomMessage = axiomFactory.createSOAPMessage(); axiomMessage.setSOAPEnvelope(soapEnvelope); attachments = new Attachments(); this.payloadCaching = payloadCaching; this.langAttributeOnSoap11FaultString = langAttributeOnSoap11FaultString; soapAction = EMPTY_SOAP_ACTION; }
private OMOutputFormat getOutputFormat() { if (outputFormat != null) { return outputFormat; } else { String charsetEncoding = axiomMessage.getCharsetEncoding(); OMOutputFormat outputFormat = new OMOutputFormat(); outputFormat.setCharSetEncoding(charsetEncoding); outputFormat.setSOAP11(getVersion() == SoapVersion.SOAP_11); if (isXopPackage()) { outputFormat.setDoOptimize(true); } else if (!attachments.getContentIDSet().isEmpty()) { outputFormat.setDoingSWA(true); } return outputFormat; } }
public final <T extends AxiomSOAPElement> T createSOAPElement(Class<T> type, OMElement parent, QName qname, OMXMLParserWrapper builder) { T element = createNode(type); if (builder != null) { element.coreSetBuilder(builder); } else if (parent != null) { element.checkParent(parent); } if (parent != null) { ((AxiomContainer)parent).addChild(element, builder != null); } if (builder != null) { element.internalSetLocalName(qname.getLocalPart()); } else if (qname.getNamespaceURI().length() == 0) { element.initName(qname.getLocalPart(), null, true); } else if (parent != null) { element.initName(qname.getLocalPart(), parent.getNamespace(), false); } else { element.initName(qname.getLocalPart(), getNamespace(), true); } return element; }
String contentType = outputFormat.getContentType(); if (!(outputFormat.isDoingSWA() || outputFormat.isOptimized())) { String charsetEncoding = axiomMessage.getCharsetEncoding(); contentType += "; charset=" + charsetEncoding; axiomMessage.serialize(outputStream, outputFormat); axiomMessage.serializeAndConsume(outputStream, outputFormat);
/** * Create a new, empty {@code AxiomSoapMessage}. * * @param soapFactory the AXIOM SOAPFactory */ public AxiomSoapMessage(SOAPFactory soapFactory, boolean payloadCaching, boolean langAttributeOnSoap11FaultString) { SOAPEnvelope soapEnvelope = soapFactory.getDefaultEnvelope(); axiomFactory = soapFactory; axiomMessage = axiomFactory.createSOAPMessage(); axiomMessage.setSOAPEnvelope(soapEnvelope); attachments = new Attachments(); this.payloadCaching = payloadCaching; this.langAttributeOnSoap11FaultString = langAttributeOnSoap11FaultString; soapAction = EMPTY_SOAP_ACTION; }
private OMOutputFormat getOutputFormat() { if (outputFormat != null) { return outputFormat; } else { String charsetEncoding = axiomMessage.getCharsetEncoding(); OMOutputFormat outputFormat = new OMOutputFormat(); outputFormat.setCharSetEncoding(charsetEncoding); outputFormat.setSOAP11(getVersion() == SoapVersion.SOAP_11); if (isXopPackage()) { outputFormat.setDoOptimize(true); } else if (!attachments.getContentIDSet().isEmpty()) { outputFormat.setDoingSWA(true); } return outputFormat; } }
public final <T extends AxiomSOAPElement> T createSOAPElement(Class<T> type, OMElement parent, QName qname, OMXMLParserWrapper builder) { T element = createNode(type); if (builder != null) { element.coreSetBuilder(builder); } else if (parent != null) { element.checkParent(parent); } if (parent != null) { ((AxiomContainer)parent).addChild(element, builder != null); } if (builder != null) { element.internalSetLocalName(qname.getLocalPart()); } else if (qname.getNamespaceURI().length() == 0) { element.initName(qname.getLocalPart(), null, true); } else if (parent != null) { element.initName(qname.getLocalPart(), parent.getNamespace(), false); } else { element.initName(qname.getLocalPart(), getNamespace(), true); } return element; }
String contentType = outputFormat.getContentType(); if (!(outputFormat.isDoingSWA() || outputFormat.isOptimized())) { String charsetEncoding = axiomMessage.getCharsetEncoding(); contentType += "; charset=" + charsetEncoding; axiomMessage.serialize(outputStream, outputFormat); axiomMessage.serializeAndConsume(outputStream, outputFormat);
@Override public Document getDocument() { return AxiomUtils.toDocument(axiomMessage.getSOAPEnvelope()); }
/** * Create a new, empty {@code AxiomSoapMessage}. * * @param soapFactory the AXIOM SOAPFactory */ public AxiomSoapMessage(SOAPFactory soapFactory, boolean payloadCaching, boolean langAttributeOnSoap11FaultString) { SOAPEnvelope soapEnvelope = soapFactory.getDefaultEnvelope(); axiomFactory = soapFactory; axiomMessage = axiomFactory.createSOAPMessage(); axiomMessage.setSOAPEnvelope(soapEnvelope); attachments = new Attachments(); this.payloadCaching = payloadCaching; this.langAttributeOnSoap11FaultString = langAttributeOnSoap11FaultString; soapAction = EMPTY_SOAP_ACTION; }
private OMOutputFormat getOutputFormat() { if (outputFormat != null) { return outputFormat; } else { String charsetEncoding = axiomMessage.getCharsetEncoding(); OMOutputFormat outputFormat = new OMOutputFormat(); outputFormat.setCharSetEncoding(charsetEncoding); outputFormat.setSOAP11(getVersion() == SoapVersion.SOAP_11); if (isXopPackage()) { outputFormat.setDoOptimize(true); } else if (!attachments.getContentIDSet().isEmpty()) { outputFormat.setDoingSWA(true); } return outputFormat; } }
public final SOAPMessage createDefaultSOAPMessage() { SOAPMessage message = createSOAPMessage(); SOAPEnvelope env = createSOAPEnvelope(); message.addChild(env); createSOAPBody(env); return message; }
String contentType = outputFormat.getContentType(); if (!(outputFormat.isDoingSWA() || outputFormat.isOptimized())) { String charsetEncoding = axiomMessage.getCharsetEncoding(); contentType += "; charset=" + charsetEncoding; axiomMessage.serialize(outputStream, outputFormat); axiomMessage.serializeAndConsume(outputStream, outputFormat);
@Override public Document getDocument() { return AxiomUtils.toDocument(axiomMessage.getSOAPEnvelope()); }
public void setDocument(Document document) { // save the Soap Action String soapAction = getSoapAction(); SOAPEnvelope envelope = AxiomUtils.toEnvelope(document); SOAPMessage newMessage = axiomFactory.createSOAPMessage(); newMessage.setSOAPEnvelope(envelope); // replace the Axiom message setAxiomMessage(newMessage); // restore the Soap Action setSoapAction(soapAction); }
private OMOutputFormat getOutputFormat() { if (outputFormat != null) { return outputFormat; } else { String charsetEncoding = axiomMessage.getCharsetEncoding(); OMOutputFormat outputFormat = new OMOutputFormat(); outputFormat.setCharSetEncoding(charsetEncoding); outputFormat.setSOAP11(getVersion() == SoapVersion.SOAP_11); if (isXopPackage()) { outputFormat.setDoOptimize(true); } else if (!attachments.getContentIDSet().isEmpty()) { outputFormat.setDoingSWA(true); } return outputFormat; } }
public final SOAPMessage createDefaultSOAPMessage() { SOAPMessage message = createSOAPMessage(); SOAPEnvelope env = createSOAPEnvelope(); message.addChild(env); createSOAPBody(env); return message; }