Package org.apache.axiom.om

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


            GFacAPI gfacAPI1 = new GFacAPI();
            gfacAPI1.submitJob(jobExecutionContext);

            OMFactory fac = OMAbstractFactory.getOMFactory();
            OMNamespace omNs = fac.createOMNamespace("http://ws.apache.org/axis2/xsd", "ns1");
            OMElement outputElement = fac.createOMElement("invokeResponse", omNs);
            MessageContext outMessageContext = jobExecutionContext.getOutMessageContext();
            Set<String> paramNames = outMessageContext.getParameters().keySet();
            for (String paramName : paramNames) {
                /*
 
View Full Code Here


            int wstVersion) throws RampartException {
        try {
            log.debug("Creating RSTTemplate for an SCT request");
            OMFactory fac = OMAbstractFactory.getOMFactory();
           
            OMNamespace wspNs = fac.createOMNamespace(SPConstants.P_NS, "wsp");
            OMElement rstTempl = fac.createOMElement(
                    SPConstants.REQUEST_SECURITY_TOKEN_TEMPLATE,
                    wspNs);
           
            //Create TokenType element and set the value
View Full Code Here

     
      for ( Iterator iterator = decNamespacess.keySet().iterator(); iterator.hasNext();) {
          String prefix  = (String) iterator.next();
          String ns = (String) decNamespacess.get(prefix);
          OMFactory omFactory = currentElement.getOMFactory();
          OMNamespace namespace = omFactory.createOMNamespace(ns, prefix);
          results.add(namespace);
         
      }
     
      return results;
View Full Code Here

    String uri = ((UnitTestSecurityToken)token).getURI();
    String type = ((UnitTestSecurityToken)token).getValueType();
   
    OMFactory factory = OMAbstractFactory.getOMFactory();
    OMNamespace secNS = factory.createOMNamespace(secNamespace, "wsse");
    OMElement str = factory.createOMElement("SecurityTokenReference", secNS);
   
    OMElement ref = factory.createOMElement("Reference", secNS);
    str.addChild(ref);
   
View Full Code Here

    SOAPEnvelope env = outboundMessage.getEnvelope();
    OMFactory factory = env.getOMFactory();

    SOAPHeader headers = env.getHeader();

    OMNamespace namespace = factory.createOMNamespace(unitTestHeader.getNamespaceURI(), "sec");
    OMElement header = headers.addHeaderBlock(unitTestHeader.getLocalPart(), namespace);
    header.setText(key);

    log.debug("Exit: UnitTestSecurityManager::applySecurityToken");
  }
View Full Code Here

   
  }

  private OMElement getMTOMPingOMBlock() throws AxisFault {
    OMFactory fac = OMAbstractFactory.getOMFactory();
    OMNamespace namespace = fac.createOMNamespace(applicationNamespaceName, "ns1");
    OMElement pingElem = fac.createOMElement(MTOMping, namespace);

    OMElement attachElem = fac.createOMElement(Attachment, namespace);

    File file = new File(SOURCE_IMAGE_FILE);
View Full Code Here

        return PolicyEngine.getPolicy(builder.getDocumentElement());
    }
   
    private static OMElement getPayload(String value) {
        OMFactory factory = OMAbstractFactory.getOMFactory();
        OMNamespace ns = factory.createOMNamespace("http://sample02.policy.samples.rampart.apache.org","ns1");
        OMElement elem = factory.createOMElement("echo", ns);
        OMElement childElem = factory.createOMElement("param0", null);
        childElem.setText(value);
        elem.addChild(childElem);
       
View Full Code Here

            XMLType xmlType = (XMLType)logical;
            if (xmlType.isElement() && !xmlType.getElementName().equals(element.getQName())) {
                // FIXME:: Throw exception or switch to the new Element?
                OMFactory factory = OMAbstractFactory.getOMFactory();
                QName name = xmlType.getElementName();
                OMNamespace namespace = factory.createOMNamespace(name.getNamespaceURI(), name.getPrefix());
                element.setNamespace(namespace);
                element.setLocalName(name.getLocalPart());
            }
        }
    }
View Full Code Here

        return PolicyEngine.getPolicy(builder.getDocumentElement());
    }
   
    private static OMElement getPayload(String value) {
        OMFactory factory = OMAbstractFactory.getOMFactory();
        OMNamespace ns = factory.createOMNamespace("http://sample03.policy.samples.rampart.apache.org","ns1");
        OMElement elem = factory.createOMElement("echo", ns);
        OMElement childElem = factory.createOMElement("param0", null);
        childElem.setText(value);
        elem.addChild(childElem);
       
View Full Code Here

            XMLType xmlType = (XMLType)logical;
            if (xmlType.isElement() && !xmlType.getElementName().equals(element.getQName())) {
                // FIXME:: Throw exception or switch to the new Element?
                OMFactory factory = OMAbstractFactory.getOMFactory();
                QName name = xmlType.getElementName();
                OMNamespace namespace = factory.createOMNamespace(name.getNamespaceURI(), name.getPrefix());
                element.setNamespace(namespace);
                element.setLocalName(name.getLocalPart());
            }
        }
    }
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.