Examples of addNamespace()


Examples of org.apache.woden.wsdl20.xml.DescriptionElement.addNamespace()

        nonExistantNamespace = new URI("http://apache.org/nonExistantNamespace");
    }
   
    public void testAddGetNamespace() {
        DescriptionElement descriptionElement = factory.newDescription();
        descriptionElement.addNamespace(prefix1,namespace1);
        descriptionElement.addNamespace(null, namespace2);
       
            //Get namespace and prefix on description
            URI uri = descriptionElement.getNamespaceURI(prefix1);
            assertEquals("Retrieved NamespaceURI does not match that set", namespace1, uri);
View Full Code Here

Examples of org.apache.woden.wsdl20.xml.InterfaceElement.addNamespace()

            //Get undefined namespace and prefix.
            assertNull("Null was not returned when a non-existent namespace prefix was given", descriptionElement.getNamespaceURI(nonExistantPrefix));
            assertNull("Null was not returned when a non-existent namespace URI was given", descriptionElement.getNamespacePrefix(nonExistantNamespace));
   
        InterfaceElement interfaceElement = descriptionElement.addInterfaceElement();
        interfaceElement.addNamespace(prefix3, namespace3);
       
            //Get namespace and prefix on description
            uri = interfaceElement.getNamespaceURI(prefix1);
            assertEquals("Retrieved NamespaceURI does not match that set", namespace1, uri);
   
View Full Code Here

Examples of org.apache.xmlbeans.QNameSetBuilder.addNamespace()

                    {
                        if (rnd.nextInt(2) == 0)
                            current.removeNamespace(namespace[h]);
                        else
                        {
                            current.addNamespace(namespace[h]);
                            contents[width - 1 + width * h] = true;
                        }
                        for (int k = 0; k < width - 1; k++)
                        {
                            if (rnd.nextInt(2) == 0)
View Full Code Here

Examples of org.castor.xmlctf.xmldiff.xml.nodes.Element.addNamespace()

        _currentNode.addChild(element);

        // Add all current namespaces to this element
        for (Iterator i = _prefixes.entrySet().iterator(); i.hasNext(); ) {
            Map.Entry me = (Map.Entry) i.next();
            element.addNamespace(new Namespace((String)me.getKey(), (String) me.getValue()));
        }

        // Then add all attributes
        if (atts != null && atts.getLength() > 0) {
            for (int i = 0; i < atts.getLength(); i++) {
View Full Code Here

Examples of org.codehaus.xfire.fault.XFireFault.addNamespace()

        List list = root.getChildren(tagName,wsa);
        if( list!= null ){
            if(list.size()> 1){
               
                XFireFault fault = new XFireFault("Invalid header",new QName(wsa.getURI(),"Sender"));
                fault.addNamespace("wsa",wsa.getURI());
                fault.setSubCode(new QName(wsa.getURI(),"InvalidAddressingHeader"));
                Element detail = new Element("ProblemHeaderQName",wsa);
                detail.addContent(tagName);
                fault.setDetail(detail);
                throw fault;
View Full Code Here

Examples of org.dom4j.Element.addNamespace()

        // add all namespace declarations to element
        int ncount = m_unmarshalContext.getNamespaceCount();
        for (int i = 0; i < ncount; i++) {
            String prefix = m_unmarshalContext.getNamespacePrefix(i);
            String uri = m_unmarshalContext.getNamespaceUri(i);
            element.addNamespace(prefix, uri);
        }
       
        // add all attributes to element
        int acount = m_unmarshalContext.getAttributeCount();
        for (int i = 0; i < acount; i++) {
View Full Code Here

Examples of org.eclipse.wst.wsdl.Definition.addNamespace()

        if (prefix != null){
          if (!webService.targetNamespace().equals("")){
            wsdlDef.getNamespaces().remove(wsdlDef.getTargetNamespace());
            //wsdlDef.removeNamespace(webService.targetNamespace());
            wsdlDef.setTargetNamespace(webService.targetNamespace());
            wsdlDef.addNamespace(prefix, webService.targetNamespace());
          }
          PortType portType = typePortTypeMap.get(ctClass);
          if (portType == null){
            String portTypeName = ctClass.getSimpleName();
            if (!webService.name().equals(""))
View Full Code Here

Examples of org.exolab.castor.types.AnyNode.addNamespace()

        if (nsDecls != null) {
            Enumeration enumeration = nsDecls.getLocalNamespaces();
            while (enumeration.hasMoreElements()) {
                namespace = (String)enumeration.nextElement();
                prefix = nsDecls.getNamespacePrefix(namespace);
                node.addNamespace ( new AnyNode(AnyNode.NAMESPACE,
                                                null,  //-- no local name for a ns decl.
                                                prefix,
                                                namespace,
                                                null)); //-- no value
            }
View Full Code Here

Examples of org.fcrepo.utilities.NamespaceContextImpl.addNamespace()

        // set up the xpath stuff
        XPathFactory xpathFactory = XPathFactory.newInstance();
        XPath xpath = xpathFactory.newXPath();
        NamespaceContextImpl nsCtx = new NamespaceContextImpl();
        nsCtx.addNamespace("foxml", Constants.FOXML.uri);
        nsCtx.addNamespace("oai_dc", Constants.OAI_DC.uri);
        nsCtx.addNamespace("dc", Constants.DC.uri);
        nsCtx.addNamespace("rdf", Constants.RDF.uri);
        xpath.setNamespaceContext(nsCtx);
View Full Code Here

Examples of org.jaxen.BaseXPath.addNamespace()

      throws JaxenException {
    DocumentNavigator nav = new DocumentNavigator();
    XPath contextpath = new BaseXPath(path, nav);
    if (namespaces != null) {
      for (Map.Entry<String, String> entry : namespaces.entrySet()) {
        contextpath.addNamespace(entry.getKey(), entry.getValue());
      }
    }
    if (functions != null) {
      contextpath.setFunctionContext(
        getFunctionContext(
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.