Document doc = StaxUtils.read(wsdlFile);
Map<String, String> map = new HashMap<String, String>();
map.put("xsd", "http://www.w3.org/2001/XMLSchema");
map.put("wsdl", "http://schemas.xmlsoap.org/wsdl/");
map.put("soap", "http://schemas.xmlsoap.org/wsdl/soap/");
XPathUtils util = new XPathUtils(map);
assertNotNull(util.getValueNode("//xsd:complexType[@name='Exception']", doc));
Element nd = (Element)util.getValueNode("//xsd:element[@name='Exception']", doc);
assertNotNull(nd);
assertTrue(nd.getAttribute("type").contains("Exception"));
nd = (Element)util.getValueNode("//xsd:element[@name='message']", doc);
assertNotNull(nd);
assertTrue(nd.getAttribute("type").contains("string"));
assertTrue(nd.getAttribute("minOccurs").contains("0"));
nd = (Element)util.getValueNode("//wsdl:part[@name='Exception']", doc);
assertNotNull(nd);
assertTrue(nd.getAttribute("element").contains(":Exception"));
nd = (Element)util.getValueNode("//wsdl:fault[@name='Exception']", doc);
assertNotNull(nd);
assertTrue(nd.getAttribute("message").contains(":Exception"));
nd = (Element)util.getValueNode("//soap:fault[@name='Exception']", doc);
assertNotNull(nd);
assertTrue(nd.getAttribute("use").contains("literal"));
}