Package org.apache.axiom.om

Examples of org.apache.axiom.om.OMFactory.createOMAttribute()


   
    OMElement ref = factory.createOMElement("Reference", secNS);
    str.addChild(ref);
   
    OMAttribute uriAttr = factory.createOMAttribute("URI", null, uri);
    OMAttribute typeAttr = factory.createOMAttribute("ValueType", null, type);
   
    ref.addAttribute(uriAttr);
    ref.addAttribute(typeAttr);
   
    log.debug("Exit: UnitTestSecurityManager::createSecurityTokenReference " + str);
View Full Code Here


                SandeshaMessageKeys.ackRandDoesNotHaveCorrectValues,
                ackRange.upperValue + ":" + ackRange.lowerValue));

      OMFactory factory = sequenceAcknowledgementHeaderBlock.getOMFactory();
     
      OMAttribute lowerAttrib = factory.createOMAttribute(
          Sandesha2Constants.WSRM_COMMON.LOWER, null, Long.toString(ackRange.lowerValue));
      OMAttribute upperAttrib = factory.createOMAttribute(
          Sandesha2Constants.WSRM_COMMON.UPPER, null, Long.toString(ackRange.upperValue));

      OMElement acknowledgementRangeElement = factory.createOMElement(Sandesha2Constants.WSRM_COMMON.ACK_RANGE, omNamespace);
View Full Code Here

      OMFactory factory = sequenceAcknowledgementHeaderBlock.getOMFactory();
     
      OMAttribute lowerAttrib = factory.createOMAttribute(
          Sandesha2Constants.WSRM_COMMON.LOWER, null, Long.toString(ackRange.lowerValue));
      OMAttribute upperAttrib = factory.createOMAttribute(
          Sandesha2Constants.WSRM_COMMON.UPPER, null, Long.toString(ackRange.upperValue));

      OMElement acknowledgementRangeElement = factory.createOMElement(Sandesha2Constants.WSRM_COMMON.ACK_RANGE, omNamespace);
     
      acknowledgementRangeElement.addAttribute(lowerAttrib);
View Full Code Here

    public void testQNames() throws Exception {
        String ATTR = "attr";
        String NSURI = "http://ns1";
        OMFactory fac = new OMDOMFactory();
        OMNamespace ns = new NamespaceImpl(NSURI);
        OMAttribute attr = fac.createOMAttribute(ATTR, ns, "value");
        QName qname = attr.getQName();
        assertEquals("Wrong namespace", NSURI, qname.getNamespaceURI());
        assertEquals("Wrong localPart", ATTR, qname.getLocalPart());
        assertEquals("Wrong prefix", "", qname.getPrefix());
    }
View Full Code Here

    }

    OMFactory fac = OMAbstractFactory.getOMFactory();
    OMElement elem = fac.createOMElement(NAME);

    elem.addAttribute(fac.createOMAttribute(ATTR_LANG.getLocalPart(), fac.createOMNamespace(
        ATTR_LANG.getNamespaceURI(), ATTR_LANG.getPrefix()), this.lang));

    elem.addChild(this.informationCardReference.serialize());

    if (this.cardName != null) {
View Full Code Here

        OMFactory fac = OMAbstractFactory.getOMFactory();
        OMElement elem = fac.createOMElement(NAME);

        OMElement metadataSectionElem = fac.createOMElement(new QName(MEX_NS,
                "MetadataSection", MEX_REFIX), elem);
        metadataSectionElem.addAttribute(fac.createOMAttribute("Dialect", null,
                "http://schemas.xmlsoap.org/ws/2004/09/mex"));

        OMElement metadataRefElem = fac.createOMElement(new QName(MEX_NS,
                "MetadataReference", MEX_REFIX), metadataSectionElem);
View Full Code Here

public class LifecycleBeanPopulator {
    public static String serializeLifecycleBean(LifecycleBean bean) throws XMLStreamException {
        OMFactory factory = OMAbstractFactory.getOMFactory();
        OMElement aspect = factory.createOMElement("aspect", null);
        aspect.addAttribute(factory.createOMAttribute("name", null, bean.getName()));
        aspect.addAttribute(factory.createOMAttribute("class", null, bean.getReflectionClassName()));
        OMElement configuration = factory.createOMElement("configuration", null);
        configuration.addAttribute(factory.createOMAttribute("type", null, "literal"));
        OMElement lifecycle = factory.createOMElement("lifecycle", null);
View Full Code Here

public class LifecycleBeanPopulator {
    public static String serializeLifecycleBean(LifecycleBean bean) throws XMLStreamException {
        OMFactory factory = OMAbstractFactory.getOMFactory();
        OMElement aspect = factory.createOMElement("aspect", null);
        aspect.addAttribute(factory.createOMAttribute("name", null, bean.getName()));
        aspect.addAttribute(factory.createOMAttribute("class", null, bean.getReflectionClassName()));
        OMElement configuration = factory.createOMElement("configuration", null);
        configuration.addAttribute(factory.createOMAttribute("type", null, "literal"));
        OMElement lifecycle = factory.createOMElement("lifecycle", null);

        LifecycleStateBean[] states = bean.getStates();
View Full Code Here

        OMFactory factory = OMAbstractFactory.getOMFactory();
        OMElement aspect = factory.createOMElement("aspect", null);
        aspect.addAttribute(factory.createOMAttribute("name", null, bean.getName()));
        aspect.addAttribute(factory.createOMAttribute("class", null, bean.getReflectionClassName()));
        OMElement configuration = factory.createOMElement("configuration", null);
        configuration.addAttribute(factory.createOMAttribute("type", null, "literal"));
        OMElement lifecycle = factory.createOMElement("lifecycle", null);

        LifecycleStateBean[] states = bean.getStates();
        for(LifecycleStateBean lifecycleState:states) {
            OMElement state = factory.createOMElement("state", null);
View Full Code Here

        OMElement lifecycle = factory.createOMElement("lifecycle", null);

        LifecycleStateBean[] states = bean.getStates();
        for(LifecycleStateBean lifecycleState:states) {
            OMElement state = factory.createOMElement("state", null);
            state.addAttribute(factory.createOMAttribute("name", null, lifecycleState.getStateName()));
            if (lifecycleState.getLocation() != null)
                state.addAttribute(factory.createOMAttribute("location", null, lifecycleState.getLocation()));

            ChecklistBean checklistBean = lifecycleState.getChecklist();
            if (checklistBean != null) {
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.