Map<String, String> ns = new HashMap<String, String>();
ns.put("wsdl", WSDLConstants.NS_WSDL11);
ns.put("wsu",
"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd");
ns.put("wsp", Constants.URI_POLICY_13_NS);
XPathUtils xpu = new XPathUtils(ns);
//org.apache.cxf.helpers.XMLUtils.printDOM(wsdl);
check(xpu, wsdl, "/wsdl:definitions/wsdl:service/wsdl:port", "TestInterfacePortPortPolicy");
check(xpu, wsdl, "/wsdl:definitions/wsdl:portType/", "TestInterfacePortTypePolicy");
check(xpu, wsdl, "/wsdl:definitions/wsdl:portType/wsdl:operation/", "echoIntPortTypeOpPolicy");
check(xpu, wsdl, "/wsdl:definitions/wsdl:portType/wsdl:operation/wsdl:input",
"echoIntPortTypeOpInputPolicy");
check(xpu, wsdl, "/wsdl:definitions/wsdl:portType/wsdl:operation/wsdl:output",
"echoIntPortTypeOpOutputPolicy");
check(xpu, wsdl, "/wsdl:definitions/wsdl:binding/",
"TestInterfaceServiceSoapBindingBindingPolicy");
check(xpu, wsdl, "/wsdl:definitions/wsdl:binding/wsdl:operation/", "echoIntBindingOpPolicy");
check(xpu, wsdl, "/wsdl:definitions/wsdl:binding/wsdl:operation/wsdl:input",
"echoIntBindingOpInputPolicy");
check(xpu, wsdl, "/wsdl:definitions/wsdl:binding/wsdl:operation/wsdl:output",
"echoIntBindingOpOutputPolicy");
check(xpu, wsdl, "/wsdl:definitions/wsdl:service/", "TestInterfaceServiceServicePolicy");
assertEquals(1,
xpu.getValueList("/wsdl:definitions/wsdl:binding/wsdl:operation/"
+ "wsp:PolicyReference[@URI='#echoIntBindingOpPolicy']", wsdl)
.getLength());
} finally {
bus.shutdown(true);