public Document getDocument() { return AxiomUtils.toDocument(axiomMessage.getSOAPEnvelope()); }
@Override public Document getDocument() { return AxiomUtils.toDocument(axiomMessage.getSOAPEnvelope()); }
@Override public Document getDocument() { return AxiomUtils.toDocument(axiomMessage.getSOAPEnvelope()); }
@Override public Document getDocument() { return AxiomUtils.toDocument(axiomMessage.getSOAPEnvelope()); }
public String toString() { StringBuilder builder = new StringBuilder("AxiomSoapMessage"); if (payloadCaching) { try { SOAPEnvelope envelope = axiomMessage.getSOAPEnvelope(); if (envelope != null) { SOAPBody body = envelope.getBody(); if (body != null) { OMElement bodyElement = body.getFirstElement(); if (bodyElement != null) { builder.append(' '); builder.append(bodyElement.getQName()); } } } } catch (OMException ex) { // ignore } } return builder.toString(); }
public String toString() { StringBuilder builder = new StringBuilder("AxiomSoapMessage"); if (payloadCaching) { try { SOAPEnvelope envelope = axiomMessage.getSOAPEnvelope(); if (envelope != null) { SOAPBody body = envelope.getBody(); if (body != null) { OMElement bodyElement = body.getFirstElement(); if (bodyElement != null) { builder.append(' '); builder.append(bodyElement.getQName()); } } } } catch (OMException ex) { // ignore } } return builder.toString(); }
/** * Create a new {@code AxiomSoapMessage} based on the given AXIOM {@code SOAPMessage} and attachments. * * @param soapMessage the AXIOM SOAPMessage * @param attachments the attachments * @param soapAction the value of the SOAP Action header * @param payloadCaching whether the contents of the SOAP body should be cached or not */ public AxiomSoapMessage(SOAPMessage soapMessage, Attachments attachments, String soapAction, boolean payloadCaching, boolean langAttributeOnSoap11FaultString) { Assert.notNull(soapMessage, "'soapMessage' must not be null"); Assert.notNull(attachments, "'attachments' must not be null"); axiomMessage = soapMessage; axiomFactory = (SOAPFactory) soapMessage.getSOAPEnvelope().getOMFactory(); this.attachments = attachments; if (!StringUtils.hasLength(soapAction)) { soapAction = EMPTY_SOAP_ACTION; } this.soapAction = soapAction; this.payloadCaching = payloadCaching; this.langAttributeOnSoap11FaultString = langAttributeOnSoap11FaultString; }
public String toString() { StringBuilder builder = new StringBuilder("AxiomSoapMessage"); if (payloadCaching) { try { SOAPEnvelope envelope = axiomMessage.getSOAPEnvelope(); if (envelope != null) { SOAPBody body = envelope.getBody(); if (body != null) { OMElement bodyElement = body.getFirstElement(); if (bodyElement != null) { builder.append(' '); builder.append(bodyElement.getQName()); } } } } catch (OMException ex) { // ignore } } return builder.toString(); }
/** * Create a new <code>AxiomSoapMessage</code> based on the given AXIOM <code>SOAPMessage</code> and attachments. * * @param soapMessage the AXIOM SOAPMessage * @param attachments the attachments * @param soapAction the value of the SOAP Action header * @param payloadCaching whether the contents of the SOAP body should be cached or not */ public AxiomSoapMessage(SOAPMessage soapMessage, Attachments attachments, String soapAction, boolean payloadCaching, boolean langAttributeOnSoap11FaultString) { Assert.notNull(soapMessage, "'soapMessage' must not be null"); Assert.notNull(attachments, "'attachments' must not be null"); axiomMessage = soapMessage; axiomFactory = (SOAPFactory) soapMessage.getSOAPEnvelope().getOMFactory(); this.attachments = attachments; if (!StringUtils.hasLength(soapAction)) { soapAction = EMPTY_SOAP_ACTION; } this.soapAction = soapAction; this.payloadCaching = payloadCaching; this.langAttributeOnSoap11FaultString = langAttributeOnSoap11FaultString; }
/** * Create a new {@code AxiomSoapMessage} based on the given AXIOM {@code SOAPMessage} and attachments. * * @param soapMessage the AXIOM SOAPMessage * @param attachments the attachments * @param soapAction the value of the SOAP Action header * @param payloadCaching whether the contents of the SOAP body should be cached or not */ public AxiomSoapMessage(SOAPMessage soapMessage, Attachments attachments, String soapAction, boolean payloadCaching, boolean langAttributeOnSoap11FaultString) { Assert.notNull(soapMessage, "'soapMessage' must not be null"); Assert.notNull(attachments, "'attachments' must not be null"); axiomMessage = soapMessage; axiomFactory = (SOAPFactory) soapMessage.getSOAPEnvelope().getOMFactory(); this.attachments = attachments; if (!StringUtils.hasLength(soapAction)) { soapAction = EMPTY_SOAP_ACTION; } this.soapAction = soapAction; this.payloadCaching = payloadCaching; this.langAttributeOnSoap11FaultString = langAttributeOnSoap11FaultString; }
public String toString() { StringBuilder builder = new StringBuilder("AxiomSoapMessage"); if (payloadCaching) { try { SOAPEnvelope envelope = axiomMessage.getSOAPEnvelope(); if (envelope != null) { SOAPBody body = envelope.getBody(); if (body != null) { OMElement bodyElement = body.getFirstElement(); if (bodyElement != null) { builder.append(' '); builder.append(bodyElement.getQName()); } } } } catch (OMException ex) { // ignore } } return builder.toString(); }
/** * Create a new {@code AxiomSoapMessage} based on the given AXIOM {@code SOAPMessage} and attachments. * * @param soapMessage the AXIOM SOAPMessage * @param attachments the attachments * @param soapAction the value of the SOAP Action header * @param payloadCaching whether the contents of the SOAP body should be cached or not */ public AxiomSoapMessage(SOAPMessage soapMessage, Attachments attachments, String soapAction, boolean payloadCaching, boolean langAttributeOnSoap11FaultString) { Assert.notNull(soapMessage, "'soapMessage' must not be null"); Assert.notNull(attachments, "'attachments' must not be null"); axiomMessage = soapMessage; axiomFactory = (SOAPFactory) soapMessage.getSOAPEnvelope().getOMFactory(); this.attachments = attachments; if (!StringUtils.hasLength(soapAction)) { soapAction = EMPTY_SOAP_ACTION; } this.soapAction = soapAction; this.payloadCaching = payloadCaching; this.langAttributeOnSoap11FaultString = langAttributeOnSoap11FaultString; }
@Override public SoapEnvelope getEnvelope() { if (envelope == null) { try { envelope = new AxiomSoapEnvelope(axiomMessage.getSOAPEnvelope(), axiomFactory, payloadCaching, langAttributeOnSoap11FaultString); } catch (SOAPProcessingException ex) { throw new AxiomSoapEnvelopeException(ex); } } return envelope; }
@Override public SoapEnvelope getEnvelope() { if (envelope == null) { try { envelope = new AxiomSoapEnvelope(axiomMessage.getSOAPEnvelope(), axiomFactory, payloadCaching, langAttributeOnSoap11FaultString); } catch (SOAPProcessingException ex) { throw new AxiomSoapEnvelopeException(ex); } } return envelope; }
@Override public SoapEnvelope getEnvelope() { if (envelope == null) { try { envelope = new AxiomSoapEnvelope(axiomMessage.getSOAPEnvelope(), axiomFactory, payloadCaching, langAttributeOnSoap11FaultString); } catch (SOAPProcessingException ex) { throw new AxiomSoapEnvelopeException(ex); } } return envelope; }
public SoapEnvelope getEnvelope() { if (envelope == null) { try { envelope = new AxiomSoapEnvelope(axiomMessage.getSOAPEnvelope(), axiomFactory, payloadCaching, langAttributeOnSoap11FaultString); } catch (SOAPProcessingException ex) { throw new AxiomSoapEnvelopeException(ex); } } return envelope; }
private void writeSwAMessage(OutputStream outputStream, OMOutputFormat format) throws XMLStreamException, UnsupportedEncodingException { StringWriter writer = new StringWriter(); SOAPEnvelope envelope = axiomMessage.getSOAPEnvelope(); if (payloadCaching) { envelope.serialize(writer, format); } else { envelope.serializeAndConsume(writer, format); } MIMEOutputUtils.writeSOAPWithAttachmentsMessage(writer, outputStream, attachments, format); }
private void writeSwAMessage(OutputStream outputStream, OMOutputFormat format) throws XMLStreamException, UnsupportedEncodingException { StringWriter writer = new StringWriter(); SOAPEnvelope envelope = axiomMessage.getSOAPEnvelope(); if (payloadCaching) { envelope.serialize(writer, format); } else { envelope.serializeAndConsume(writer, format); } try { OMMultipartWriter mpw = new OMMultipartWriter(outputStream, format); Writer rootPartWriter = new OutputStreamWriter(mpw.writeRootPart(), format.getCharSetEncoding()); rootPartWriter.write(writer.toString()); rootPartWriter.close(); // Get the collection of ids associated with the attachments for (String id: attachments.getAllContentIDs()) { mpw.writePart(attachments.getDataHandler(id), id); } mpw.complete(); } catch (IOException ex) { throw new OMException("Error writing SwA message", ex); } }
private void writeSwAMessage(OutputStream outputStream, OMOutputFormat format) throws XMLStreamException, UnsupportedEncodingException { StringWriter writer = new StringWriter(); SOAPEnvelope envelope = axiomMessage.getSOAPEnvelope(); if (payloadCaching) { envelope.serialize(writer, format); } else { envelope.serializeAndConsume(writer, format); } try { OMMultipartWriter mpw = new OMMultipartWriter(outputStream, format); Writer rootPartWriter = new OutputStreamWriter(mpw.writeRootPart(), format.getCharSetEncoding()); rootPartWriter.write(writer.toString()); rootPartWriter.close(); // Get the collection of ids associated with the attachments for (String id: attachments.getAllContentIDs()) { mpw.writePart(attachments.getDataHandler(id), id); } mpw.complete(); } catch (IOException ex) { throw new OMException("Error writing SwA message", ex); } }
private void writeSwAMessage(OutputStream outputStream, OMOutputFormat format) throws XMLStreamException, UnsupportedEncodingException { StringWriter writer = new StringWriter(); SOAPEnvelope envelope = axiomMessage.getSOAPEnvelope(); if (payloadCaching) { envelope.serialize(writer, format); } else { envelope.serializeAndConsume(writer, format); } try { OMMultipartWriter mpw = new OMMultipartWriter(outputStream, format); Writer rootPartWriter = new OutputStreamWriter(mpw.writeRootPart(), format.getCharSetEncoding()); rootPartWriter.write(writer.toString()); rootPartWriter.close(); // Get the collection of ids associated with the attachments for (String id: attachments.getAllContentIDs()) { mpw.writePart(attachments.getDataHandler(id), id); } mpw.complete(); } catch (IOException ex) { throw new OMException("Error writing SwA message", ex); } }