Search in sources :

Example 1 with ComponentsFeature

use of com.sun.xml.ws.api.ComponentsFeature in project metro-jax-ws by eclipse-ee4j.

the class WSServiceDelegate method createDispatch.

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;
}
Also used : BindingImpl(com.sun.xml.ws.binding.BindingImpl) ComponentFeature(com.sun.xml.ws.api.ComponentFeature) ComponentsFeature(com.sun.xml.ws.api.ComponentsFeature)

Example 2 with ComponentsFeature

use of com.sun.xml.ws.api.ComponentsFeature in project metro-jax-ws by eclipse-ee4j.

the class WSServiceDelegate method getPort.

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);
}
Also used : ComponentFeature(com.sun.xml.ws.api.ComponentFeature) ComponentsFeature(com.sun.xml.ws.api.ComponentsFeature)

Example 3 with ComponentsFeature

use of com.sun.xml.ws.api.ComponentsFeature in project metro-jax-ws by eclipse-ee4j.

the class WSServiceDelegate method createDispatch.

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;
}
Also used : BindingImpl(com.sun.xml.ws.binding.BindingImpl) ComponentFeature(com.sun.xml.ws.api.ComponentFeature) ComponentsFeature(com.sun.xml.ws.api.ComponentsFeature)

Aggregations

ComponentFeature (com.sun.xml.ws.api.ComponentFeature)3 ComponentsFeature (com.sun.xml.ws.api.ComponentsFeature)3 BindingImpl (com.sun.xml.ws.binding.BindingImpl)2