wrapper.setPrefix("ns4"); body.removeChild(body.getFirstChild()); body.appendChild(wrapper);
public Source readEnvelopeAsSource() { try { if (!parsedMessage) { SOAPEnvelope se = sm.getSOAPPart().getEnvelope(); return new DOMSource(se); } else { SOAPMessage msg = soapVersion.getMessageFactory().createMessage(); addAttributes(msg.getSOAPPart().getEnvelope(),envelopeAttrs); SOAPBody newBody = msg.getSOAPPart().getEnvelope().getBody(); addAttributes(newBody, bodyAttrs); for (Element part : bodyParts) { Node n = newBody.getOwnerDocument().importNode(part, true); newBody.appendChild(n); } addAttributes(msg.getSOAPHeader(),headerAttrs); for (Header header : headers.asList()) { header.writeTo(msg); } SOAPEnvelope se = msg.getSOAPPart().getEnvelope(); return new DOMSource(se); } } catch (SOAPException e) { throw new WebServiceException(e); } }
public Source readEnvelopeAsSource() { try { if (!parsedMessage) { SOAPEnvelope se = sm.getSOAPPart().getEnvelope(); return new DOMSource(se); } else { SOAPMessage msg = soapVersion.getMessageFactory().createMessage(); addAttributes(msg.getSOAPPart().getEnvelope(),envelopeAttrs); SOAPBody newBody = msg.getSOAPPart().getEnvelope().getBody(); addAttributes(newBody, bodyAttrs); for (Element part : bodyParts) { Node n = newBody.getOwnerDocument().importNode(part, true); newBody.appendChild(n); } addAttributes(msg.getSOAPHeader(),headerAttrs); for (Header header : headers.asList()) { header.writeTo(msg); } SOAPEnvelope se = msg.getSOAPPart().getEnvelope(); return new DOMSource(se); } } catch (SOAPException e) { throw new WebServiceException(e); } }
public Source readEnvelopeAsSource() { try { if (!parsedMessage) { SOAPEnvelope se = sm.getSOAPPart().getEnvelope(); return new DOMSource(se); } else { SOAPMessage msg = soapVersion.getMessageFactory().createMessage(); addAttributes(msg.getSOAPPart().getEnvelope(),envelopeAttrs); SOAPBody newBody = msg.getSOAPPart().getEnvelope().getBody(); addAttributes(newBody, bodyAttrs); for (Element part : bodyParts) { Node n = newBody.getOwnerDocument().importNode(part, true); newBody.appendChild(n); } addAttributes(msg.getSOAPHeader(),headerAttrs); for (Header header : headers.asList()) { header.writeTo(msg); } SOAPEnvelope se = msg.getSOAPPart().getEnvelope(); return new DOMSource(se); } } catch (SOAPException e) { throw new WebServiceException(e); } }
rpcOperationWrapper.appendChild(nextImported); body.appendChild(rpcOperationWrapper); } else if (wsBinding.isRpcEncoded()) { throw new ServiceRuntimeException("rpc/encoded WSDL style not supported for endpoint reference " + endpointReference); body.appendChild(msgNode);
soapMessage.getSOAPBody().appendChild(messageNodeImport);
soapMessage.getSOAPBody().appendChild(messageNodeImport);
for (Element part : bodyParts) { Node n = newBody.getOwnerDocument().importNode(part, true); newBody.appendChild(n);
Element el = getDocument().createElementNS(namespace, StringUtils.isEmpty(prefix) ? local : prefix + ":" + local); getEnvelope().getBody().appendChild(el); f = getEnvelope().getBody().getFault(); if (f == null) {
Element el = getDocument().createElementNS(namespace, StringUtils.isEmpty(prefix) ? local : prefix + ":" + local); getEnvelope().getBody().appendChild(el); f = getEnvelope().getBody().getFault(); if (f == null) {
for (Element part : bodyParts) { Node n = newBody.getOwnerDocument().importNode(part, true); newBody.appendChild(n);
for (Element part : bodyParts) { Node n = newBody.getOwnerDocument().importNode(part, true); newBody.appendChild(n);
public SOAPMessage readAsSOAPMessage() throws SOAPException { if (!parsedMessage) { return sm; } else { SOAPMessage msg = soapVersion.getMessageFactory().createMessage(); addAttributes(msg.getSOAPPart().getEnvelope(),envelopeAttrs); SOAPBody newBody = msg.getSOAPPart().getEnvelope().getBody(); addAttributes(newBody, bodyAttrs); for (Element part : bodyParts) { Node n = newBody.getOwnerDocument().importNode(part, true); newBody.appendChild(n); } addAttributes(msg.getSOAPHeader(),headerAttrs); for (Header header : headers.asList()) { header.writeTo(msg); } for (Attachment att : getAttachments()) { AttachmentPart part = msg.createAttachmentPart(); part.setDataHandler(att.asDataHandler()); part.setContentId('<' + att.getContentId() + '>'); addCustomMimeHeaders(att, part); msg.addAttachmentPart(part); } msg.saveChanges(); return msg; } }
public SOAPMessage readAsSOAPMessage() throws SOAPException { if (!parsedMessage) { return sm; } else { SOAPMessage msg = soapVersion.getMessageFactory().createMessage(); addAttributes(msg.getSOAPPart().getEnvelope(),envelopeAttrs); SOAPBody newBody = msg.getSOAPPart().getEnvelope().getBody(); addAttributes(newBody, bodyAttrs); for (Element part : bodyParts) { Node n = newBody.getOwnerDocument().importNode(part, true); newBody.appendChild(n); } addAttributes(msg.getSOAPHeader(),headerAttrs); for (Header header : headers.asList()) { header.writeTo(msg); } for (Attachment att : getAttachments()) { AttachmentPart part = msg.createAttachmentPart(); part.setDataHandler(att.asDataHandler()); part.setContentId('<' + att.getContentId() + '>'); addCustomMimeHeaders(att, part); msg.addAttachmentPart(part); } msg.saveChanges(); return msg; } }
public SOAPMessage readAsSOAPMessage() throws SOAPException { if (!parsedMessage) { return sm; } else { SOAPMessage msg = soapVersion.getMessageFactory().createMessage(); addAttributes(msg.getSOAPPart().getEnvelope(),envelopeAttrs); SOAPBody newBody = msg.getSOAPPart().getEnvelope().getBody(); addAttributes(newBody, bodyAttrs); for (Element part : bodyParts) { Node n = newBody.getOwnerDocument().importNode(part, true); newBody.appendChild(n); } addAttributes(msg.getSOAPHeader(),headerAttrs); for (Header header : headers.asList()) { header.writeTo(msg); } for (Attachment att : getAttachments()) { AttachmentPart part = msg.createAttachmentPart(); part.setDataHandler(att.asDataHandler()); part.setContentId('<' + att.getContentId() + '>'); addCustomMimeHeaders(att, part); msg.addAttachmentPart(part); } msg.saveChanges(); return msg; } }