Java Code Examples for com.sun.xml.internal.ws.binding.WebServiceFeatureList#addAll()

The following examples show how to use com.sun.xml.internal.ws.binding.WebServiceFeatureList#addAll() . 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 <T> Dispatch<T> createDispatch(QName portName, WSEndpointReference wsepr, Class<T> aClass, Service.Mode mode, WebServiceFeatureList features) {
    PortInfo port = safeGetPort(portName);

    ComponentFeature cf = features.get(ComponentFeature.class);
    if (cf != null && !Target.STUB.equals(cf.getTarget())) {
        throw new IllegalArgumentException();
    }
    ComponentsFeature csf = features.get(ComponentsFeature.class);
    if (csf != null) {
        for (ComponentFeature cfi : csf.getComponentFeatures()) {
            if (!Target.STUB.equals(cfi.getTarget()))
                throw new IllegalArgumentException();
        }
    }
    features.addAll(this.features);

    BindingImpl binding = port.createBinding(features, null, null);
    binding.setMode(mode);
    Dispatch<T> dispatch = Stubs.createDispatch(port, this, binding, aClass, mode, wsepr);
    serviceInterceptor.postCreateDispatch((WSBindingProvider) dispatch);
    return dispatch;
}
 
Example 2
Source File: WSServiceDelegate.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
protected Dispatch<Object> createDispatch(QName portName, WSEndpointReference wsepr, JAXBContext jaxbContext, Service.Mode mode, WebServiceFeatureList features) {
    PortInfo port = safeGetPort(portName);

    ComponentFeature cf = features.get(ComponentFeature.class);
    if (cf != null && !Target.STUB.equals(cf.getTarget())) {
        throw new IllegalArgumentException();
    }
    ComponentsFeature csf = features.get(ComponentsFeature.class);
    if (csf != null) {
        for (ComponentFeature cfi : csf.getComponentFeatures()) {
            if (!Target.STUB.equals(cfi.getTarget()))
                throw new IllegalArgumentException();
        }
    }
    features.addAll(this.features);

    BindingImpl binding = port.createBinding(features, null, null);
    binding.setMode(mode);
    Dispatch<Object> dispatch = Stubs.createJAXBDispatch(
            port, binding, jaxbContext, mode,wsepr);
     serviceInterceptor.postCreateDispatch((WSBindingProvider)dispatch);
     return dispatch;
}
 
Example 3
Source File: WSServiceDelegate.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public <T> Dispatch<T> createDispatch(QName portName, WSEndpointReference wsepr, Class<T> aClass, Service.Mode mode, WebServiceFeatureList features) {
    PortInfo port = safeGetPort(portName);

    ComponentFeature cf = features.get(ComponentFeature.class);
    if (cf != null && !Target.STUB.equals(cf.getTarget())) {
        throw new IllegalArgumentException();
    }
    ComponentsFeature csf = features.get(ComponentsFeature.class);
    if (csf != null) {
        for (ComponentFeature cfi : csf.getComponentFeatures()) {
            if (!Target.STUB.equals(cfi.getTarget()))
                throw new IllegalArgumentException();
        }
    }
    features.addAll(this.features);

    BindingImpl binding = port.createBinding(features, null, null);
    binding.setMode(mode);
    Dispatch<T> dispatch = Stubs.createDispatch(port, this, binding, aClass, mode, wsepr);
    serviceInterceptor.postCreateDispatch((WSBindingProvider) dispatch);
    return dispatch;
}
 
Example 4
Source File: WSServiceDelegate.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
protected Dispatch<Object> createDispatch(QName portName, WSEndpointReference wsepr, JAXBContext jaxbContext, Service.Mode mode, WebServiceFeatureList features) {
    PortInfo port = safeGetPort(portName);

    ComponentFeature cf = features.get(ComponentFeature.class);
    if (cf != null && !Target.STUB.equals(cf.getTarget())) {
        throw new IllegalArgumentException();
    }
    ComponentsFeature csf = features.get(ComponentsFeature.class);
    if (csf != null) {
        for (ComponentFeature cfi : csf.getComponentFeatures()) {
            if (!Target.STUB.equals(cfi.getTarget()))
                throw new IllegalArgumentException();
        }
    }
    features.addAll(this.features);

    BindingImpl binding = port.createBinding(features, null, null);
    binding.setMode(mode);
    Dispatch<Object> dispatch = Stubs.createJAXBDispatch(
            port, binding, jaxbContext, mode,wsepr);
     serviceInterceptor.postCreateDispatch((WSBindingProvider)dispatch);
     return dispatch;
}
 
Example 5
Source File: WSServiceDelegate.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public <T> Dispatch<T> createDispatch(QName portName, WSEndpointReference wsepr, Class<T> aClass, Service.Mode mode, WebServiceFeatureList features) {
    PortInfo port = safeGetPort(portName);

    ComponentFeature cf = features.get(ComponentFeature.class);
    if (cf != null && !Target.STUB.equals(cf.getTarget())) {
        throw new IllegalArgumentException();
    }
    ComponentsFeature csf = features.get(ComponentsFeature.class);
    if (csf != null) {
        for (ComponentFeature cfi : csf.getComponentFeatures()) {
            if (!Target.STUB.equals(cfi.getTarget()))
                throw new IllegalArgumentException();
        }
    }
    features.addAll(this.features);

    BindingImpl binding = port.createBinding(features, null, null);
    binding.setMode(mode);
    Dispatch<T> dispatch = Stubs.createDispatch(port, this, binding, aClass, mode, wsepr);
    serviceInterceptor.postCreateDispatch((WSBindingProvider) dispatch);
    return dispatch;
}
 
Example 6
Source File: WSServiceDelegate.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public <T> Dispatch<T> createDispatch(QName portName, WSEndpointReference wsepr, Class<T> aClass, Service.Mode mode, WebServiceFeatureList features) {
    PortInfo port = safeGetPort(portName);

    ComponentFeature cf = features.get(ComponentFeature.class);
    if (cf != null && !Target.STUB.equals(cf.getTarget())) {
        throw new IllegalArgumentException();
    }
    ComponentsFeature csf = features.get(ComponentsFeature.class);
    if (csf != null) {
        for (ComponentFeature cfi : csf.getComponentFeatures()) {
            if (!Target.STUB.equals(cfi.getTarget()))
                throw new IllegalArgumentException();
        }
    }
    features.addAll(this.features);

    BindingImpl binding = port.createBinding(features, null, null);
    binding.setMode(mode);
    Dispatch<T> dispatch = Stubs.createDispatch(port, this, binding, aClass, mode, wsepr);
    serviceInterceptor.postCreateDispatch((WSBindingProvider) dispatch);
    return dispatch;
}
 
Example 7
Source File: WSServiceDelegate.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
protected <T> T getPort(WSEndpointReference wsepr, QName portName, Class<T> portInterface,
                      WebServiceFeatureList features) {
    ComponentFeature cf = features.get(ComponentFeature.class);
    if (cf != null && !Target.STUB.equals(cf.getTarget())) {
        throw new IllegalArgumentException();
    }
    ComponentsFeature csf = features.get(ComponentsFeature.class);
    if (csf != null) {
        for (ComponentFeature cfi : csf.getComponentFeatures()) {
            if (!Target.STUB.equals(cfi.getTarget()))
                throw new IllegalArgumentException();
        }
    }
    features.addAll(this.features);

    SEIPortInfo spi = addSEI(portName, portInterface, features);
    return createEndpointIFBaseProxy(wsepr,portName,portInterface,features, spi);
}
 
Example 8
Source File: WSServiceDelegate.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
protected Dispatch<Object> createDispatch(QName portName, WSEndpointReference wsepr, JAXBContext jaxbContext, Service.Mode mode, WebServiceFeatureList features) {
    PortInfo port = safeGetPort(portName);

    ComponentFeature cf = features.get(ComponentFeature.class);
    if (cf != null && !Target.STUB.equals(cf.getTarget())) {
        throw new IllegalArgumentException();
    }
    ComponentsFeature csf = features.get(ComponentsFeature.class);
    if (csf != null) {
        for (ComponentFeature cfi : csf.getComponentFeatures()) {
            if (!Target.STUB.equals(cfi.getTarget()))
                throw new IllegalArgumentException();
        }
    }
    features.addAll(this.features);

    BindingImpl binding = port.createBinding(features, null, null);
    binding.setMode(mode);
    Dispatch<Object> dispatch = Stubs.createJAXBDispatch(
            port, binding, jaxbContext, mode,wsepr);
     serviceInterceptor.postCreateDispatch((WSBindingProvider)dispatch);
     return dispatch;
}
 
Example 9
Source File: WSServiceDelegate.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public <T> Dispatch<T> createDispatch(QName portName, WSEndpointReference wsepr, Class<T> aClass, Service.Mode mode, WebServiceFeatureList features) {
    PortInfo port = safeGetPort(portName);

    ComponentFeature cf = features.get(ComponentFeature.class);
    if (cf != null && !Target.STUB.equals(cf.getTarget())) {
        throw new IllegalArgumentException();
    }
    ComponentsFeature csf = features.get(ComponentsFeature.class);
    if (csf != null) {
        for (ComponentFeature cfi : csf.getComponentFeatures()) {
            if (!Target.STUB.equals(cfi.getTarget()))
                throw new IllegalArgumentException();
        }
    }
    features.addAll(this.features);

    BindingImpl binding = port.createBinding(features, null, null);
    binding.setMode(mode);
    Dispatch<T> dispatch = Stubs.createDispatch(port, this, binding, aClass, mode, wsepr);
    serviceInterceptor.postCreateDispatch((WSBindingProvider) dispatch);
    return dispatch;
}
 
Example 10
Source File: WSServiceDelegate.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public <T> Dispatch<T> createDispatch(QName portName, WSEndpointReference wsepr, Class<T> aClass, Service.Mode mode, WebServiceFeatureList features) {
    PortInfo port = safeGetPort(portName);

    ComponentFeature cf = features.get(ComponentFeature.class);
    if (cf != null && !Target.STUB.equals(cf.getTarget())) {
        throw new IllegalArgumentException();
    }
    ComponentsFeature csf = features.get(ComponentsFeature.class);
    if (csf != null) {
        for (ComponentFeature cfi : csf.getComponentFeatures()) {
            if (!Target.STUB.equals(cfi.getTarget()))
                throw new IllegalArgumentException();
        }
    }
    features.addAll(this.features);

    BindingImpl binding = port.createBinding(features, null, null);
    binding.setMode(mode);
    Dispatch<T> dispatch = Stubs.createDispatch(port, this, binding, aClass, mode, wsepr);
    serviceInterceptor.postCreateDispatch((WSBindingProvider) dispatch);
    return dispatch;
}
 
Example 11
Source File: WSServiceDelegate.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
protected <T> T getPort(WSEndpointReference wsepr, QName portName, Class<T> portInterface,
                      WebServiceFeatureList features) {
    ComponentFeature cf = features.get(ComponentFeature.class);
    if (cf != null && !Target.STUB.equals(cf.getTarget())) {
        throw new IllegalArgumentException();
    }
    ComponentsFeature csf = features.get(ComponentsFeature.class);
    if (csf != null) {
        for (ComponentFeature cfi : csf.getComponentFeatures()) {
            if (!Target.STUB.equals(cfi.getTarget()))
                throw new IllegalArgumentException();
        }
    }
    features.addAll(this.features);

    SEIPortInfo spi = addSEI(portName, portInterface, features);
    return createEndpointIFBaseProxy(wsepr,portName,portInterface,features, spi);
}
 
Example 12
Source File: WSServiceDelegate.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public <T> Dispatch<T> createDispatch(QName portName, WSEndpointReference wsepr, Class<T> aClass, Service.Mode mode, WebServiceFeatureList features) {
    PortInfo port = safeGetPort(portName);

    ComponentFeature cf = features.get(ComponentFeature.class);
    if (cf != null && !Target.STUB.equals(cf.getTarget())) {
        throw new IllegalArgumentException();
    }
    ComponentsFeature csf = features.get(ComponentsFeature.class);
    if (csf != null) {
        for (ComponentFeature cfi : csf.getComponentFeatures()) {
            if (!Target.STUB.equals(cfi.getTarget()))
                throw new IllegalArgumentException();
        }
    }
    features.addAll(this.features);

    BindingImpl binding = port.createBinding(features, null, null);
    binding.setMode(mode);
    Dispatch<T> dispatch = Stubs.createDispatch(port, this, binding, aClass, mode, wsepr);
    serviceInterceptor.postCreateDispatch((WSBindingProvider) dispatch);
    return dispatch;
}
 
Example 13
Source File: WSServiceDelegate.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
protected <T> T getPort(WSEndpointReference wsepr, QName portName, Class<T> portInterface,
                      WebServiceFeatureList features) {
    ComponentFeature cf = features.get(ComponentFeature.class);
    if (cf != null && !Target.STUB.equals(cf.getTarget())) {
        throw new IllegalArgumentException();
    }
    ComponentsFeature csf = features.get(ComponentsFeature.class);
    if (csf != null) {
        for (ComponentFeature cfi : csf.getComponentFeatures()) {
            if (!Target.STUB.equals(cfi.getTarget()))
                throw new IllegalArgumentException();
        }
    }
    features.addAll(this.features);

    SEIPortInfo spi = addSEI(portName, portInterface, features);
    return createEndpointIFBaseProxy(wsepr,portName,portInterface,features, spi);
}
 
Example 14
Source File: WSServiceDelegate.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
protected <T> T getPort(WSEndpointReference wsepr, QName portName, Class<T> portInterface,
                      WebServiceFeatureList features) {
    ComponentFeature cf = features.get(ComponentFeature.class);
    if (cf != null && !Target.STUB.equals(cf.getTarget())) {
        throw new IllegalArgumentException();
    }
    ComponentsFeature csf = features.get(ComponentsFeature.class);
    if (csf != null) {
        for (ComponentFeature cfi : csf.getComponentFeatures()) {
            if (!Target.STUB.equals(cfi.getTarget()))
                throw new IllegalArgumentException();
        }
    }
    features.addAll(this.features);

    SEIPortInfo spi = addSEI(portName, portInterface, features);
    return createEndpointIFBaseProxy(wsepr,portName,portInterface,features, spi);
}
 
Example 15
Source File: WSServiceDelegate.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public <T> Dispatch<T> createDispatch(QName portName, WSEndpointReference wsepr, Class<T> aClass, Service.Mode mode, WebServiceFeatureList features) {
    PortInfo port = safeGetPort(portName);

    ComponentFeature cf = features.get(ComponentFeature.class);
    if (cf != null && !Target.STUB.equals(cf.getTarget())) {
        throw new IllegalArgumentException();
    }
    ComponentsFeature csf = features.get(ComponentsFeature.class);
    if (csf != null) {
        for (ComponentFeature cfi : csf.getComponentFeatures()) {
            if (!Target.STUB.equals(cfi.getTarget()))
                throw new IllegalArgumentException();
        }
    }
    features.addAll(this.features);

    BindingImpl binding = port.createBinding(features, null, null);
    binding.setMode(mode);
    Dispatch<T> dispatch = Stubs.createDispatch(port, this, binding, aClass, mode, wsepr);
    serviceInterceptor.postCreateDispatch((WSBindingProvider) dispatch);
    return dispatch;
}
 
Example 16
Source File: WSServiceDelegate.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
protected <T> T getPort(WSEndpointReference wsepr, QName portName, Class<T> portInterface,
                      WebServiceFeatureList features) {
    ComponentFeature cf = features.get(ComponentFeature.class);
    if (cf != null && !Target.STUB.equals(cf.getTarget())) {
        throw new IllegalArgumentException();
    }
    ComponentsFeature csf = features.get(ComponentsFeature.class);
    if (csf != null) {
        for (ComponentFeature cfi : csf.getComponentFeatures()) {
            if (!Target.STUB.equals(cfi.getTarget()))
                throw new IllegalArgumentException();
        }
    }
    features.addAll(this.features);

    SEIPortInfo spi = addSEI(portName, portInterface, features);
    return createEndpointIFBaseProxy(wsepr,portName,portInterface,features, spi);
}
 
Example 17
Source File: PortInfo.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public BindingImpl createBinding(WebServiceFeatureList webServiceFeatures, Class<?> portInterface,
            BindingImpl existingBinding) {
            if (existingBinding != null) {
                    webServiceFeatures.addAll(existingBinding.getFeatures());
            }

    Iterable<WebServiceFeature> configFeatures;
    //TODO incase of Dispatch, provide a way to User for complete control of the message processing by giving
    // ability to turn off the WSDL/Policy based features and its associated tubes.

    //Even in case of Dispatch, merge all features configured via WSDL/Policy or deployment configuration
    if (portModel != null) {
        // could have merged features from this.policyMap, but some features are set in WSDLModel which are not there in PolicyMap
        // for ex: <wsaw:UsingAddressing> wsdl extn., and since the policyMap features are merged into WSDLModel anyway during postFinished(),
        // So, using here WsdlModel for merging is right.

        // merge features from WSDL
        configFeatures = portModel.getFeatures();
    } else {
        configFeatures = PolicyUtil.getPortScopedFeatures(policyMap, owner.getServiceName(),portName);
    }
    webServiceFeatures.mergeFeatures(configFeatures, false);

    // merge features from interceptor
    webServiceFeatures.mergeFeatures(owner.serviceInterceptor.preCreateBinding(this, portInterface, webServiceFeatures), false);

    BindingImpl bindingImpl = BindingImpl.create(bindingId, webServiceFeatures.toArray());
    owner.getHandlerConfigurator().configureHandlers(this,bindingImpl);
    return bindingImpl;
}
 
Example 18
Source File: PortInfo.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public BindingImpl createBinding(WebServiceFeatureList webServiceFeatures, Class<?> portInterface,
            BindingImpl existingBinding) {
            if (existingBinding != null) {
                    webServiceFeatures.addAll(existingBinding.getFeatures());
            }

    Iterable<WebServiceFeature> configFeatures;
    //TODO incase of Dispatch, provide a way to User for complete control of the message processing by giving
    // ability to turn off the WSDL/Policy based features and its associated tubes.

    //Even in case of Dispatch, merge all features configured via WSDL/Policy or deployment configuration
    if (portModel != null) {
        // could have merged features from this.policyMap, but some features are set in WSDLModel which are not there in PolicyMap
        // for ex: <wsaw:UsingAddressing> wsdl extn., and since the policyMap features are merged into WSDLModel anyway during postFinished(),
        // So, using here WsdlModel for merging is right.

        // merge features from WSDL
        configFeatures = portModel.getFeatures();
    } else {
        configFeatures = PolicyUtil.getPortScopedFeatures(policyMap, owner.getServiceName(),portName);
    }
    webServiceFeatures.mergeFeatures(configFeatures, false);

    // merge features from interceptor
    webServiceFeatures.mergeFeatures(owner.serviceInterceptor.preCreateBinding(this, portInterface, webServiceFeatures), false);

    BindingImpl bindingImpl = BindingImpl.create(bindingId, webServiceFeatures.toArray());
    owner.getHandlerConfigurator().configureHandlers(this,bindingImpl);
    return bindingImpl;
}
 
Example 19
Source File: PortInfo.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public BindingImpl createBinding(WebServiceFeatureList webServiceFeatures, Class<?> portInterface,
            BindingImpl existingBinding) {
            if (existingBinding != null) {
                    webServiceFeatures.addAll(existingBinding.getFeatures());
            }

    Iterable<WebServiceFeature> configFeatures;
    //TODO incase of Dispatch, provide a way to User for complete control of the message processing by giving
    // ability to turn off the WSDL/Policy based features and its associated tubes.

    //Even in case of Dispatch, merge all features configured via WSDL/Policy or deployment configuration
    if (portModel != null) {
        // could have merged features from this.policyMap, but some features are set in WSDLModel which are not there in PolicyMap
        // for ex: <wsaw:UsingAddressing> wsdl extn., and since the policyMap features are merged into WSDLModel anyway during postFinished(),
        // So, using here WsdlModel for merging is right.

        // merge features from WSDL
        configFeatures = portModel.getFeatures();
    } else {
        configFeatures = PolicyUtil.getPortScopedFeatures(policyMap, owner.getServiceName(),portName);
    }
    webServiceFeatures.mergeFeatures(configFeatures, false);

    // merge features from interceptor
    webServiceFeatures.mergeFeatures(owner.serviceInterceptor.preCreateBinding(this, portInterface, webServiceFeatures), false);

    BindingImpl bindingImpl = BindingImpl.create(bindingId, webServiceFeatures.toArray());
    owner.getHandlerConfigurator().configureHandlers(this,bindingImpl);
    return bindingImpl;
}
 
Example 20
Source File: PortInfo.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public BindingImpl createBinding(WebServiceFeatureList webServiceFeatures, Class<?> portInterface,
            BindingImpl existingBinding) {
            if (existingBinding != null) {
                    webServiceFeatures.addAll(existingBinding.getFeatures());
            }

    Iterable<WebServiceFeature> configFeatures;
    //TODO incase of Dispatch, provide a way to User for complete control of the message processing by giving
    // ability to turn off the WSDL/Policy based features and its associated tubes.

    //Even in case of Dispatch, merge all features configured via WSDL/Policy or deployment configuration
    if (portModel != null) {
        // could have merged features from this.policyMap, but some features are set in WSDLModel which are not there in PolicyMap
        // for ex: <wsaw:UsingAddressing> wsdl extn., and since the policyMap features are merged into WSDLModel anyway during postFinished(),
        // So, using here WsdlModel for merging is right.

        // merge features from WSDL
        configFeatures = portModel.getFeatures();
    } else {
        configFeatures = PolicyUtil.getPortScopedFeatures(policyMap, owner.getServiceName(),portName);
    }
    webServiceFeatures.mergeFeatures(configFeatures, false);

    // merge features from interceptor
    webServiceFeatures.mergeFeatures(owner.serviceInterceptor.preCreateBinding(this, portInterface, webServiceFeatures), false);

    BindingImpl bindingImpl = BindingImpl.create(bindingId, webServiceFeatures.toArray());
    owner.getHandlerConfigurator().configureHandlers(this,bindingImpl);
    return bindingImpl;
}