com.sun.xml.internal.ws.api.databinding.DatabindingConfig Java Examples

The following examples show how to use com.sun.xml.internal.ws.api.databinding.DatabindingConfig. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: WSServiceDelegate.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public SEIModel buildRuntimeModel(QName serviceName, QName portName, Class portInterface, WSDLPort wsdlPort, WebServiceFeatureList features) {
            DatabindingFactory fac = DatabindingFactory.newInstance();
            DatabindingConfig config = new DatabindingConfig();
            config.setContractClass(portInterface);
            config.getMappingInfo().setServiceName(serviceName);
            config.setWsdlPort(wsdlPort);
            config.setFeatures(features);
            config.setClassLoader(portInterface.getClassLoader());
            config.getMappingInfo().setPortName(portName);
            config.setWsdlURL(wsdlURL);
    // if ExternalMetadataFeature present, ExternalMetadataReader will be created ...
    config.setMetadataReader(getMetadadaReader(features, portInterface.getClassLoader()));

            com.sun.xml.internal.ws.db.DatabindingImpl rt = (com.sun.xml.internal.ws.db.DatabindingImpl)fac.createRuntime(config);

            return rt.getModel();
}
 
Example #2
Source File: EndpointFactory.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
private static AbstractSEIModelImpl createSEIModel(WSDLPort wsdlPort,
                                                   Class<?> implType, @NotNull QName serviceName, @NotNull QName portName, WSBinding binding,
                                                   SDDocumentSource primaryWsdl) {
            DatabindingFactory fac = DatabindingFactory.newInstance();
            DatabindingConfig config = new DatabindingConfig();
            config.setEndpointClass(implType);
            config.getMappingInfo().setServiceName(serviceName);
            config.setWsdlPort(wsdlPort);
            config.setWSBinding(binding);
            config.setClassLoader(implType.getClassLoader());
            config.getMappingInfo().setPortName(portName);
            if (primaryWsdl != null) config.setWsdlURL(primaryWsdl.getSystemId());
    config.setMetadataReader(getExternalMetadatReader(implType, binding));

            com.sun.xml.internal.ws.db.DatabindingImpl rt = (com.sun.xml.internal.ws.db.DatabindingImpl)fac.createRuntime(config);
            return (AbstractSEIModelImpl) rt.getModel();
}
 
Example #3
Source File: WSServiceDelegate.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public SEIModel buildRuntimeModel(QName serviceName, QName portName, Class portInterface, WSDLPort wsdlPort, WebServiceFeatureList features) {
            DatabindingFactory fac = DatabindingFactory.newInstance();
            DatabindingConfig config = new DatabindingConfig();
            config.setContractClass(portInterface);
            config.getMappingInfo().setServiceName(serviceName);
            config.setWsdlPort(wsdlPort);
            config.setFeatures(features);
            config.setClassLoader(portInterface.getClassLoader());
            config.getMappingInfo().setPortName(portName);
            config.setWsdlURL(wsdlURL);
    // if ExternalMetadataFeature present, ExternalMetadataReader will be created ...
    config.setMetadataReader(getMetadadaReader(features, portInterface.getClassLoader()));

            com.sun.xml.internal.ws.db.DatabindingImpl rt = (com.sun.xml.internal.ws.db.DatabindingImpl)fac.createRuntime(config);

            return rt.getModel();
}
 
Example #4
Source File: WSServiceDelegate.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public SEIModel buildRuntimeModel(QName serviceName, QName portName, Class portInterface, WSDLPort wsdlPort, WebServiceFeatureList features) {
            DatabindingFactory fac = DatabindingFactory.newInstance();
            DatabindingConfig config = new DatabindingConfig();
            config.setContractClass(portInterface);
            config.getMappingInfo().setServiceName(serviceName);
            config.setWsdlPort(wsdlPort);
            config.setFeatures(features);
            config.setClassLoader(portInterface.getClassLoader());
            config.getMappingInfo().setPortName(portName);
            config.setWsdlURL(wsdlURL);
    // if ExternalMetadataFeature present, ExternalMetadataReader will be created ...
    config.setMetadataReader(getMetadadaReader(features, portInterface.getClassLoader()));

            com.sun.xml.internal.ws.db.DatabindingImpl rt = (com.sun.xml.internal.ws.db.DatabindingImpl)fac.createRuntime(config);

            return rt.getModel();
}
 
Example #5
Source File: EndpointFactory.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
private static AbstractSEIModelImpl createSEIModel(WSDLPort wsdlPort,
                                                   Class<?> implType, @NotNull QName serviceName, @NotNull QName portName, WSBinding binding,
                                                   SDDocumentSource primaryWsdl) {
            DatabindingFactory fac = DatabindingFactory.newInstance();
            DatabindingConfig config = new DatabindingConfig();
            config.setEndpointClass(implType);
            config.getMappingInfo().setServiceName(serviceName);
            config.setWsdlPort(wsdlPort);
            config.setWSBinding(binding);
            config.setClassLoader(implType.getClassLoader());
            config.getMappingInfo().setPortName(portName);
            if (primaryWsdl != null) config.setWsdlURL(primaryWsdl.getSystemId());
    config.setMetadataReader(getExternalMetadatReader(implType, binding));

            com.sun.xml.internal.ws.db.DatabindingImpl rt = (com.sun.xml.internal.ws.db.DatabindingImpl)fac.createRuntime(config);
            return (AbstractSEIModelImpl) rt.getModel();
}
 
Example #6
Source File: WSServiceDelegate.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public SEIModel buildRuntimeModel(QName serviceName, QName portName, Class portInterface, WSDLPort wsdlPort, WebServiceFeatureList features) {
            DatabindingFactory fac = DatabindingFactory.newInstance();
            DatabindingConfig config = new DatabindingConfig();
            config.setContractClass(portInterface);
            config.getMappingInfo().setServiceName(serviceName);
            config.setWsdlPort(wsdlPort);
            config.setFeatures(features);
            config.setClassLoader(portInterface.getClassLoader());
            config.getMappingInfo().setPortName(portName);
            config.setWsdlURL(wsdlURL);
    // if ExternalMetadataFeature present, ExternalMetadataReader will be created ...
    config.setMetadataReader(getMetadadaReader(features, portInterface.getClassLoader()));

            com.sun.xml.internal.ws.db.DatabindingImpl rt = (com.sun.xml.internal.ws.db.DatabindingImpl)fac.createRuntime(config);

            return rt.getModel();
}
 
Example #7
Source File: EndpointFactory.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
private static AbstractSEIModelImpl createSEIModel(WSDLPort wsdlPort,
                                                   Class<?> implType, @NotNull QName serviceName, @NotNull QName portName, WSBinding binding,
                                                   SDDocumentSource primaryWsdl) {
            DatabindingFactory fac = DatabindingFactory.newInstance();
            DatabindingConfig config = new DatabindingConfig();
            config.setEndpointClass(implType);
            config.getMappingInfo().setServiceName(serviceName);
            config.setWsdlPort(wsdlPort);
            config.setWSBinding(binding);
            config.setClassLoader(implType.getClassLoader());
            config.getMappingInfo().setPortName(portName);
            if (primaryWsdl != null) config.setWsdlURL(primaryWsdl.getSystemId());
    config.setMetadataReader(getExternalMetadatReader(implType, binding));

            com.sun.xml.internal.ws.db.DatabindingImpl rt = (com.sun.xml.internal.ws.db.DatabindingImpl)fac.createRuntime(config);
            return (AbstractSEIModelImpl) rt.getModel();
}
 
Example #8
Source File: WSServiceDelegate.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public SEIModel buildRuntimeModel(QName serviceName, QName portName, Class portInterface, WSDLPort wsdlPort, WebServiceFeatureList features) {
            DatabindingFactory fac = DatabindingFactory.newInstance();
            DatabindingConfig config = new DatabindingConfig();
            config.setContractClass(portInterface);
            config.getMappingInfo().setServiceName(serviceName);
            config.setWsdlPort(wsdlPort);
            config.setFeatures(features);
            config.setClassLoader(portInterface.getClassLoader());
            config.getMappingInfo().setPortName(portName);
            config.setWsdlURL(wsdlURL);
    // if ExternalMetadataFeature present, ExternalMetadataReader will be created ...
    config.setMetadataReader(getMetadadaReader(features, portInterface.getClassLoader()));

            com.sun.xml.internal.ws.db.DatabindingImpl rt = (com.sun.xml.internal.ws.db.DatabindingImpl)fac.createRuntime(config);

            return rt.getModel();
}
 
Example #9
Source File: WSServiceDelegate.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public SEIModel buildRuntimeModel(QName serviceName, QName portName, Class portInterface, WSDLPort wsdlPort, WebServiceFeatureList features) {
            DatabindingFactory fac = DatabindingFactory.newInstance();
            DatabindingConfig config = new DatabindingConfig();
            config.setContractClass(portInterface);
            config.getMappingInfo().setServiceName(serviceName);
            config.setWsdlPort(wsdlPort);
            config.setFeatures(features);
            config.setClassLoader(portInterface.getClassLoader());
            config.getMappingInfo().setPortName(portName);
            config.setWsdlURL(wsdlURL);
    // if ExternalMetadataFeature present, ExternalMetadataReader will be created ...
    config.setMetadataReader(getMetadadaReader(features, portInterface.getClassLoader()));

            com.sun.xml.internal.ws.db.DatabindingImpl rt = (com.sun.xml.internal.ws.db.DatabindingImpl)fac.createRuntime(config);

            return rt.getModel();
}
 
Example #10
Source File: EndpointFactory.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
private static AbstractSEIModelImpl createSEIModel(WSDLPort wsdlPort,
                                                   Class<?> implType, @NotNull QName serviceName, @NotNull QName portName, WSBinding binding,
                                                   SDDocumentSource primaryWsdl) {
            DatabindingFactory fac = DatabindingFactory.newInstance();
            DatabindingConfig config = new DatabindingConfig();
            config.setEndpointClass(implType);
            config.getMappingInfo().setServiceName(serviceName);
            config.setWsdlPort(wsdlPort);
            config.setWSBinding(binding);
            config.setClassLoader(implType.getClassLoader());
            config.getMappingInfo().setPortName(portName);
            if (primaryWsdl != null) config.setWsdlURL(primaryWsdl.getSystemId());
    config.setMetadataReader(getExternalMetadatReader(implType, binding));

            com.sun.xml.internal.ws.db.DatabindingImpl rt = (com.sun.xml.internal.ws.db.DatabindingImpl)fac.createRuntime(config);
            return (AbstractSEIModelImpl) rt.getModel();
}
 
Example #11
Source File: EndpointFactory.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
private static AbstractSEIModelImpl createSEIModel(WSDLPort wsdlPort,
                                                   Class<?> implType, @NotNull QName serviceName, @NotNull QName portName, WSBinding binding,
                                                   SDDocumentSource primaryWsdl) {
            DatabindingFactory fac = DatabindingFactory.newInstance();
            DatabindingConfig config = new DatabindingConfig();
            config.setEndpointClass(implType);
            config.getMappingInfo().setServiceName(serviceName);
            config.setWsdlPort(wsdlPort);
            config.setWSBinding(binding);
            config.setClassLoader(implType.getClassLoader());
            config.getMappingInfo().setPortName(portName);
            if (primaryWsdl != null) config.setWsdlURL(primaryWsdl.getSystemId());
    config.setMetadataReader(getExternalMetadatReader(implType, binding));

            com.sun.xml.internal.ws.db.DatabindingImpl rt = (com.sun.xml.internal.ws.db.DatabindingImpl)fac.createRuntime(config);
            return (AbstractSEIModelImpl) rt.getModel();
}
 
Example #12
Source File: EndpointFactory.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
private static AbstractSEIModelImpl createSEIModel(WSDLPort wsdlPort,
                                                   Class<?> implType, @NotNull QName serviceName, @NotNull QName portName, WSBinding binding,
                                                   SDDocumentSource primaryWsdl) {
            DatabindingFactory fac = DatabindingFactory.newInstance();
            DatabindingConfig config = new DatabindingConfig();
            config.setEndpointClass(implType);
            config.getMappingInfo().setServiceName(serviceName);
            config.setWsdlPort(wsdlPort);
            config.setWSBinding(binding);
            config.setClassLoader(implType.getClassLoader());
            config.getMappingInfo().setPortName(portName);
            if (primaryWsdl != null) config.setWsdlURL(primaryWsdl.getSystemId());
    config.setMetadataReader(getExternalMetadatReader(implType, binding));

            com.sun.xml.internal.ws.db.DatabindingImpl rt = (com.sun.xml.internal.ws.db.DatabindingImpl)fac.createRuntime(config);
            return (AbstractSEIModelImpl) rt.getModel();
}
 
Example #13
Source File: WSServiceDelegate.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public SEIModel buildRuntimeModel(QName serviceName, QName portName, Class portInterface, WSDLPort wsdlPort, WebServiceFeatureList features) {
            DatabindingFactory fac = DatabindingFactory.newInstance();
            DatabindingConfig config = new DatabindingConfig();
            config.setContractClass(portInterface);
            config.getMappingInfo().setServiceName(serviceName);
            config.setWsdlPort(wsdlPort);
            config.setFeatures(features);
            config.setClassLoader(portInterface.getClassLoader());
            config.getMappingInfo().setPortName(portName);
            config.setWsdlURL(wsdlURL);
    // if ExternalMetadataFeature present, ExternalMetadataReader will be created ...
    config.setMetadataReader(getMetadadaReader(features, portInterface.getClassLoader()));

            com.sun.xml.internal.ws.db.DatabindingImpl rt = (com.sun.xml.internal.ws.db.DatabindingImpl)fac.createRuntime(config);

            return rt.getModel();
}
 
Example #14
Source File: DatabindingImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public DatabindingImpl(DatabindingProviderImpl p, DatabindingConfig config) {
        RuntimeModeler modeler = new RuntimeModeler(config);
        modeler.setClassLoader(config.getClassLoader());
        seiModel = modeler.buildRuntimeModel();
        WSDLPort wsdlport = config.getWsdlPort();
        Object facProp = config.properties().get("com.sun.xml.internal.ws.api.message.MessageContextFactory");
        packetFactory = (facProp != null && facProp instanceof MessageContextFactory)? (MessageContextFactory)facProp :
                        new MessageContextFactory(seiModel.getWSBinding().getFeatures());
        clientConfig = isClientConfig(config);
        if (clientConfig) {
            initStubHandlers();
        }
        seiModel.setDatabinding(this);
        if (wsdlport != null) {
            freeze(wsdlport);
        }
        if (operationDispatcher == null) {
            operationDispatcherNoWsdl = new OperationDispatcher(null, seiModel.getWSBinding(), seiModel);
        }
//    if(!clientConfig) {
        for (JavaMethodImpl jm : seiModel.getJavaMethods()) {
            if (!jm.isAsync()) {
                TieHandler th = new TieHandler(jm, seiModel.getWSBinding(), packetFactory);
                wsdlOpMap.put(jm, th);
                tieHandlers.put(th.getMethod(), th);
            }
        }
//    }
    }
 
Example #15
Source File: DatabindingFactoryImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
String databindingMode(DatabindingConfig config) {
        if ( config.getMappingInfo() != null &&
             config.getMappingInfo().getDatabindingMode() != null)
                return config.getMappingInfo().getDatabindingMode();
if ( config.getFeatures() != null) for (WebServiceFeature f : config.getFeatures()) {
    if (f instanceof DatabindingModeFeature) {
        DatabindingModeFeature dmf = (DatabindingModeFeature) f;
        config.properties().putAll(dmf.getProperties());
        return dmf.getMode();
    }
}
        return null;
}
 
Example #16
Source File: DatabindingImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public DatabindingImpl(DatabindingProviderImpl p, DatabindingConfig config) {
        RuntimeModeler modeler = new RuntimeModeler(config);
        modeler.setClassLoader(config.getClassLoader());
        seiModel = modeler.buildRuntimeModel();
        WSDLPort wsdlport = config.getWsdlPort();
        packetFactory = new MessageContextFactory(seiModel.getWSBinding().getFeatures());
        clientConfig = isClientConfig(config);
        if (clientConfig) {
            initStubHandlers();
        }
        seiModel.setDatabinding(this);
        if (wsdlport != null) {
            freeze(wsdlport);
        }
        if (operationDispatcher == null) {
            operationDispatcherNoWsdl = new OperationDispatcher(null, seiModel.getWSBinding(), seiModel);
        }
//    if(!clientConfig) {
        for (JavaMethodImpl jm : seiModel.getJavaMethods()) {
            if (!jm.isAsync()) {
                TieHandler th = new TieHandler(jm, seiModel.getWSBinding(), packetFactory);
                wsdlOpMap.put(jm, th);
                tieHandlers.put(th.getMethod(), th);
            }
        }
//    }
    }
 
Example #17
Source File: DatabindingImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public DatabindingImpl(DatabindingProviderImpl p, DatabindingConfig config) {
        RuntimeModeler modeler = new RuntimeModeler(config);
        modeler.setClassLoader(config.getClassLoader());
        seiModel = modeler.buildRuntimeModel();
        WSDLPort wsdlport = config.getWsdlPort();
        packetFactory = new MessageContextFactory(seiModel.getWSBinding().getFeatures());
        clientConfig = isClientConfig(config);
        if (clientConfig) {
            initStubHandlers();
        }
        seiModel.setDatabinding(this);
        if (wsdlport != null) {
            freeze(wsdlport);
        }
        if (operationDispatcher == null) {
            operationDispatcherNoWsdl = new OperationDispatcher(null, seiModel.getWSBinding(), seiModel);
        }
//    if(!clientConfig) {
        for (JavaMethodImpl jm : seiModel.getJavaMethods()) {
            if (!jm.isAsync()) {
                TieHandler th = new TieHandler(jm, seiModel.getWSBinding(), packetFactory);
                wsdlOpMap.put(jm, th);
                tieHandlers.put(th.getMethod(), th);
            }
        }
//    }
    }
 
Example #18
Source File: DatabindingImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private boolean isClientConfig(DatabindingConfig config) {
    if (config.getContractClass() == null) {
        return false;
    }
    if (!config.getContractClass().isInterface()) {
        return false;
    }
    return (config.getEndpointClass() == null || config.getEndpointClass().isInterface());
}
 
Example #19
Source File: DatabindingProviderImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public Databinding create(DatabindingConfig config) {
    DatabindingImpl impl = getCachedDatabindingImpl(config);
    if (impl == null) {
        impl = new DatabindingImpl(this, config);
        config.properties().put(CachedDatabinding, impl);
    }
        return impl;
}
 
Example #20
Source File: DatabindingImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public DatabindingImpl(DatabindingProviderImpl p, DatabindingConfig config) {
        RuntimeModeler modeler = new RuntimeModeler(config);
        modeler.setClassLoader(config.getClassLoader());
        seiModel = modeler.buildRuntimeModel();
        WSDLPort wsdlport = config.getWsdlPort();
        packetFactory = new MessageContextFactory(seiModel.getWSBinding().getFeatures());
        clientConfig = isClientConfig(config);
        if (clientConfig) {
            initStubHandlers();
        }
        seiModel.setDatabinding(this);
        if (wsdlport != null) {
            freeze(wsdlport);
        }
        if (operationDispatcher == null) {
            operationDispatcherNoWsdl = new OperationDispatcher(null, seiModel.getWSBinding(), seiModel);
        }
//    if(!clientConfig) {
        for (JavaMethodImpl jm : seiModel.getJavaMethods()) {
            if (!jm.isAsync()) {
                TieHandler th = new TieHandler(jm, seiModel.getWSBinding(), packetFactory);
                wsdlOpMap.put(jm, th);
                tieHandlers.put(th.getMethod(), th);
            }
        }
//    }
    }
 
Example #21
Source File: DatabindingImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public DatabindingImpl(DatabindingProviderImpl p, DatabindingConfig config) {
        RuntimeModeler modeler = new RuntimeModeler(config);
        modeler.setClassLoader(config.getClassLoader());
        seiModel = modeler.buildRuntimeModel();
        WSDLPort wsdlport = config.getWsdlPort();
        packetFactory = new MessageContextFactory(seiModel.getWSBinding().getFeatures());
        clientConfig = isClientConfig(config);
        if (clientConfig) {
            initStubHandlers();
        }
        seiModel.setDatabinding(this);
        if (wsdlport != null) {
            freeze(wsdlport);
        }
        if (operationDispatcher == null) {
            operationDispatcherNoWsdl = new OperationDispatcher(null, seiModel.getWSBinding(), seiModel);
        }
//    if(!clientConfig) {
        for (JavaMethodImpl jm : seiModel.getJavaMethods()) {
            if (!jm.isAsync()) {
                TieHandler th = new TieHandler(jm, seiModel.getWSBinding(), packetFactory);
                wsdlOpMap.put(jm, th);
                tieHandlers.put(th.getMethod(), th);
            }
        }
//    }
    }
 
Example #22
Source File: DatabindingFactoryImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
String databindingMode(DatabindingConfig config) {
        if ( config.getMappingInfo() != null &&
             config.getMappingInfo().getDatabindingMode() != null)
                return config.getMappingInfo().getDatabindingMode();
if ( config.getFeatures() != null) for (WebServiceFeature f : config.getFeatures()) {
    if (f instanceof DatabindingModeFeature) {
        DatabindingModeFeature dmf = (DatabindingModeFeature) f;
        config.properties().putAll(dmf.getProperties());
        return dmf.getMode();
    }
}
        return null;
}
 
Example #23
Source File: DatabindingFactoryImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
String databindingMode(DatabindingConfig config) {
        if ( config.getMappingInfo() != null &&
             config.getMappingInfo().getDatabindingMode() != null)
                return config.getMappingInfo().getDatabindingMode();
if ( config.getFeatures() != null) for (WebServiceFeature f : config.getFeatures()) {
    if (f instanceof DatabindingModeFeature) {
        DatabindingModeFeature dmf = (DatabindingModeFeature) f;
        config.properties().putAll(dmf.getProperties());
        return dmf.getMode();
    }
}
        return null;
}
 
Example #24
Source File: DatabindingFactoryImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
String databindingMode(DatabindingConfig config) {
        if ( config.getMappingInfo() != null &&
             config.getMappingInfo().getDatabindingMode() != null)
                return config.getMappingInfo().getDatabindingMode();
if ( config.getFeatures() != null) for (WebServiceFeature f : config.getFeatures()) {
    if (f instanceof DatabindingModeFeature) {
        DatabindingModeFeature dmf = (DatabindingModeFeature) f;
        config.properties().putAll(dmf.getProperties());
        return dmf.getMode();
    }
}
        return null;
}
 
Example #25
Source File: DatabindingFactoryImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
String databindingMode(DatabindingConfig config) {
        if ( config.getMappingInfo() != null &&
             config.getMappingInfo().getDatabindingMode() != null)
                return config.getMappingInfo().getDatabindingMode();
if ( config.getFeatures() != null) for (WebServiceFeature f : config.getFeatures()) {
    if (f instanceof DatabindingModeFeature) {
        DatabindingModeFeature dmf = (DatabindingModeFeature) f;
        config.properties().putAll(dmf.getProperties());
        return dmf.getMode();
    }
}
        return null;
}
 
Example #26
Source File: DatabindingFactoryImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
String databindingMode(DatabindingConfig config) {
        if ( config.getMappingInfo() != null &&
             config.getMappingInfo().getDatabindingMode() != null)
                return config.getMappingInfo().getDatabindingMode();
if ( config.getFeatures() != null) for (WebServiceFeature f : config.getFeatures()) {
    if (f instanceof DatabindingModeFeature) {
        DatabindingModeFeature dmf = (DatabindingModeFeature) f;
        config.properties().putAll(dmf.getProperties());
        return dmf.getMode();
    }
}
        return null;
}
 
Example #27
Source File: DatabindingProviderImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public Databinding create(DatabindingConfig config) {
    DatabindingImpl impl = getCachedDatabindingImpl(config);
    if (impl == null) {
        impl = new DatabindingImpl(this, config);
        config.properties().put(CachedDatabinding, impl);
    }
        return impl;
}
 
Example #28
Source File: DatabindingImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private boolean isClientConfig(DatabindingConfig config) {
    if (config.getContractClass() == null) {
        return false;
    }
    if (!config.getContractClass().isInterface()) {
        return false;
    }
    return (config.getEndpointClass() == null || config.getEndpointClass().isInterface());
}
 
Example #29
Source File: DatabindingImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public DatabindingImpl(DatabindingProviderImpl p, DatabindingConfig config) {
        RuntimeModeler modeler = new RuntimeModeler(config);
        modeler.setClassLoader(config.getClassLoader());
        seiModel = modeler.buildRuntimeModel();
        WSDLPort wsdlport = config.getWsdlPort();
        packetFactory = new MessageContextFactory(seiModel.getWSBinding().getFeatures());
        clientConfig = isClientConfig(config);
        if (clientConfig) {
            initStubHandlers();
        }
        seiModel.setDatabinding(this);
        if (wsdlport != null) {
            freeze(wsdlport);
        }
        if (operationDispatcher == null) {
            operationDispatcherNoWsdl = new OperationDispatcher(null, seiModel.getWSBinding(), seiModel);
        }
//    if(!clientConfig) {
        for (JavaMethodImpl jm : seiModel.getJavaMethods()) {
            if (!jm.isAsync()) {
                TieHandler th = new TieHandler(jm, seiModel.getWSBinding(), packetFactory);
                wsdlOpMap.put(jm, th);
                tieHandlers.put(th.getMethod(), th);
            }
        }
//    }
    }
 
Example #30
Source File: DatabindingImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private boolean isClientConfig(DatabindingConfig config) {
    if (config.getContractClass() == null) {
        return false;
    }
    if (!config.getContractClass().isInterface()) {
        return false;
    }
    return (config.getEndpointClass() == null || config.getEndpointClass().isInterface());
}