Package javax.xml.soap

Examples of javax.xml.soap.Name


        return null;
    }

    public static SOAPBodyElement getJMSBodyElement(SOAPMessage message, String localName) throws SOAPException {

        Name name = createJMSName(localName);
        Iterator it = message.getSOAPBody().getChildElements(name);

        if (it.hasNext()) {
            return (SOAPBodyElement) it.next();
        }
View Full Code Here


    public static SOAPElement getJMSChildElement(SOAPElement soapElement, String localName) throws SOAPException {

        SOAPElement se = null;

        Name name = createJMSName(localName);

        Iterator it = soapElement.getChildElements(name);
        if (it.hasNext()) {
            se = (SOAPElement) it.next();
        }
View Full Code Here

        return se;
    }

    public static boolean isJMSPropertyExists(SOAPHeader sheader) throws SOAPException {

        Name pname = createJMSName(InternalConstants.JMS_PROPERTY);

        Iterator it = sheader.getChildElements(pname);

        if (it.hasNext()) {
            return true;
View Full Code Here

        // SOAPElement propEle = jmsPropertyRoot.addChildElement(eleName);
        SOAPElement propEle =
                MessageUtil.addJMSChildElement(jmsPropertyRoot, eleName);

        // pname attr
        Name propNameAttr = createJMSName(InternalConstants.PNAME);

        // pvalue attr
        Name propValueAttr = createJMSName(InternalConstants.PVALUE);

        // add pname attr
        propEle.addAttribute(propNameAttr, pname);
        // add pvalue attr.
        propEle.addAttribute(propValueAttr, pvalue.toString());
View Full Code Here

        return propEle;
    }

    public static Name createJMSName(String localName) throws SOAPException {

        Name name =
                soapFactory.createName(localName,
                Constants.JMS_NS_PREFIX, Constants.JMS_NS_URI);

        return name;
    }
View Full Code Here

    public static SOAPHeaderElement addJMSNsSOAPHeaderElement(SOAPHeader soapHeader, String localName)
            throws SOAPException {

        SOAPHeaderElement headerElement = null;

        Name mh = createJMSName(localName);

        headerElement = soapHeader.addHeaderElement(mh);

        addHeaderAttributes(headerElement);
View Full Code Here

    }

    public static void addHeaderAttributes(SOAPHeaderElement she)
            throws SOAPException {

        Name id = createJMSName(Constants.ID);
        she.addAttribute(id, "1.0");

        Name version = createJMSName(Constants.VERSION);
        she.addAttribute(version, "1.1");

    //she.setMustUnderstand(true);
    }
View Full Code Here

        addJMSChildElement(messageHeader, Constants.SERVICE);
    }

    public static SOAPElement addJMSChildElement(SOAPElement element, String localName) throws SOAPException {
        Name name = createJMSName(localName);
        SOAPElement se = element.addChildElement(name);
        return se;
    }
View Full Code Here

        SOAPHeaderElement mh = getMessageHeaderElement(soapm);

        SOAPElement serviceElement = getJMSChildElement(mh, Constants.SERVICE);

        Name n = createJMSName(localName);

        serviceElement.addAttribute(n, value);

        soapm.saveChanges();
    }
View Full Code Here

        if (serviceElement == null) {
            throw new SOAPException("Message does not contain a Service SOAP Header Element.");
        }

        Name n = createJMSName(localName);

        String value = serviceElement.getAttributeValue(n);

        return value;
    }
View Full Code Here

TOP

Related Classes of javax.xml.soap.Name

Copyright © 2018 www.massapicom. 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.