Package org.apache.axis2.jaxws.description.builder

Examples of org.apache.axis2.jaxws.description.builder.DescriptionBuilderComposite


            throw ExceptionFactory
                    .makeWebServiceException(Messages.getMessage("serviceDelegateConstruct0", ""));
        }
        // Get any metadata that is to be used to build up this service, then reset it so it isn't used
        // to create any other services.
        DescriptionBuilderComposite sparseComposite = getServiceMetadata();
        resetServiceMetadata();
        if (sparseComposite != null) {
            serviceDescription = DescriptionFactory.createServiceDescription(url, serviceQname, clazz, sparseComposite, this);
        } else {
            serviceDescription = DescriptionFactory.createServiceDescription(url, serviceQname, clazz);
View Full Code Here


        if (sei == null) {
            throw ExceptionFactory.makeWebServiceException(
                    Messages.getMessage("getPortInvalidSEI", portName.toString(), "null"));
        }

        DescriptionBuilderComposite sparseComposite = getPortMetadata();
        resetPortMetadata();
        EndpointDescription endpointDesc = null;
        if (sparseComposite != null) {
            endpointDesc =
                DescriptionFactory.updateEndpoint(serviceDescription, sei, portName,
View Full Code Here

    public ServiceClient getServiceClient(QName portQName) throws WebServiceException {
        return serviceDescription.getServiceClient(portQName, this);
    }
   
    public <T> T getPort(org.apache.axis2.addressing.EndpointReference axis2EPR, String addressingNamespace, Class<T> sei, WebServiceFeature... features) {
        DescriptionBuilderComposite sparseComposite = getPortMetadata();
        resetPortMetadata();
        EndpointDescription endpointDesc = null;
       
        if (sparseComposite != null) {
            endpointDesc =
View Full Code Here

        // Depending on the JDK in use, the 2nd or 3rd port is returned
//        assertTrue(endpointAddress.endsWith(multiPortWsdl_portLocalPart1));
       
        // Set a prefered port and create the service
        QName portQN2 = new QName(namespaceURI, multiPortWsdl_portLocalPart2);
        DescriptionBuilderComposite sparseComposite2 = new DescriptionBuilderComposite();
        sparseComposite2.setPreferredPort(portQN2);
        ServiceDelegate.setServiceMetadata(sparseComposite2);
        Service service2 = Service.create(wsdlUrl, serviceQName);
        ClientMetadataPortSEI port2 = service2.getPort(ClientMetadataPortSEI.class);
        BindingProvider bindingProvider2 = (BindingProvider) port2;
        Map<String, Object> requestContext2 = bindingProvider2.getRequestContext();
View Full Code Here

            // Depending on the JDK in use, the 2nd or 3rd port is returned
//            assertTrue(endpointAddress.endsWith(multiPortWsdl_portLocalPart1));
           
            // Set a prefered port and create the service
            QName portQN2 = new QName(namespaceURI, multiPortWsdl_portLocalPart2);
            DescriptionBuilderComposite sparseComposite2 = new DescriptionBuilderComposite();
            sparseComposite2.setPreferredPort(portQN2);
            ServiceDelegate.setServiceMetadata(sparseComposite2);
            Service service2 = Service.create(wsdlUrl, serviceQName);
            ServiceDelegate serviceDelegate2 = DescriptionTestUtils2.getServiceDelegate(service2);
            ServiceDescription svcDesc2 = serviceDelegate2.getServiceDescription();
            assertNotSame(service1, service2);
View Full Code Here

     * have MTOM enabled.
     */
    public void testEnableMTOM() {
        QName serviceQName = new QName(namespaceURI, svcLocalPart);
        URL wsdlUrl = ClientMetadataTest.getWsdlURL(multiPortWsdl);
        DescriptionBuilderComposite sparseComposite = new DescriptionBuilderComposite();
        sparseComposite.setIsMTOMEnabled(true);
        ServiceDelegate.setServiceMetadata(sparseComposite);
        Service service = Service.create(wsdlUrl, serviceQName);
        ClientMetadataPortSEI port = service.getPort(ClientMetadataPortSEI.class);
        assertNotNull(port);
        // Verify that MTOM is enabled on this port.
View Full Code Here

            ClientMetadataTest.installCachingFactory();

            QName serviceQName = new QName(namespaceURI, svcLocalPart);
            URL wsdlUrl = ClientMetadataTest.getWsdlURL(multiPortWsdl);

            DescriptionBuilderComposite sparseComposite = new DescriptionBuilderComposite();
            sparseComposite.setIsMTOMEnabled(true);
            ServiceDelegate.setServiceMetadata(sparseComposite);
            Service service1 = Service.create(wsdlUrl, serviceQName);
           
            Service service2 = Service.create(wsdlUrl, serviceQName);
           
View Full Code Here

    }

    public void testDBCHierarchy() {
        JavaClassToDBCConverter converter = new JavaClassToDBCConverter(ChildClass.class);
        HashMap<String, DescriptionBuilderComposite> dbcMap = converter.produceDBC();
        DescriptionBuilderComposite dbc =
                dbcMap.get("org.apache.axis2.jaxws.description.builder.converter.ChildClass");
        assertNotNull(dbc);
        List<MethodDescriptionComposite> mdcList = sortList(dbc.getMethodDescriptionsList());
        assertNotNull(mdcList);
        assertEquals(mdcList.size(), 3);
        assertEquals("<init>", mdcList.get(0).getMethodName());
        assertEquals("doAbstract", mdcList.get(1).getMethodName());
        assertEquals("extraMethod", mdcList.get(2).getMethodName());
        dbc = dbcMap.get("org.apache.axis2.jaxws.description.builder.converter.ParentClass");
        assertNotNull(dbc);
        mdcList = sortList(dbc.getMethodDescriptionsList());
        assertNotNull(mdcList);
        assertEquals(mdcList.size(), 2);
        assertEquals("<init>", mdcList.get(0).getMethodName());
        assertEquals("doParentAbstract", mdcList.get(1).getMethodName());
        dbc = dbcMap.get("org.apache.axis2.jaxws.description.builder.converter.ServiceInterface");
        assertNotNull(dbc);
        mdcList = sortList(dbc.getMethodDescriptionsList());
        assertNotNull(mdcList);
        assertEquals(mdcList.size(), 1);
        assertEquals("doAbstract", mdcList.get(0).getMethodName());
        dbc = dbcMap.get("org.apache.axis2.jaxws.description.builder.converter.CommonService");
        assertNotNull(dbc);
        mdcList = sortList(dbc.getMethodDescriptionsList());
        assertNotNull(mdcList);
        assertEquals(mdcList.size(), 1);
        assertEquals("extraMethod", mdcList.get(0).getMethodName());
        dbc = dbcMap.get(
                "org.apache.axis2.jaxws.description.builder.converter.ParentServiceInterface");
        assertNotNull(dbc);
        mdcList = sortList(dbc.getMethodDescriptionsList());
        assertNotNull(mdcList);
        assertEquals(mdcList.size(), 1);
        assertEquals("doParentAbstract", mdcList.get(0).getMethodName());
        dbc = dbcMap.get("org.apache.axis2.jaxws.description.builder.converter.AbstractService");
        assertNotNull(dbc);
        mdcList = sortList(dbc.getMethodDescriptionsList());
        assertNotNull(mdcList);
        assertEquals(mdcList.size(), 2);
        assertEquals("<init>", mdcList.get(0).getMethodName());
        assertEquals("someAbstractMethod", mdcList.get(1).getMethodName());
View Full Code Here

    public void testPlain() throws Exception {
        JavaClassToDBCConverter converter = new JavaClassToDBCConverter(PlainService.class);
        HashMap<String, DescriptionBuilderComposite> map = converter.produceDBC();
       
        DescriptionBuilderComposite composite = map.get(PlainService.class.getName());
       
        URL wsdlUrl = new URL("file:./" + wsdlLocation);
        WSDL4JWrapper wrapper = new WSDL4JWrapper(wsdlUrl, false, 0);
       
        composite.setwsdlURL(wsdlUrl);
        composite.setWsdlDefinition(wrapper.getDefinition());
       
        List<ServiceDescription> sdList = null;
        try {
            sdList = DescriptionFactory.createServiceDescriptionFromDBCMap(map);
        }
View Full Code Here

   
    public void testRespectBindingDisabled() throws Exception {
        JavaClassToDBCConverter converter = new JavaClassToDBCConverter(DisabledService.class);
        HashMap<String, DescriptionBuilderComposite> map = converter.produceDBC();
       
        DescriptionBuilderComposite composite = map.get(DisabledService.class.getName());
       
        URL wsdlUrl = new URL("file:./" + wsdlLocation);
        WSDL4JWrapper wrapper = new WSDL4JWrapper(wsdlUrl, false, 0);
       
        composite.setwsdlURL(wsdlUrl);
        composite.setWsdlDefinition(wrapper.getDefinition());
       
        List<ServiceDescription> sdList = DescriptionFactory.createServiceDescriptionFromDBCMap(map);
        ServiceDescription sd = sdList.get(0);
       
        EndpointDescription ed = sd.getEndpointDescription(new QName(ns, disabledServicePortName));
View Full Code Here

TOP

Related Classes of org.apache.axis2.jaxws.description.builder.DescriptionBuilderComposite

Copyright © 2018 www.massapicom. 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.