use of com.sun.xml.ws.binding.BindingImpl in project metro-jax-ws by eclipse-ee4j.
the class FeatureListValidatorTest method testAddsAddressing.
public void testAddsAddressing() {
BindingImpl binding = BindingImpl.create(BindingID.SOAP11_HTTP, new WebServiceFeature[] { new AddsAddressingFeature() });
assertTrue("AddressingFeature must be enabled because AddsAddressingFeature was passed", binding.isFeatureEnabled(AddressingFeature.class));
}
use of com.sun.xml.ws.binding.BindingImpl in project metro-jax-ws by eclipse-ee4j.
the class FeatureListValidatorTest method testAddsAddressingAlreadyPresent.
public void testAddsAddressingAlreadyPresent() {
BindingImpl binding = BindingImpl.create(BindingID.SOAP11_HTTP, new WebServiceFeature[] { new AddsAddressingFeature(), new AddressingFeature() });
assertTrue("AddressingFeature must be enabled because AddsAddressingFeature was passed", binding.isFeatureEnabled(AddressingFeature.class));
}
use of com.sun.xml.ws.binding.BindingImpl in project metro-jax-ws by eclipse-ee4j.
the class Stub method createPipeline.
/**
* Creates a new pipeline for the given port name.
*/
private Tube createPipeline(WSPortInfo portInfo, WSBinding binding) {
// Check all required WSDL extensions are understood
checkAllWSDLExtensionsUnderstood(portInfo, binding);
SEIModel seiModel = null;
Class sei = null;
if (portInfo instanceof SEIPortInfo) {
SEIPortInfo sp = (SEIPortInfo) portInfo;
seiModel = sp.model;
sei = sp.sei;
}
BindingID bindingId = portInfo.getBindingId();
TubelineAssembler assembler = TubelineAssemblerFactory.create(Thread.currentThread().getContextClassLoader(), bindingId, owner.getContainer());
if (assembler == null) {
// TODO: i18n
throw new WebServiceException("Unable to process bindingID=" + bindingId);
}
return assembler.createClient(new ClientTubeAssemblerContext(portInfo.getEndpointAddress(), portInfo.getPort(), this, binding, owner.getContainer(), ((BindingImpl) binding).createCodec(), seiModel, sei));
}
use of com.sun.xml.ws.binding.BindingImpl 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.binding.BindingImpl in project metro-jax-ws by eclipse-ee4j.
the class WSServiceDelegate method createEndpointIFBaseProxy.
private <T> T createEndpointIFBaseProxy(@Nullable WSEndpointReference epr, QName portName, Class<T> portInterface, WebServiceFeatureList webServiceFeatures, SEIPortInfo eif) {
// fail if service doesnt have WSDL
if (wsdlService == null) {
throw new WebServiceException(ClientMessages.INVALID_SERVICE_NO_WSDL(serviceName));
}
if (wsdlService.get(portName) == null) {
throw new WebServiceException(ClientMessages.INVALID_PORT_NAME(portName, buildWsdlPortNames()));
}
BindingImpl binding = eif.createBinding(webServiceFeatures, portInterface);
InvocationHandler pis = getStubHandler(binding, eif, epr);
T proxy = createProxy(portInterface, pis);
if (serviceInterceptor != null) {
serviceInterceptor.postCreateProxy((WSBindingProvider) proxy, portInterface);
}
return proxy;
}
Aggregations