Examples of InterfaceInfo


Examples of org.apache.cxf.service.model.InterfaceInfo

        manager.setReliableEndpointsMap(new HashMap<Endpoint, RMEndpoint>());
        Endpoint endpoint = control.createMock(Endpoint.class);
        EndpointInfo ei = control.createMock(EndpointInfo.class);
        ServiceInfo si = control.createMock(ServiceInfo.class)
        BindingInfo bi = control.createMock(BindingInfo.class);
        InterfaceInfo ii = control.createMock(InterfaceInfo.class);
        setUpEndpointForRecovery(endpoint, ei, si, bi, ii);         
        Conduit conduit = control.createMock(Conduit.class);       
        setUpRecoverReliableEndpoint(endpoint, conduit, null, null, null, null);
        control.replay();
        manager.recoverReliableEndpoint(endpoint, conduit);
View Full Code Here

Examples of org.apache.cxf.service.model.InterfaceInfo

        for (ClassResourceInfo cri : classResourceInfos) {
            ServiceInfo si = new ServiceInfo();
            infos.add(si);
            QName qname = JAXRSUtils.getClassQName(cri.getServiceClass());
            si.setName(qname);
            InterfaceInfo inf = new InterfaceInfo(si, qname);
            si.setInterface(inf);
            for (OperationResourceInfo ori : cri.getMethodDispatcher().getOperationResourceInfos()) {
                Method m = ori.getMethodToInvoke();
                QName oname = new QName(qname.getNamespaceURI(), m.getName());
                OperationInfo oi = inf.addOperation(oname);
                createMessagePartInfo(oi, m.getReturnType(), qname, m, false);
                for (Parameter pm : ori.getParameters()) {
                   
                    if (pm.getType() == ParameterType.REQUEST_BODY) {
                        createMessagePartInfo(oi,
View Full Code Here

Examples of org.apache.cxf.service.model.InterfaceInfo

        bean.setServiceClass(Hello.class);
        bean.setWrapped(wrapped);
       
        Service service = bean.create();

        InterfaceInfo i = service.getServiceInfos().get(0).getInterface();
        assertEquals(4, i.getOperations().size());

        ServerFactoryBean svrFactory = new ServerFactoryBean();
        svrFactory.setBus(bus);
        svrFactory.setServiceFactory(bean);
        svrFactory.setAddress(address);
View Full Code Here

Examples of org.apache.cxf.service.model.InterfaceInfo

        EndpointInfo ei = new EndpointInfo();
        ei.setAddress("nmr://dumy");
        ei.setName(new QName("http://test", "endpoint"));
        ServiceInfo si = new ServiceInfo();
        si.setName(new QName("http://test", "service"));
        InterfaceInfo interInfo = new InterfaceInfo(si, new QName("http://test", "interface"));
        si.setInterface(interInfo);
        ei.setService(si);
        org.apache.servicemix.nmr.api.NMR nmr = control.createMock(org.apache.servicemix.nmr.api.NMR.class);
        nmrTransportFactory.setNmr(nmr);
        NMRDestination destination = (NMRDestination) nmrTransportFactory.getDestination(ei);
View Full Code Here

Examples of org.apache.cxf.service.model.InterfaceInfo

        EndpointInfo ei = new EndpointInfo();
        ei.setAddress("nmr:dumy?RUN_AS_SUBJECT=true");
        ei.setName(new QName("http://test", "endpoint"));
        ServiceInfo si = new ServiceInfo();
        si.setName(new QName("http://test", "service"));
        InterfaceInfo interInfo = new InterfaceInfo(si, new QName("http://test", "interface"));
        si.setInterface(interInfo);
        ei.setService(si);
        nmrTransportFactory.setNmr(nmr);
        NMRDestination destination = (NMRDestination) nmrTransportFactory.getDestination(ei);
        destination.activate();
View Full Code Here

Examples of org.apache.cxf.service.model.InterfaceInfo

    protected void initializeWSDLOperations() {
        List<OperationInfo> removes = new ArrayList<OperationInfo>();
        Method[] methods = serviceClass.getMethods();
        Arrays.sort(methods, new MethodComparator());

        InterfaceInfo intf = getInterfaceInfo();

        Map<QName, Method> validMethods = new HashMap<QName, Method>();
        for (Method m : methods) {
            if (isValidMethod(m)) {
                QName opName = getOperationName(intf, m);
                validMethods.put(opName, m);
            }
        }

        for (OperationInfo o : intf.getOperations()) {
            Method selected = null;
            for (Map.Entry<QName, Method> m : validMethods.entrySet()) {
                QName opName = m.getKey();

                if (o.getName().getNamespaceURI().equals(opName.getNamespaceURI())
                    && isMatchOperation(o.getName().getLocalPart(), opName.getLocalPart())) {
                    selected = m.getValue();
                    break;
                }
            }

            if (selected == null) {
                LOG.log(Level.WARNING, "NO_METHOD_FOR_OP", o.getName());
                removes.add(o);
            } else {
                initializeWSDLOperation(intf, o, selected);
            }
        }
        for (OperationInfo op : removes) {
            intf.removeOperation(op);
        }

        // Some of the operations may have switched from unwrapped to wrapped.
        // Update the bindings.
        for (ServiceInfo service : getService().getServiceInfos()) {
View Full Code Here

Examples of org.apache.cxf.service.model.InterfaceInfo

        return svcInfo;
    }

    protected InterfaceInfo createInterface(ServiceInfo serviceInfo) {
        QName intfName = getInterfaceName();
        InterfaceInfo intf = new InterfaceInfo(serviceInfo, intfName);

        Method[] methods = getServiceClass().getMethods();

        // The BP profile states we can't have operations of the same name
        // so we have to append numbers to the name. Different JVMs sort methods
View Full Code Here

Examples of org.apache.cxf.service.model.InterfaceInfo

    protected void initializeWSDLOperations() {
        List<OperationInfo> removes = new ArrayList<OperationInfo>();
        Method[] methods = serviceClass.getMethods();
        Arrays.sort(methods, new MethodComparator());

        InterfaceInfo intf = getInterfaceInfo();

        Map<QName, Method> validMethods = new HashMap<QName, Method>();
        for (Method m : methods) {
            if (isValidMethod(m)) {
                QName opName = getOperationName(intf, m);
                validMethods.put(opName, m);
            }
        }

        for (OperationInfo o : intf.getOperations()) {
            Method selected = null;
            for (Map.Entry<QName, Method> m : validMethods.entrySet()) {
                QName opName = m.getKey();

                if (o.getName().getNamespaceURI().equals(opName.getNamespaceURI())
                    && isMatchOperation(o.getName().getLocalPart(), opName.getLocalPart())) {
                    selected = m.getValue();
                    break;
                }
            }

            if (selected == null) {
                LOG.log(Level.WARNING, "NO_METHOD_FOR_OP", o.getName());
                removes.add(o);
            } else {
                initializeWSDLOperation(intf, o, selected);
            }
        }
        for (OperationInfo op : removes) {
            intf.removeOperation(op);
        }

        // Some of the operations may have switched from unwrapped to wrapped.
        // Update the bindings.
        for (ServiceInfo service : getService().getServiceInfos()) {
View Full Code Here

Examples of org.apache.cxf.service.model.InterfaceInfo

        return svcInfo;
    }

    protected InterfaceInfo createInterface(ServiceInfo serviceInfo) {
        QName intfName = getInterfaceName();
        InterfaceInfo intf = new InterfaceInfo(serviceInfo, intfName);

        Method[] methods = getServiceClass().getMethods();

        // The BP profile states we can't have operations of the same name
        // so we have to append numbers to the name. Different JVMs sort methods
View Full Code Here

Examples of org.jboss.reflect.spi.InterfaceInfo

      checkTypeSet(expected, cinfo.getInterfaces());
   }

   public void testSimpleInterfaceClassInfo() throws Throwable
   {
      InterfaceInfo simpleInterfaceInfo = getSimpleInterfaceInfo();
     
      assertEquals(SimpleInterface.class.getName(), simpleInterfaceInfo.getName());
      InterfaceInfo[] superInterfaces = simpleInterfaceInfo.getInterfaces();
      assertTrue("No super interfaces ", superInterfaces == null);
   }
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.