Package org.apache.cxf.wsdl11

Examples of org.apache.cxf.wsdl11.ServiceWSDLBuilder.build()


        JaxwsServiceBuilder builder = new JaxwsServiceBuilder();
        builder.setServiceClass(CXF3093Impl.class);
        ServiceInfo serviceInfo = builder.createService();
        wsdlBuilder = new ServiceWSDLBuilder(bus, serviceInfo);
       
        def = wsdlBuilder.build();
        d = bus.getExtension(WSDLManager.class).getWSDLFactory().newWSDLWriter().getDocument(def);
        //org.apache.cxf.helpers.XMLUtils.printDOM(d);
        assertXPathEquals("//wsdl:definitions/wsdl:documentation", "My top level documentation",
                          d.getDocumentElement());
        assertXPathEquals("//wsdl:definitions/wsdl:portType/wsdl:documentation", "My portType documentation",
View Full Code Here


    public void testDocumentationOnImpl() throws Exception {
        //CXF-3092
        EndpointImpl ep = (EndpointImpl)Endpoint.publish("local://foo", new CXF3092Impl());
        ServiceWSDLBuilder wsdlBuilder =
            new ServiceWSDLBuilder(bus, ep.getService().getServiceInfos().get(0));
        Definition def = wsdlBuilder.build();
        Document d = bus.getExtension(WSDLManager.class).getWSDLFactory().newWSDLWriter().getDocument(def);
        //org.apache.cxf.helpers.XMLUtils.printDOM(d);
        assertXPathEquals("//wsdl:definitions/wsdl:documentation", "My top level documentation",
                          d.getDocumentElement());
        assertXPathEquals("//wsdl:definitions/wsdl:service/wsdl:documentation", "My Service documentation",
View Full Code Here

        JaxwsServiceBuilder builder = new JaxwsServiceBuilder();
        builder.setServiceClass(CXF3092Impl.class);
        ServiceInfo serviceInfo = builder.createService();
        wsdlBuilder = new ServiceWSDLBuilder(bus, serviceInfo);
       
        def = wsdlBuilder.build();
        d = bus.getExtension(WSDLManager.class).getWSDLFactory().newWSDLWriter().getDocument(def);
        //org.apache.cxf.helpers.XMLUtils.printDOM(d);
        assertXPathEquals("//wsdl:definitions/wsdl:documentation", "My top level documentation",
                          d.getDocumentElement());
        assertXPathEquals("//wsdl:definitions/wsdl:service/wsdl:documentation", "My Service documentation",
View Full Code Here

        Collection<BindingInfo> bindings = service.getServiceInfos().get(0).getBindings();
        assertEquals(1, bindings.size());
       
        ServiceWSDLBuilder wsdlBuilder =
            new ServiceWSDLBuilder(service.getServiceInfos().get(0));
        return wsdlBuilder.build();
    }

   
    @Test
    public void testEndpoint() throws Exception {
View Full Code Here

        ServerRegistry svrMan = getBus().getExtension(ServerRegistry.class);
        for (Server s : svrMan.getServers()) {
            Service svc = s.getEndpoint().getService();
            if (svc.getName().getLocalPart().equals(string)) {
                ServiceWSDLBuilder builder = new ServiceWSDLBuilder(svc.getServiceInfos());
                Definition definition = builder.build();
               
                WSDLWriter writer = WSDLFactory.newInstance().newWSDLWriter();
                return writer.getDocument(definition);
            }
        }
View Full Code Here

        Collection<BindingInfo> bindings = service.getServiceInfos().get(0).getBindings();
        assertEquals(1, bindings.size());
       
        ServiceWSDLBuilder wsdlBuilder =
            new ServiceWSDLBuilder(service.getServiceInfos().get(0));
        return wsdlBuilder.build();
    }

    @Test
    public void testWSDL1() throws Exception {
        Definition d = createService(Hello2.class);
View Full Code Here

        Collection<BindingInfo> bindings = service.getServiceInfos().get(0).getBindings();
        assertEquals(1, bindings.size());
       
        ServiceWSDLBuilder wsdlBuilder =
            new ServiceWSDLBuilder(bus, service.getServiceInfos().get(0));
        return wsdlBuilder.build();
    }
   
    @Test
    public void testWSDL1() throws Exception {
        Definition d = createService(Hello2.class);
View Full Code Here

    public void testDocumentationOnSEI() throws Exception {
        //CXF-3093
        EndpointImpl ep = (EndpointImpl)Endpoint.publish("local://foo", new CXF3093Impl());
        ServiceWSDLBuilder wsdlBuilder =
            new ServiceWSDLBuilder(bus, ep.getService().getServiceInfos().get(0));
        Definition def = wsdlBuilder.build();
        Document d = bus.getExtension(WSDLManager.class).getWSDLFactory().newWSDLWriter().getDocument(def);
        //org.apache.cxf.helpers.XMLUtils.printDOM(d);
        assertXPathEquals("//wsdl:definitions/wsdl:documentation", "My top level documentation",
                          d.getDocumentElement());
        assertXPathEquals("//wsdl:definitions/wsdl:portType/wsdl:documentation", "My portType documentation",
View Full Code Here

        JaxwsServiceBuilder builder = new JaxwsServiceBuilder();
        builder.setServiceClass(CXF3093Impl.class);
        ServiceInfo serviceInfo = builder.createService();
        wsdlBuilder = new ServiceWSDLBuilder(bus, serviceInfo);
       
        def = wsdlBuilder.build();
        d = bus.getExtension(WSDLManager.class).getWSDLFactory().newWSDLWriter().getDocument(def);
        //org.apache.cxf.helpers.XMLUtils.printDOM(d);
        assertXPathEquals("//wsdl:definitions/wsdl:documentation", "My top level documentation",
                          d.getDocumentElement());
        assertXPathEquals("//wsdl:definitions/wsdl:portType/wsdl:documentation", "My portType documentation",
View Full Code Here

    public void testOnlyRootElementOnFaultBean() throws Exception {
        //CXF-4016
        EndpointImpl ep = (EndpointImpl)Endpoint.publish("local://foo4016", new CXF4016Impl());
        ServiceWSDLBuilder wsdlBuilder =
            new ServiceWSDLBuilder(bus, ep.getService().getServiceInfos().get(0));
        Definition def = wsdlBuilder.build();
        Document d = bus.getExtension(WSDLManager.class).getWSDLFactory().newWSDLWriter().getDocument(def);
        this.addNamespace("http://www.example.org/contract/DoubleIt", "tns");
        //org.apache.cxf.helpers.XMLUtils.printDOM(d);
        assertXPathEquals("//xsd:element/@ref", new QName("http://www.example.org/contract/DoubleIt",
                                                          "CustomMessageBean"), d);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.