use of org.apache.cxf.test.TestUtilities in project cxf by apache.
the class SchemaAddinsTest method before.
@Before
public void before() {
testUtilities = new TestUtilities(getClass());
testUtilities.addDefaultNamespaces();
}
use of org.apache.cxf.test.TestUtilities in project cxf by apache.
the class StandaloneWriteTest method before.
@Before
public void before() {
testUtilities = new TestUtilities(getClass());
testUtilities.addNamespace("feline", "urn:meow");
xmlOutputFactory = XMLOutputFactory.newInstance();
xmlInputFactory = XMLInputFactory.newInstance();
}
use of org.apache.cxf.test.TestUtilities in project cxf by apache.
the class TypeCreationOptionsSpringTest method testMinOccurs.
@Test
public void testMinOccurs() throws Exception {
TestUtilities testUtilities = new TestUtilities(TypeCreationOptionsSpringTest.class);
testUtilities.setBus(getBean(Bus.class, "cxf"));
testUtilities.addDefaultNamespaces();
testUtilities.addNamespace("ts", "http://cxf.org.apache/service");
// {urn:org.apache.cxf.aegis}arrayService
Server s = testUtilities.getServerForService(new QName("urn:org.apache.cxf.aegis", "arrayService"));
Document wsdl = testUtilities.getWSDLDocument(s);
assertXPathEquals("//xsd:complexType[@name='ArrayOfInt']/" + "xsd:sequence/xsd:element[@name='int']/@minOccurs", "3", wsdl);
}
use of org.apache.cxf.test.TestUtilities in project cxf by apache.
the class AegisClientServerTest method testWSDL.
@Test
public void testWSDL() throws Exception {
URL url = new URL("http://localhost:" + PORT + "/jaxwsAndAegis?wsdl");
Document dom = StaxUtils.read(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:" + PORT + "/serviceWithCustomNS?wsdl");
dom = StaxUtils.read(url.openStream());
util.assertValid("//wsdl:definitions[@targetNamespace='http://foo.bar.com']", dom);
}
use of org.apache.cxf.test.TestUtilities in project cxf by apache.
the class AegisWSDLNSTest method testGeneratedWsdlNs.
@Test
public void testGeneratedWsdlNs() throws Exception {
URL url = new URL("http://localhost:" + PORT + "/aegisJaxWsWSDLNS?wsdl");
Document dom = StaxUtils.read(url.openStream());
TestUtilities util = new TestUtilities(this.getClass());
util.addDefaultNamespaces();
util.assertValid("//wsdl:definitions[@targetNamespace" + "='http://v1_1_2.rtf2pdf.doc.ws.daisy.marbes.cz']", dom);
// should be a targetNamespace for "http://wo.rtf2pdf.doc.ws.daisy.marbes.cz"
// as VO type specified in the SEI
util.assertValid("//wsdl:definitions/wsdl:types/xsd:schema[@targetNamespace" + "='http://wo.rtf2pdf.doc.ws.daisy.marbes.cz']", dom);
}
Aggregations