Package javax.xml.soap

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


        Name elementName2 = sf.createName("UKAddress", "", "http://objectweb.org/type_test");
        Name xsiAttrName2 = sf.createName("type", "xsi", "http://www.w3.org/2001/XMLSchema-instance");
        SOAPElement x2 = sf.createElement(elementName2);
        x2.addNamespaceDeclaration("tns", "http://objectweb.org/type_test");
        x2.addNamespaceDeclaration("xsi", "http://www.w3.org/2001/XMLSchema-instance");
        x2.addAttribute(xsiAttrName2, "tns:UKAddressType22");
        x2.addTextNode("This is the text of the node for the second struct");

        swa.setAny(x);
        yOrig.setAny(x2);
View Full Code Here


        Name elementName = sf.createName("UKAddress", "", "http://objectweb.org/type_test");
        Name xsiAttrName = sf.createName("type", "xsi", "http://www.w3.org/2001/XMLSchema-instance");
        SOAPElement x = sf.createElement(elementName);
        x.addNamespaceDeclaration("tns", "http://objectweb.org/type_test");
        x.addNamespaceDeclaration("xsi", "http://www.w3.org/2001/XMLSchema-instance");
        x.addAttribute(xsiAttrName, "tns:UKAddressType11");
        x.addTextNode("This is the text of the node for the first struct");

        Name elementName2 = sf.createName("UKAddress", "", "http://objectweb.org/type_test");
        Name xsiAttrName2 = sf.createName("type", "xsi", "http://www.w3.org/2001/XMLSchema-instance");
        SOAPElement x2 = sf.createElement(elementName2);
View Full Code Here

            for (int i = 0; i < atts.getLength(); i++) {
                if (StringUtils.hasLength(atts.getLocalName(i))) {
                    String attributePrefix = getPrefix(atts.getQName(i));
                    if (!"xmlns".equals(atts.getLocalName(i)) && !"xmlns".equals(attributePrefix)) {
                        Name attributeName = envelope.createName(atts.getLocalName(i), attributePrefix, atts.getURI(i));
                        child.addAttribute(attributeName, atts.getValue(i));
                    }
                }
            }
            for (String namespacePrefix : namespaces.keySet()) {
                String namespaceUri = namespaces.get(namespacePrefix);
View Full Code Here

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

        // add pname attr
        propEle.addAttribute(propNameAttr, pname);
        // add pvalue attr.
        propEle.addAttribute(propValueAttr, pvalue.toString());

        // System.out.println ("Message util setting prop attributes for "
        // + eleName + ", " + pname + "=" +pvalue);
View Full Code Here

        Name propValueAttr = createJMSName(InternalConstants.PVALUE);

        // add pname attr
        propEle.addAttribute(propNameAttr, pname);
        // add pvalue attr.
        propEle.addAttribute(propValueAttr, pvalue.toString());

        // System.out.println ("Message util setting prop attributes for "
        // + eleName + ", " + pname + "=" +pvalue);

        return propEle;
View Full Code Here

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

        Name n = createJMSName(localName);

        serviceElement.addAttribute(n, value);

        soapm.saveChanges();
    }

    public static String getServiceAttribute(SOAPMessage soapm, String localName) throws SOAPException {
View Full Code Here

    //  create the BinarySecurityToken element
    Name binarySecurityTokenName = soapEnvelope.createName("BinarySecurityToken", "wsse", SoapConstants.WSSE_NS);
      SOAPElement binarySecurityTokenElement = headerElement.addChildElement(binarySecurityTokenName);
     
      //  add the EncodingType attribute
      binarySecurityTokenElement.addAttribute(soapEnvelope.createName("EncodingType"), encodingType);
      //  add the ValueType attribute
      binarySecurityTokenElement.addAttribute(soapEnvelope.createName("ValueType"), valueType);
      //  add the certificate as a text node
      binarySecurityTokenElement.addTextNode(cert);
      return binarySecurityTokenElement;
View Full Code Here

      SOAPElement binarySecurityTokenElement = headerElement.addChildElement(binarySecurityTokenName);
     
      //  add the EncodingType attribute
      binarySecurityTokenElement.addAttribute(soapEnvelope.createName("EncodingType"), encodingType);
      //  add the ValueType attribute
      binarySecurityTokenElement.addAttribute(soapEnvelope.createName("ValueType"), valueType);
      //  add the certificate as a text node
      binarySecurityTokenElement.addTextNode(cert);
      return binarySecurityTokenElement;
  }
 
View Full Code Here

        Name elementName = sf.createName("UKAddress", "", "http://apache.org/type_test");
        Name xsiAttrName = sf.createName("type", "xsi", "http://www.w3.org/2001/XMLSchema-instance");
        SOAPElement x = sf.createElement(elementName);
        x.addNamespaceDeclaration("tns", "http://apache.org/type_test");
        x.addNamespaceDeclaration("xsi", "http://www.w3.org/2001/XMLSchema-instance");
        x.addAttribute(xsiAttrName, "tns:UKAddressType11");
        x.addTextNode("This is the text of the node for the first struct");

        Name elementName2 = sf.createName("UKAddress", "", "http://apache.org/type_test");
        Name xsiAttrName2 = sf.createName("type", "xsi", "http://www.w3.org/2001/XMLSchema-instance");
        SOAPElement x2 = sf.createElement(elementName2);
View Full Code Here

        Name elementName2 = sf.createName("UKAddress", "", "http://apache.org/type_test");
        Name xsiAttrName2 = sf.createName("type", "xsi", "http://www.w3.org/2001/XMLSchema-instance");
        SOAPElement x2 = sf.createElement(elementName2);
        x2.addNamespaceDeclaration("tns", "http://apache.org/type_test");
        x2.addNamespaceDeclaration("xsi", "http://www.w3.org/2001/XMLSchema-instance");
        x2.addAttribute(xsiAttrName2, "tns:UKAddressType22");
        x2.addTextNode("This is the text of the node for the second struct");

        swa.setAny(x);
        yOrig.setAny(x2);
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.