@Test
public void testWSDL() throws Exception {
URL url = new URL("http://localhost:9002/jaxwsAndAegis?wsdl");
Document dom = XMLUtils.parse(url.openStream());
TestUtilities util = new TestUtilities(this.getClass());
util.addDefaultNamespaces();
util.assertInvalid("//wsdl:definitions/wsdl:types/xsd:schema/"
+ "xsd:complexType[@name='getRolesAsArrayResponse']/"
+ "xsd:sequence/xsd:element[@maxOccurs]",
dom);
util.assertValid("//wsdl:definitions/wsdl:types/xsd:schema/"
+ "xsd:complexType[@name='getRolesAsArrayResponse']/"
+ "xsd:sequence/xsd:element[@nillable='true']",
dom);
url = new URL("http://localhost:9002/serviceWithCustomNS?wsdl");
dom = XMLUtils.parse(url.openStream());
util.assertValid("//wsdl:definitions[@targetNamespace='http://foo.bar.com']",
dom);
}