Examples of BindingInfo


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

     * the extensors within the subclass.
     * @param service
     * @return
     */
    public BindingInfo createBindingInfo(ServiceInfo service, String namespace, Object config) {
        return new BindingInfo(service, namespace);
    }
View Full Code Here

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

     * Creates a "default" BindingInfo object for the service.  Can return a subclass
     * which can then process the extensors within the subclass.   By default, just
     * creates it for the first ServiceInfo in the service
     */
    public BindingInfo createBindingInfo(Service service, String namespace, Object config) {
        BindingInfo bi = createBindingInfo(service.getServiceInfos().get(0), namespace, config);
        if (bi.getName() == null) {
            bi.setName(new QName(service.getName().getNamespaceURI(),
                                 service.getName().getLocalPart() + "Binding"));
        }
        return bi;
    }
View Full Code Here

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

     * @param binding
     * @return
     */
    public BindingInfo createBindingInfo(ServiceInfo service, Binding binding, String ns) {

        BindingInfo bi = createBindingInfo(service, ns, null);
        return initializeBindingInfo(service, binding, bi);
    }
View Full Code Here

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

       
        code.append("//\n");
        code.append("// Definitions for service: " + service.getName().toString() + "\n");
        code.append("//\n");

        BindingInfo xml = null;
        // assume only one soap binding.
        // until further consideration.
        // hypothetically, we could generate two different JavaScript classes,
        // one for each.
        for (BindingInfo bindingInfo : service.getBindings()) {
View Full Code Here

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

        ei = control.createMock(EndpointInfo.class);
        List<ExtensibilityElement> noExts = new ArrayList<ExtensibilityElement>();
        List<ExtensibilityElement> exts = new ArrayList<ExtensibilityElement>();
        exts.add(ua);
        EasyMock.expect(ei.getExtensors(ExtensibilityElement.class)).andReturn(noExts);
        BindingInfo bi = control.createMock(BindingInfo.class);
        EasyMock.expect(ei.getBinding()).andReturn(bi).times(2);
        EasyMock.expect(bi.getExtensors(ExtensibilityElement.class)).andReturn(noExts);
        ServiceInfo si = control.createMock(ServiceInfo.class);
        EasyMock.expect(ei.getService()).andReturn(si).times(2);
        EasyMock.expect(si.getExtensors(ExtensibilityElement.class)).andReturn(exts);
        EasyMock.expect(ua.getElementType()).andReturn(Names.WSAW_USING_ADDRESSING_QNAME);
        control.replay();
View Full Code Here

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

        EasyMock.expect(pe.getServerEndpointPolicy(aei, null)).andReturn(epi);
        EasyMock.expect(epi.getChosenAlternative()).andReturn(new ArrayList<PolicyAssertion>());

        pe.setServerEndpointPolicy(ei, epi);
        EasyMock.expectLastCall();
        BindingInfo bi = control.createMock(BindingInfo.class);
        EasyMock.expect(ei.getBinding()).andReturn(bi);
        BindingOperationInfo boi = control.createMock(BindingOperationInfo.class);
        EasyMock.expect(bi.getOperations()).andReturn(Collections.singletonList(boi));
        pe.setEffectiveServerRequestPolicy(EasyMock.eq(ei), EasyMock.eq(boi), EasyMock
            .isA(EffectivePolicy.class));
        EasyMock.expectLastCall();
        pe.setEffectiveServerResponsePolicy(EasyMock.eq(ei), EasyMock.eq(boi), EasyMock
            .isA(EffectivePolicy.class));
View Full Code Here

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

                buildInterface(service, pt);

                services.put(pt.getQName(), service);
            }

            BindingInfo bi = service.getBinding(binding.getQName());
            if (bi == null) {
                bi = buildBinding(service, binding);
            }
            buildEndpoint(service, bi, port);
        }
View Full Code Here

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

        }
        return ei;
    }

    public BindingInfo buildBinding(ServiceInfo service, Binding binding) {
        BindingInfo bi = null;
        StringBuilder ns = new StringBuilder(100);
        BindingFactory factory = WSDLServiceUtils.getBindingFactory(binding, bus, ns);
        if (factory instanceof WSDLBindingFactory) {
            WSDLBindingFactory wFactory = (WSDLBindingFactory)factory;
            bi = wFactory.createBindingInfo(service, binding, ns.toString());
            copyExtensors(bi, binding.getExtensibilityElements());
            copyExtensionAttributes(bi, binding);
        }
        if (bi == null) {
            bi = new BindingInfo(service, ns.toString());
            bi.setName(binding.getQName());
            copyExtensors(bi, binding.getExtensibilityElements());
            copyExtensionAttributes(bi, binding);

            for (BindingOperation bop : cast(binding.getBindingOperations(), BindingOperation.class)) {
                LOG.fine("binding operation name is " + bop.getName());
                String inName = null;
                String outName = null;
                if (bop.getBindingInput() != null) {
                    inName = bop.getBindingInput().getName();
                }
                if (bop.getBindingOutput() != null) {
                    outName = bop.getBindingOutput().getName();
                }
                BindingOperationInfo bop2 = bi.buildOperation(new QName(service.getName().getNamespaceURI(),
                                                                        bop.getName()), inName, outName);
                if (bop2 != null) {

                    copyExtensors(bop2, bop.getExtensibilityElements());
                    copyExtensionAttributes(bop2, bop);
                    bi.addOperation(bop2);
                    if (bop.getBindingInput() != null) {
                        copyExtensors(bop2.getInput(), bop.getBindingInput().getExtensibilityElements());
                        copyExtensionAttributes(bop2.getInput(), bop.getBindingInput());
                        handleHeader(bop2.getInput());
                    }
                    if (bop.getBindingOutput() != null) {
                        copyExtensors(bop2.getOutput(), bop.getBindingOutput().getExtensibilityElements());
                        copyExtensionAttributes(bop2.getOutput(), bop.getBindingOutput());
                        handleHeader(bop2.getOutput());
                    }
                    for (BindingFault f : cast(bop.getBindingFaults().values(), BindingFault.class)) {
                        BindingFaultInfo bif = bop2.getFault(new QName(service.getTargetNamespace(), f
                            .getName()));
                        copyExtensors(bif, bop.getBindingFault(f.getName()).getExtensibilityElements());
                        copyExtensionAttributes(bif, bop.getBindingFault(f.getName()));
                    }
                }

            }
        }

        service.addBinding(bi);
        DescriptionInfo d = service.getDescription();
        if (null != d) {
            bi.setDescription(d);
            d.getDescribed().add(bi);
        }
        return bi;
    }
View Full Code Here

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

        EndpointInfo ei = new EndpointInfo();
        ei.setTransportId(transportId);
        ei.setName(serviceFactory.getService().getName());
        ei.setAddress(getAddress());       

        BindingInfo bindingInfo = createBindingInfo();
        ei.setBinding(bindingInfo);
        serviceFactory.sendEvent(FactoryBeanListener.Event.ENDPOINTINFO_CREATED, ei);

        return ei;
    }
View Full Code Here

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

        }

        try {
            BindingFactory bindingFactory = mgr.getBindingFactory(binding);
            setBindingFactory(bindingFactory);
            BindingInfo bi = bindingFactory.createBindingInfo(serviceFactory.getService(),
                                                              binding, bindingConfig);
            for (BindingOperationInfo boi : bi.getOperations()) {
                serviceFactory.sendEvent(FactoryBeanListener.Event.BINDING_OPERATION_CREATED, boi, boi);
            }

            serviceFactory.sendEvent(FactoryBeanListener.Event.BINDING_CREATED, bi);
            return bi;
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.