Package javax.xml.soap

Examples of javax.xml.soap.SOAPElement.addNamespaceDeclaration()


    @Test
    public void testStructWithAnyArrayLaxComplex() throws Exception {
        SOAPFactory factory = SOAPFactory.newInstance();
        SOAPElement elem = factory.createElement("AnonTypeElementQualified", "x1",
            "http://apache.org/type_test/types1");
        elem.addNamespaceDeclaration("x1", "http://apache.org/type_test/types1");
        SOAPElement floatElem = factory.createElement("varFloat", "x1",
            "http://apache.org/type_test/types1");
        floatElem.addTextNode("12.76");
        elem.addChildElement(floatElem);
        SOAPElement intElem = factory.createElement("varInt", "x1",
View Full Code Here


            SOAPElement issuerSerialElement = (SOAPElement) delegate.getElement();
            SOAPElement x509DataElement =
                (SOAPElement) ownerDoc.createElementNS(
                    MessageConstants.DSIG_NS,
                    MessageConstants.DSIG_PREFIX + ":X509Data");
            x509DataElement.addNamespaceDeclaration(
                MessageConstants.DSIG_PREFIX, MessageConstants.DSIG_NS);
            x509DataElement.addChildElement(issuerSerialElement);
            setSOAPElement(x509DataElement);
            return x509DataElement;
        } catch (Exception e) {
View Full Code Here

    }

    private static void addHeader(Message m, Set<QName> notUnderstoodHeaders) throws SOAPException {
        for (QName qname : notUnderstoodHeaders) {
            SOAPElement soapEl = SOAP_12.saajSoapFactory.createElement(MU_HEADER_DETAIL);
            soapEl.addNamespaceDeclaration("abc", qname.getNamespaceURI());
            soapEl.setAttribute("qname", "abc:" + qname.getLocalPart());
            Header header = new DOMHeader<Element>(soapEl);
            m.getHeaders().add(header);
        }
    }
View Full Code Here

    public static Element createInstanceIdentifierElement(final String instanceIdentifier)
    {
        try {
            SOAPElement element = factory.createElement(WSARJ_ELEMENT_INSTANCE_NAME);
            element.addNamespaceDeclaration(ArjunaConstants.WSARJ_PREFIX, ArjunaConstants.WSARJ_NAMESPACE);
            element.addTextNode(instanceIdentifier);
            return element;
        } catch (SOAPException se) {
            // TODO log error here (should never happen)
            return null;
View Full Code Here

    @Test
    public void testStructWithAnyStrict() throws Exception {
        SOAPFactory factory = SOAPFactory.newInstance();
        SOAPElement elem = factory.createElement("StringElementQualified",
            "x1", "http://apache.org/type_test/types1");
        elem.addNamespaceDeclaration("x1", "http://apache.org/type_test/types1");
        elem.addTextNode("This is the text of the node");

        StructWithAnyStrict x = new StructWithAnyStrict();
        x.setName("Name x");
        x.setAddress("Some Address x");
View Full Code Here

        x.setAddress("Some Address x");
        x.setAny(elem);
       
        elem = factory.createElement("StringElementQualified",
            "x1", "http://apache.org/type_test/types1");
        elem.addNamespaceDeclaration("x1", "http://apache.org/type_test/types1");
        elem.addTextNode("This is the text of the second node");
                               
        StructWithAnyStrict yOrig = new StructWithAnyStrict();
        yOrig.setName("Name y");
        yOrig.setAddress("Some Address y");
View Full Code Here

    @Test
    public void testStructWithAnyStrictComplex() throws Exception {
        SOAPFactory factory = SOAPFactory.newInstance();
        SOAPElement elem = factory.createElement("AnonTypeElementQualified",
            "x1", "http://apache.org/type_test/types1");
        elem.addNamespaceDeclaration("x1", "http://apache.org/type_test/types1");
        SOAPElement floatElem = factory.createElement("varFloat", "x1",
            "http://apache.org/type_test/types1");
        floatElem.addTextNode("12.5");
        elem.addChildElement(floatElem);
        SOAPElement intElem = factory.createElement("varInt", "x1",
View Full Code Here

    @Test
    public void testStructWithAnyArrayLax() throws Exception {
        SOAPFactory factory = SOAPFactory.newInstance();
        SOAPElement elem = factory.createElement("StringElementQualified",
            "x1", "http://apache.org/type_test/types1");
        elem.addNamespaceDeclaration("x1", "http://apache.org/type_test/types1");
        elem.addTextNode("This is the text of the node");

        StructWithAnyArrayLax x = new StructWithAnyArrayLax();
        x.setName("Name x");
        x.setAddress("Some Address x");
View Full Code Here

        x.setAddress("Some Address x");
        x.getAny().add(elem);

        elem = factory.createElement("StringElementQualified", "x1",
            "http://apache.org/type_test/types1");
        elem.addNamespaceDeclaration("x1", "http://apache.org/type_test/types1");
        elem.addTextNode("This is the text of the node for the second struct");

        StructWithAnyArrayLax yOrig = new StructWithAnyArrayLax();
        yOrig.setName("Name y");
        yOrig.setAddress("Some Other Address y");
View Full Code Here

    @Test
    public void testStructWithAnyArrayLaxComplex() throws Exception {
        SOAPFactory factory = SOAPFactory.newInstance();
        SOAPElement elem = factory.createElement("AnonTypeElementQualified", "x1",
            "http://apache.org/type_test/types1");
        elem.addNamespaceDeclaration("x1", "http://apache.org/type_test/types1");
        SOAPElement floatElem = factory.createElement("varFloat", "x1",
            "http://apache.org/type_test/types1");
        floatElem.addTextNode("12.76");
        elem.addChildElement(floatElem);
        SOAPElement intElem = factory.createElement("varInt", "x1",
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.