Package javax.xml.soap

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


                                  "shw",
                                  "http://www.jcommerce.net/soap/ns/SOAPHelloWorld");
        SOAPElement city = bodyElmnt.addChildElement(ns1);
        city.addTextNode("GENT");

        SOAPElement city2 = body.addChildElement(ns1);
        assertTrue(city2 instanceof SOAPBodyElement);
        city2.addTextNode("CIT2");

        Iterator it = body.getChildElements();
        int count = 0;
View Full Code Here


            SOAPMessage message = fact.createMessage();
            SOAPBody soapBody = message.getSOAPBody();

            QName qname1 = new QName("http://wombat.ztrade.com",
                                     "GetLastTradePrice", "ztrade");
            SOAPElement child1 = soapBody.addChildElement(qname1);
            Document document = soapBody.extractContentAsDocument();

            assertNotNull(document);
            assertTrue(document instanceof Document);
            Element element = document.getDocumentElement();
View Full Code Here

        Iterator iStart = body.getChildElements();
        int countStart = getIteratorCount(iStart);

        final String bodyText = "This is the body text";

        SOAPElement se = body.addChildElement("Child");
        assertTrue(se != null);
        SOAPElement soapElement = se.addTextNode(bodyText);
        assertEquals(bodyText, soapElement.getValue());

        Iterator i = body.getChildElements();
View Full Code Here

    @Validated @Test
    public void testNonCommentText() throws Exception {
        SOAPEnvelope envelope = getSOAPEnvelope();
        SOAPBody body = envelope.getBody();
        SOAPElement se = body.addChildElement("Child");
        se.addTextNode("This is text");
        Iterator iterator = se.getChildElements();
        Object o = null;
        while (iterator.hasNext()) {
            o = iterator.next();
View Full Code Here

    @Validated @Test
    public void testCommentText() throws Exception {
        SOAPEnvelope envelope = getSOAPEnvelope();
        SOAPBody body = envelope.getBody();
        SOAPElement se = body.addChildElement("Child");
        se.addTextNode("<!-- This is a comment -->");
        Iterator iterator = se.getChildElements();
        Node n = null;
        while (iterator.hasNext()) {
            n = (Node)iterator.next();
View Full Code Here

        log("Constructing the code signing request");

        SOAPMessage message = SOAP_MSG_FACTORY.createMessage();
        SOAPBody body = populateEnvelope(message, NS);

        SOAPElement requestSigning = body.addChildElement("requestSigning", NS);
        SOAPElement requestSigningRequest =
                requestSigning.addChildElement("requestSigningRequest", NS);

        addCredentials(requestSigningRequest, this.userName, this.password, this.partnerCode);
View Full Code Here

        log("Downloading signed files. The signing set ID is: " + id);

        SOAPMessage message = SOAP_MSG_FACTORY.createMessage();
        SOAPBody body = populateEnvelope(message, NS);

        SOAPElement getSigningSetDetails = body.addChildElement("getSigningSetDetails", NS);
        SOAPElement getSigningSetDetailsRequest =
                getSigningSetDetails.addChildElement("getSigningSetDetailsRequest", NS);

        addCredentials(getSigningSetDetailsRequest, this.userName, this.password, this.partnerCode);
View Full Code Here

        cdataElem.appendChild(cdata);
   
        input[2] = new SOAPBodyElement(cdataElem);
       
        for(int i=0; i<input.length; i++) {
            body.addChildElement(input[i]);
        }
       
        ByteArrayInputStream bais = new ByteArrayInputStream(env.toString().getBytes());
        SOAPEnvelope env2 = new org.apache.axis.message.SOAPEnvelope(bais);
       
View Full Code Here

        commentsElem.appendChild(text);
   
        input[2] = new SOAPBodyElement(commentsElem);
       
        for(int i=0; i<input.length; i++) {
            body.addChildElement(input[i]);
        }
       
        ByteArrayInputStream bais = new ByteArrayInputStream(env.toString().getBytes());
        SOAPEnvelope env2 = new org.apache.axis.message.SOAPEnvelope(bais);
       
View Full Code Here

        String s = "MyName1";
        String p = "MyPrefix1";
        String u = "myURI";
        SOAPBody body = MessageFactory.newInstance().createMessage().getSOAPBody();
        SOAPElement myse = body.addNamespaceDeclaration(p, u);
        SOAPElement se = body.addChildElement(s, p);
        if (se == null) {
            fail("SOAPElement was null");
        } else {
            Iterator i = body.getChildElements();
            int count = getIteratorCount(i);
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.