Package javax.xml.soap

Examples of javax.xml.soap.SOAPBody.appendChild()


            } else {
                SOAPMessage msg = soapVersion.saajMessageFactory.createMessage();
                SOAPBody newBody = msg.getSOAPPart().getEnvelope().getBody();
                for (Element part : bodyParts) {
                    Node n = newBody.getOwnerDocument().importNode(part, true);
                    newBody.appendChild(n);
                }
                return new SAAJMessage(getHeaders(), getAttachments(), msg);
            }
        } catch (SOAPException e) {
            throw new WebServiceException(e);
View Full Code Here


        symbol.setAttribute("foo", "bar");
        getLastTradePrice.appendChild(symbol);
        org.w3c.dom.Text def = doc.createTextNode("DEF");
        symbol.appendChild(def);
                       
        soapBody.appendChild(getLastTradePrice);
       
        assertEquals(1, soapBody.getChildNodes().getLength());
        Iterator iter = soapBody.getChildElements();
        assertTrue(iter.hasNext());
        Object obj = iter.next();
View Full Code Here

            } else {
                SOAPMessage msg = soapVersion.saajMessageFactory.createMessage();
                SOAPBody newBody = msg.getSOAPPart().getEnvelope().getBody();
                for (Element part : bodyParts) {
                    Node n = newBody.getOwnerDocument().importNode(part, true);
                    newBody.appendChild(n);
                }
                for (Header header : headers) {
                    header.writeTo(msg);
                }
                SOAPEnvelope se = msg.getSOAPPart().getEnvelope();
View Full Code Here

        } else {
            SOAPMessage msg = soapVersion.saajMessageFactory.createMessage();
            SOAPBody newBody = msg.getSOAPPart().getEnvelope().getBody();
            for (Element part : bodyParts) {
                Node n = newBody.getOwnerDocument().importNode(part, true);
                newBody.appendChild(n);
            }
            for (Header header : headers) {
                header.writeTo(msg);
            }
            for (Attachment att : getAttachments()) {
View Full Code Here

            } else {
                SOAPMessage msg = soapVersion.saajMessageFactory.createMessage();
                SOAPBody newBody = msg.getSOAPPart().getEnvelope().getBody();
                for (Element part : bodyParts) {
                    Node n = newBody.getOwnerDocument().importNode(part, true);
                    newBody.appendChild(n);
                }
                return new SAAJMessage(getHeaders(), getAttachments(), msg);
            }
        } catch (SOAPException e) {
            throw new WebServiceException(e);
View Full Code Here

                    // build the SOAP response for this message
                    //
                    Node wrapper = doc.createElementNS(namespace, "pingResponse");
                    wrapper.setPrefix("ns4");
                    body.removeChild(body.getFirstChild());
                    body.appendChild(wrapper);

                    for (String info : getHandlerInfoList(ctx)) {
                        // copy the the previously invoked handler list into the response. 
                        // Ignore this handlers information as it will be added again later.
                        //
View Full Code Here

    private Document testImportFromDomToSaaj(Document doc) throws Exception {
        SOAPMessage sm = MessageFactory.newInstance().createMessage();
        SOAPPart sp = sm.getSOAPPart();
        SOAPBody body = sm.getSOAPBody();
        org.w3c.dom.Node node = sp.importNode(doc.getDocumentElement(), true);
        body.appendChild(node);
        return sp;
    }
}
View Full Code Here

                    // build the SOAP response for this message
                    //
                    Node wrapper = doc.createElementNS(namespace, "pingResponse");
                    wrapper.setPrefix("ns4");
                    body.removeChild(body.getFirstChild());
                    body.appendChild(wrapper);

                    for (String info : getHandlerInfoList(ctx)) {
                        // copy the the previously invoked handler list into the response. 
                        // Ignore this handlers information as it will be added again later.
                        //
View Full Code Here

                    // build the SOAP response for this message
                    //
                    Node wrapper = doc.createElementNS(namespace, "pingResponse");
                    wrapper.setPrefix("ns4");
                    body.removeChild(body.getFirstChild());
                    body.appendChild(wrapper);

                    for (String info : getHandlerInfoList(ctx)) {
                        // copy the previously invoked handler list into the response. 
                        // Ignore this handler's information as it will be added again later.
                        //
View Full Code Here

                    // build the SOAP response for this message
                    //
                    Node wrapper = doc.createElementNS(namespace, "pingResponse");
                    wrapper.setPrefix("ns4");
                    body.removeChild(body.getFirstChild());
                    body.appendChild(wrapper);

                    for (String info : getHandlerInfoList(ctx)) {
                        // copy the the previously invoked handler list into the response. 
                        // Ignore this handlers information as it will be added again later.
                        //
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.