SoapMessageManager.java 文件源码

java
阅读 22 收藏 0 点赞 0 评论 0

项目:verify-hub 作者:
public Document wrapWithSoapEnvelope(Element element) {
    DocumentBuilder documentBuilder;
    try {
        documentBuilder = newDocumentBuilder();
    } catch (ParserConfigurationException e) {
        LOG.error("*** ALERT: Failed to create a document builder when trying to construct the the soap message. ***", e);
        throw propagate(e);
    }
    Document document = documentBuilder.newDocument();
    document.adoptNode(element);
    Element envelope = document.createElementNS("http://schemas.xmlsoap.org/soap/envelope/", "soapenv:Envelope");
    Element body = document.createElementNS("http://schemas.xmlsoap.org/soap/envelope/", "soapenv:Body");
    envelope.appendChild(body);
    body.appendChild(element);
    document.appendChild(envelope);

    return document;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号