Package javax.xml.soap

Examples of javax.xml.soap.SOAPEnvelope.createName()


        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);

        URLEndpoint endpoint = new URLEndpoint("http://66.28.98.121:9090/soap");
        SOAPMessage response = con.call(message, endpoint);
View Full Code Here


                "Message does not have necessary info");
        fault.setFaultActor("http://gizmos.com/order");

        Detail detail = fault.addDetail();

        Name entryName = envelope.createName("order", "PO",
                "http://gizmos.com/orders/");
        DetailEntry entry = detail.addDetailEntry(entryName);
        entry.addTextNode(
                "quantity element does not have a value");
View Full Code Here

                "http://gizmos.com/orders/");
        DetailEntry entry = detail.addDetailEntry(entryName);
        entry.addTextNode(
                "quantity element does not have a value");

        Name entryName2 = envelope.createName("confirmation",
                "PO", "http://gizmos.com/confirm");
        DetailEntry entry2 = detail.addDetailEntry(entryName2);
        entry2.addTextNode("Incomplete address: no zip code");

        msg.saveChanges();
View Full Code Here

        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

            while (dataHandlerIterator.hasNext()) {
                DataHandler dataHandler = (DataHandler)
                        dataHandlerIterator.next();
                javax.xml.soap.SOAPElement element =
                        operation.addChildElement(requestEnvelope.createName("source"));
                javax.xml.soap.AttachmentPart attachment =
                        soapMessage.createAttachmentPart(dataHandler);
                soapMessage.addAttachmentPart(attachment);
                element.addAttribute(requestEnvelope.createName
                                     ("href"), "cid:" + attachment.getContentId());
View Full Code Here

                javax.xml.soap.SOAPElement element =
                        operation.addChildElement(requestEnvelope.createName("source"));
                javax.xml.soap.AttachmentPart attachment =
                        soapMessage.createAttachmentPart(dataHandler);
                soapMessage.addAttachmentPart(attachment);
                element.addAttribute(requestEnvelope.createName
                                     ("href"), "cid:" + attachment.getContentId());
            }
        }
        javax.xml.soap.SOAPMessage returnedSOAPMessage =
                soapConnection.call(soapMessage, endPointURLString);
View Full Code Here

    throws SAXException {
        try {
            HandlerStack stack = getStack();
            SOAPEnvelope env = (SOAPEnvelope) stack.getContextData ("envelope");
            String prefix = stack.getPrefixForURI(namespaceURI);
            Name name = env.createName (localName, prefix, namespaceURI);
            SOAPElement parent = (SOAPElement)elemStack.get(0);
            SOAPElement current = null;
            if (parent instanceof SOAPBody) {
                current = ((SOAPBody)parent).addBodyElement (name);
            } else if (parent instanceof SOAPHeader) {
View Full Code Here

    static void fillRequestHeadet(SOAPMessage message, String receiver,
            String sender, String id) throws SOAPException {
        SOAPEnvelope env = message.getSOAPPart().getEnvelope();
        SOAPHeader header = env.getHeader ();
        SOAPHeaderElement req = header.addHeaderElement
            (env.createName("Request", "as", Basic.ASAP_NS));
        SOAPElement receiverkey = req.addChildElement("ReceiverKey", "as");
        receiverkey.addTextNode(receiver);
        SOAPElement senderkey = req.addChildElement("SenderKey", "as");
        senderkey.addTextNode(sender);
        if (id != null) {
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

        SOAPMessage message = messageFactory.createMessage();
       
        SOAPEnvelope env = message.getSOAPPart().getEnvelope();
        SOAPHeader header = env.getHeader ();
        SOAPHeaderElement req = header.addHeaderElement
            (env.createName("Request", "as", Consts.ASAP_NS));
        SOAPElement receiverkey
            = req.addChildElement("ReceiverKey", Consts.ASAP_PREFIX);
        receiverkey.addTextNode(observer);
        SOAPElement senderkey = req.addChildElement("SenderKey",
                Consts.ASAP_PREFIX);
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.