Search in sources :

Example 81 with ServiceInfo

use of org.apache.cxf.service.model.ServiceInfo in project cxf by apache.

the class JaxwsServiceBuilderTest method testSOAPBindingRPCOnMethod.

@Test
public void testSOAPBindingRPCOnMethod() throws Exception {
    builder.setServiceClass(org.apache.cxf.tools.fortest.withannotation.rpc.HelloWrongAnnotation.class);
    ServiceInfo service = builder.createService();
    generator.setServiceModel(service);
    File file = getOutputFile("rpc_on_method.wsdl");
    assertNotNull(output);
    generator.generate(file);
    assertTrue(output.exists());
    InputStream expectedFile = getClass().getResourceAsStream("expected/rpc_on_method.wsdl");
    assertWsdlEquals(expectedFile, file);
}
Also used : ServiceInfo(org.apache.cxf.service.model.ServiceInfo) InputStream(java.io.InputStream) File(java.io.File) Test(org.junit.Test)

Example 82 with ServiceInfo

use of org.apache.cxf.service.model.ServiceInfo in project cxf by apache.

the class JaxwsServiceBuilderTest method testDocWrapparBare.

@Test
public void testDocWrapparBare() throws Exception {
    builder.setServiceClass(org.apache.hello_world_doc_wrapped_bare.Greeter.class);
    builder.setAddress("http://localhost");
    ServiceInfo service = builder.createService();
    generator.setServiceModel(service);
    File file = getOutputFile("doc_wrapped_bare.wsdl");
    assertNotNull(output);
    generator.generate(file);
    assertTrue(output.exists());
    InputStream expectedFile = getClass().getResourceAsStream("expected/doc_wrapped_bare.wsdl");
    assertWsdlEquals(expectedFile, file);
}
Also used : ServiceInfo(org.apache.cxf.service.model.ServiceInfo) InputStream(java.io.InputStream) File(java.io.File) Test(org.junit.Test)

Example 83 with ServiceInfo

use of org.apache.cxf.service.model.ServiceInfo in project cxf by apache.

the class JaxwsServiceBuilderTest method testDocLitWrappedWithoutWrapperClass.

@Test
public void testDocLitWrappedWithoutWrapperClass() throws Exception {
    builder.setServiceClass(org.apache.cxf.tools.fortest.withannotation.doc.HelloWrapped.class);
    ServiceInfo service = builder.createService();
    generator.setServiceModel(service);
    File output = getOutputFile("doc_lit_wrapped_no_wrapperclass.wsdl");
    assertNotNull(output);
    generator.generate(output);
    assertTrue(output.exists());
    InputStream expectedFile = getClass().getResourceAsStream("expected/expected_doc_lit_wrapped_no_wrapperclass.wsdl");
    assertWsdlEquals(expectedFile, output);
}
Also used : ServiceInfo(org.apache.cxf.service.model.ServiceInfo) InputStream(java.io.InputStream) File(java.io.File) Test(org.junit.Test)

Example 84 with ServiceInfo

use of org.apache.cxf.service.model.ServiceInfo in project cxf by apache.

the class JaxwsServiceBuilderTest method testHolder.

@Test
public void testHolder() throws Exception {
    builder.setServiceClass(org.apache.cxf.tools.fortest.holder.HolderService.class);
    ServiceInfo service = builder.createService();
    generator.setServiceModel(service);
    File output = getOutputFile("holder.wsdl");
    assertNotNull(output);
    generator.generate(output);
    assertTrue(output.exists());
    InputStream expectedFile = getClass().getResourceAsStream("expected/expected_holder.wsdl");
    assertWsdlEquals(expectedFile, output);
}
Also used : ServiceInfo(org.apache.cxf.service.model.ServiceInfo) InputStream(java.io.InputStream) File(java.io.File) Test(org.junit.Test)

Example 85 with ServiceInfo

use of org.apache.cxf.service.model.ServiceInfo in project cxf by apache.

the class JaxwsServiceBuilderTest method testCXF188.

@Test
public void testCXF188() throws Exception {
    Class<?> clz = AnnotationUtil.loadClass("org.apache.cxf.tools.fortest.cxf188.Demo", getClass().getClassLoader());
    builder.setServiceClass(clz);
    ServiceInfo service = builder.createService();
    generator.setServiceModel(service);
    File output = getOutputFile("cxf188.wsdl");
    assertNotNull(output);
    generator.generate(output);
    assertTrue(output.exists());
    InputStream expectedFile = getClass().getResourceAsStream("expected/cxf188.wsdl");
    assertWsdlEquals(expectedFile, output);
}
Also used : ServiceInfo(org.apache.cxf.service.model.ServiceInfo) InputStream(java.io.InputStream) File(java.io.File) Test(org.junit.Test)

Aggregations

ServiceInfo (org.apache.cxf.service.model.ServiceInfo)195 QName (javax.xml.namespace.QName)89 Test (org.junit.Test)76 EndpointInfo (org.apache.cxf.service.model.EndpointInfo)63 BindingOperationInfo (org.apache.cxf.service.model.BindingOperationInfo)47 BindingInfo (org.apache.cxf.service.model.BindingInfo)43 OperationInfo (org.apache.cxf.service.model.OperationInfo)37 InterfaceInfo (org.apache.cxf.service.model.InterfaceInfo)36 Service (org.apache.cxf.service.Service)33 Endpoint (org.apache.cxf.endpoint.Endpoint)31 MessagePartInfo (org.apache.cxf.service.model.MessagePartInfo)29 File (java.io.File)28 ArrayList (java.util.ArrayList)27 Bus (org.apache.cxf.Bus)26 InputStream (java.io.InputStream)23 Definition (javax.wsdl.Definition)20 Method (java.lang.reflect.Method)16 SchemaCollection (org.apache.cxf.common.xmlschema.SchemaCollection)15 HTTPTransportFactory (org.apache.cxf.transport.http.HTTPTransportFactory)15 IOException (java.io.IOException)12