Package javax.xml.soap

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


        SOAPBody body = envelope.getBody();

        header.detachNode();

        Name bodyName = envelope.createName("getQuote", "n", "urn:xmethods-delayed-quotes");
        SOAPBodyElement gltp = body.addBodyElement(bodyName);

        Name name = envelope.createName("symbol");
        SOAPElement symbol = gltp.addChildElement(name);
        symbol.addTextNode(tickerSymbol);
View Full Code Here


        SOAPEnvelope envelope = msg.getSOAPPart().getEnvelope();

        // Get hold of the the body
        SOAPBody body = envelope.getBody();

        javax.xml.soap.SOAPBodyElement bodyElement = body.addBodyElement(envelope.createName("find_business", "",
                "urn:uddi-org:api"));

        bodyElement.addAttribute(envelope.createName("generic"), "1.0")
                .addAttribute(envelope.createName("maxRows"), "100")
                .addChildElement("name")
View Full Code Here

                messageFactory.createMessage();
        SOAPPart soapPart = soapMessage.getSOAPPart();
        SOAPEnvelope requestEnvelope =
                soapPart.getEnvelope();
        SOAPBody body = requestEnvelope.getBody();
        SOAPBodyElement operation = body.addBodyElement
                (requestEnvelope.createName("echo"));

        Vector dataHandlersToAdd = new Vector();
        dataHandlersToAdd.add(new DataHandler(new FileDataSource(new
                File(filename))));
View Full Code Here

     */
    static SOAPBodyElement createActionElement(SOAPMessage message,
            String request) throws SOAPException {
        SOAPEnvelope env = message.getSOAPPart().getEnvelope();
        SOAPBody body = env.getBody();
        return body.addBodyElement(env.createName(request, "wfx",
                Basic.WFXML_NS));
    }
   
    /**
     * Calls the default endpoint with the given message.
View Full Code Here

        SOAPEnvelope respEnv = respMsg.getSOAPPart().getEnvelope();
        SOAPBody respBody = respEnv.getBody();
        Name respName = respEnv.createName(nodeName, Consts.WFXML_PREFIX,
                Consts.WFXML_NS);
       
        SOAPBodyElement node = respBody.addBodyElement(respName);
        node.addNamespaceDeclaration(Consts.ASAP_PREFIX, Consts.ASAP_NS);
       
        return node;
    }
View Full Code Here

        SOAPEnvelope respEnv = respMsg.getSOAPPart().getEnvelope();
        SOAPBody respBody = respEnv.getBody();
        Name respName = respEnv.createName(nodeName, Consts.ASAP_PREFIX,
                Consts.ASAP_NS);

        SOAPBodyElement node = respBody.addBodyElement(respName);

        return node;
    }

    /**
 
View Full Code Here

       
        SOAPBody body = env.getBody();
        Name respName = env.createName(Consts.STATE_CHANGE_REQUEST,
                Consts.ASAP_PREFIX, Consts.ASAP_NS);

        SOAPBodyElement action = body.addBodyElement(respName);
        SOAPElement newStateNode
            = action.addChildElement("State", Consts.ASAP_PREFIX);
        newStateNode.addTextNode(newState);
        SOAPElement oldStateNode
            = action.addChildElement("PreviousState", Consts.ASAP_PREFIX);
View Full Code Here

       
        SOAPBody body = env.getBody();
        Name respName = env.createName(Consts.COMPLETED_REQUEST,
                Consts.ASAP_PREFIX, Consts.ASAP_NS);

        SOAPBodyElement action = body.addBodyElement(respName);
        appendResultData(message, result, action);
       
        return message;
    }
View Full Code Here

        // Echo back
        logger.debug("envelopeTest Called");
        SOAPBody body = resp.getBody();
        Name ns0 = resp.createName("TestNS0", "ns0", "http://example.com");
        Name ns1 = resp.createName("TestNS1", "ns1", "http://example.com");
        SOAPElement bodyElmnt = body.addBodyElement(ns0);
        SOAPElement el = bodyElmnt.addChildElement(ns1);
        el.addTextNode("TEST RESPONSE");
    }
}
View Full Code Here

        */
       
        final String SOAP_ENV = "http://schemas.xmlsoap.org/soap/envelope/";
        SOAPBody sb = se.getBody();
        SOAPBodyElement fault
            = sb.addBodyElement(se.createName("Fault", "SOAP_ENV", SOAP_ENV));
        fault.addChildElement("faultstring")
            .addTextNode(errorMessage);
        SOAPElement detail = fault.addChildElement("detail");
        detail.addChildElement
            ("ErrorCode", Consts.ASAP_PREFIX, Consts.ASAP_NS)
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.