Package org.apache.axiom.om

Examples of org.apache.axiom.om.OMElement.declareNamespace()


                    int count = reader.getNamespaceCount();
                    for (int i = 0; i < count; i++) {
                        String prefix = reader.getNamespacePrefix(i);
                        String ns = reader.getNamespaceURI(i);
                        child.declareNamespace(ns, prefix);
                    }

                    if(!"".equals(name.getNamespaceURI())) {
                        child.declareNamespace(name.getNamespaceURI(), name.getPrefix());
                    }
View Full Code Here


                        String ns = reader.getNamespaceURI(i);
                        child.declareNamespace(ns, prefix);
                    }

                    if(!"".equals(name.getNamespaceURI())) {
                        child.declareNamespace(name.getNamespaceURI(), name.getPrefix());
                    }

                    // add the attributes for this element
                    count = reader.getAttributeCount();
                    for (int i = 0; i < count; i++) {
View Full Code Here

                            omNs = fac.createOMNamespace(ns, prefix);
                        }
                           
                        child.addAttribute(qname, value, omNs);
                        if (ns != null) {
                            child.declareNamespace(ns, prefix);
                        }
                    }
                    current = child;
                    break;
                case XMLStreamConstants.CDATA:
View Full Code Here

                    int count = reader.getNamespaceCount();
                    for (int i = 0; i < count; i++) {
                        String prefix = reader.getNamespacePrefix(i);
                        String ns = reader.getNamespaceURI(i);
                        child.declareNamespace(ns, prefix);
                    }

                    if(!"".equals(name.getNamespaceURI())) {
                        child.declareNamespace(name.getNamespaceURI(), name.getPrefix());
                    }
View Full Code Here

                        String ns = reader.getNamespaceURI(i);
                        child.declareNamespace(ns, prefix);
                    }

                    if(!"".equals(name.getNamespaceURI())) {
                        child.declareNamespace(name.getNamespaceURI(), name.getPrefix());
                    }

                    // add the attributes for this element
                    count = reader.getAttributeCount();
                    for (int i = 0; i < count; i++) {
View Full Code Here

                        String qname = reader.getAttributeLocalName(i);
                        String value = reader.getAttributeValue(i);
                       
                        if (ns != null) {
                            child.addAttribute(qname, value, fac.createOMNamespace(ns, prefix));
                            child.declareNamespace(ns, prefix);
                        } else {
                            child.addAttribute(qname, value, null);
                        }
                    }
                    current = child;
View Full Code Here

                header.addAttribute(fac.createOMAttribute(
                    "name", nullNS,
                    (qName.getPrefix() != null && !"".equals(qName.getPrefix())
                        ? qName.getPrefix() + ":" : "") +
                    qName.getLocalPart()));
                header.declareNamespace(qName.getNamespaceURI(), qName.getPrefix());
            } else {
                header.addAttribute(fac.createOMAttribute(
                    "name", nullNS, qName.getLocalPart()));
            }
        }
View Full Code Here

            factory.createOMNamespace("urn:oasis:names:tc:SAML:2.0:protocol",
                                      "samlp");
        OMElement response =
            factory.createOMElement("Response", samlp, soapBody);
        OMNamespace saml =
            response.declareNamespace("urn:oasis:names:tc:SAML:2.0:assertion",
                                      "saml");

        response.addAttribute("ID", "foo1", null);
        response.addAttribute("Version", "2.0", null);
        response.addAttribute("IssueInstant", strCurrentDate, null);
View Full Code Here

  @SuppressWarnings("unchecked")
  public OMElement createCall(String sessionId, String methodPath, Object arg) {
    OMElement method = fac.createOMElement(CORE_CALL, mag);

    // Register XML namespaces in method
    method.declareNamespace(soapEnc);
    method.declareNamespace(soapXml);
    method.declareNamespace(xsi);
    method.declareNamespace(xsd);

    OMElement paramSession = fac.createOMElement(SESSION_ID, noNs);
View Full Code Here

  public OMElement createCall(String sessionId, String methodPath, Object arg) {
    OMElement method = fac.createOMElement(CORE_CALL, mag);

    // Register XML namespaces in method
    method.declareNamespace(soapEnc);
    method.declareNamespace(soapXml);
    method.declareNamespace(xsi);
    method.declareNamespace(xsd);

    OMElement paramSession = fac.createOMElement(SESSION_ID, noNs);
    paramSession.addChild(fac.createOMText(paramSession, sessionId));
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.