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;
}
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);
}
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;
}
Aggregations