Search in sources :

Example 1 with EchoFoo

use of org.apache.cxf.jaxws.service.EchoFoo in project cxf by apache.

the class SchemaFirstTest method testEndpoint.

@Test
public void testEndpoint() throws Exception {
    JaxWsServerFactoryBean svr = new JaxWsServerFactoryBean();
    svr.setBus(bus);
    svr.setServiceBean(new EchoFoo());
    svr.setAddress("http://localhost:9000/hello");
    List<String> schemas = new ArrayList<>();
    schemas.add("/org/apache/cxf/jaxws/service/echoFoo.xsd");
    svr.setSchemaLocations(schemas);
    Server server = svr.create();
    Document d = getWSDLDocument(server);
    // XmlSchema still isn't preserving all the extra info...
    assertValid("//xsd:complexType[@name='foo']/xsd:sequence", d);
}
Also used : Server(org.apache.cxf.endpoint.Server) ArrayList(java.util.ArrayList) EchoFoo(org.apache.cxf.jaxws.service.EchoFoo) Document(org.w3c.dom.Document) Test(org.junit.Test)

Aggregations

ArrayList (java.util.ArrayList)1 Server (org.apache.cxf.endpoint.Server)1 EchoFoo (org.apache.cxf.jaxws.service.EchoFoo)1 Test (org.junit.Test)1 Document (org.w3c.dom.Document)1