Examples of XPathUtils


Examples of org.apache.cxf.helpers.XPathUtils

        File wsdlFile = new File(output, "exception-type-adapter.wsdl");
        assertTrue(wsdlFile.exists());
        Document doc = StaxUtils.read(wsdlFile);
        Map<String, String> map = new HashMap<String, String>();
        map.put("xsd", "http://www.w3.org/2001/XMLSchema");
        XPathUtils util = new XPathUtils(map);
        Node nd = util.getValueNode("//xsd:complexType[@name='myClass2']", doc);
        assertNotNull(nd);
       
        nd = util.getValueNode("//xsd:element[@name='adapted']", doc);
        assertNotNull(nd);
       
        String at = ((Element)nd).getAttribute("type");
        assertTrue(at.contains("myClass2"));
        assertEquals("0", ((Element)nd).getAttribute("minOccurs"));
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.