com.sun.xml.internal.ws.binding.BindingImpl Java Examples
The following examples show how to use
com.sun.xml.internal.ws.binding.BindingImpl.
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: Stub.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * 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) { throw new WebServiceException("Unable to process bindingID=" + bindingId); // TODO: i18n } return assembler.createClient( new ClientTubeAssemblerContext( portInfo.getEndpointAddress(), portInfo.getPort(), this, binding, owner.getContainer(), ((BindingImpl) binding).createCodec(), seiModel, sei)); }
Example #2
Source File: WSServiceDelegate.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
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; }
Example #3
Source File: WSServiceDelegate.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
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 #4
Source File: ClientLogicalHandlerTube.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
void setUpProcessor() { if (handlers == null) { // Take a snapshot, User may change chain after invocation, Same chain // should be used for the entire MEP handlers = new ArrayList<Handler>(); WSBinding binding = getBinding(); List<LogicalHandler> logicalSnapShot= ((BindingImpl) binding).getHandlerConfig().getLogicalHandlers(); if (!logicalSnapShot.isEmpty()) { handlers.addAll(logicalSnapShot); if (binding.getSOAPVersion() == null) { processor = new XMLHandlerProcessor(this, binding, handlers); } else { processor = new SOAPHandlerProcessor(true, this, binding, handlers); } } } }
Example #5
Source File: WSServiceDelegate.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
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; }
Example #6
Source File: WSServiceDelegate.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
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 #7
Source File: WSServiceDelegate.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
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 #8
Source File: SEIStub.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public SEIStub(WSPortInfo portInfo, BindingImpl binding, SOAPSEIModel seiModel, WSEndpointReference epr) { super(portInfo, binding, seiModel.getPort().getAddress(),epr); this.seiModel = seiModel; this.soapVersion = binding.getSOAPVersion(); databinding = seiModel.getDatabinding(); initMethodHandlers(); }
Example #9
Source File: SEIStub.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
@Deprecated public SEIStub(WSServiceDelegate owner, BindingImpl binding, SOAPSEIModel seiModel, Tube master, WSEndpointReference epr) { super(owner, master, binding, seiModel.getPort(), seiModel.getPort().getAddress(), epr); this.seiModel = seiModel; this.soapVersion = binding.getSOAPVersion(); databinding = seiModel.getDatabinding(); initMethodHandlers(); }
Example #10
Source File: SEIStub.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public SEIStub(WSPortInfo portInfo, BindingImpl binding, SOAPSEIModel seiModel, WSEndpointReference epr) { super(portInfo, binding, seiModel.getPort().getAddress(),epr); this.seiModel = seiModel; this.soapVersion = binding.getSOAPVersion(); databinding = seiModel.getDatabinding(); initMethodHandlers(); }
Example #11
Source File: ClientTubeAssemblerContext.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * This constructor should be used only by JAX-WS Runtime and is not meant for external consumption. * @deprecated * Use {@link #ClientTubeAssemblerContext(EndpointAddress, WSDLPort, WSService, WSBindingProvider, WSBinding, Container, Codec, SEIModel, Class)} */ public ClientTubeAssemblerContext(@NotNull EndpointAddress address, @Nullable WSDLPort wsdlModel, @NotNull WSService rootOwner, @NotNull WSBinding binding, @NotNull Container container) { // WSBinding is actually BindingImpl this(address, wsdlModel, rootOwner, binding, container, ((BindingImpl)binding).createCodec() ); }
Example #12
Source File: HandlerTube.java From hottub with GNU General Public License v2.0 | 5 votes |
private void setUpProcessorInternal() { HandlerConfiguration hc = ((BindingImpl) binding).getHandlerConfig(); if (hc != this.hc) resetProcessor(); this.hc = hc; setUpProcessor(); }
Example #13
Source File: SEIStub.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public SEIStub(WSPortInfo portInfo, BindingImpl binding, SOAPSEIModel seiModel, WSEndpointReference epr) { super(portInfo, binding, seiModel.getPort().getAddress(),epr); this.seiModel = seiModel; this.soapVersion = binding.getSOAPVersion(); databinding = seiModel.getDatabinding(); initMethodHandlers(); }
Example #14
Source File: ServerSOAPHandlerTube.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
private void setUpHandlersOnce() { handlers = new ArrayList<Handler>(); HandlerConfiguration handlerConfig = ((BindingImpl) getBinding()).getHandlerConfig(); List<SOAPHandler> soapSnapShot= handlerConfig.getSoapHandlers(); if (!soapSnapShot.isEmpty()) { handlers.addAll(soapSnapShot); roles = new HashSet<String>(); roles.addAll(handlerConfig.getRoles()); } }
Example #15
Source File: ClientMessageHandlerTube.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
void setUpProcessor() { if (handlers == null) { // Take a snapshot, User may change chain after invocation, Same chain // should be used for the entire MEP handlers = new ArrayList<Handler>(); HandlerConfiguration handlerConfig = ((BindingImpl) getBinding()).getHandlerConfig(); List<MessageHandler> msgHandlersSnapShot= handlerConfig.getMessageHandlers(); if (!msgHandlersSnapShot.isEmpty()) { handlers.addAll(msgHandlersSnapShot); roles = new HashSet<String>(); roles.addAll(handlerConfig.getRoles()); processor = new SOAPHandlerProcessor(true, this, getBinding(), handlers); } } }
Example #16
Source File: ClientTubeAssemblerContext.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * This constructor should be used only by JAX-WS Runtime and is not meant for external consumption. * @deprecated * Use {@link #ClientTubeAssemblerContext(EndpointAddress, WSDLPort, WSService, WSBindingProvider, WSBinding, Container, Codec, SEIModel, Class)} */ public ClientTubeAssemblerContext(@NotNull EndpointAddress address, @Nullable WSDLPort wsdlModel, @NotNull WSService rootOwner, @NotNull WSBinding binding, @NotNull Container container) { // WSBinding is actually BindingImpl this(address, wsdlModel, rootOwner, binding, container, ((BindingImpl)binding).createCodec() ); }
Example #17
Source File: PortInfo.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
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: ServerLogicalHandlerTube.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
private void setUpHandlersOnce() { handlers = new ArrayList<Handler>(); List<LogicalHandler> logicalSnapShot= ((BindingImpl) getBinding()).getHandlerConfig().getLogicalHandlers(); if (!logicalSnapShot.isEmpty()) { handlers.addAll(logicalSnapShot); } }
Example #19
Source File: DispatchImpl.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
@Deprecated public static Dispatch<Source> createSourceDispatch(QName port, Mode mode, WSServiceDelegate owner, Tube pipe, BindingImpl binding, WSEndpointReference epr) { if(isXMLHttp(binding)) return new RESTSourceDispatch(port,mode,owner,pipe,binding,epr); else return new SOAPSourceDispatch(port,mode,owner,pipe,binding,epr); }
Example #20
Source File: WSEndpointImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
protected WSEndpointImpl(@NotNull QName serviceName, @NotNull QName portName, WSBinding binding, Container container, SEIModel seiModel, WSDLPort port, Tube masterTubeline) { this.serviceName = serviceName; this.portName = portName; this.binding = binding; this.soapVersion = binding.getSOAPVersion(); this.container = container; this.endpointPolicy = null; this.port = port; this.seiModel = seiModel; this.serviceDef = null; this.implementationClass = null; this.masterTubeline = masterTubeline; this.masterCodec = ((BindingImpl) this.binding).createCodec(); LazyMOMProvider.INSTANCE.registerEndpoint(this); initManagedObjectManager(); this.operationDispatcher = (port == null) ? null : new OperationDispatcher(port, binding, seiModel); this.context = new ServerPipeAssemblerContext( seiModel, port, this, null /* not known */, false); tubePool = new TubePool(masterTubeline); engine = new Engine(toString(), container); wsdlProperties = (port == null) ? new WSDLDirectProperties(serviceName, portName, seiModel) : new WSDLPortProperties(port, seiModel); }
Example #21
Source File: ClientMessageHandlerTube.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
void setUpProcessor() { if (handlers == null) { // Take a snapshot, User may change chain after invocation, Same chain // should be used for the entire MEP handlers = new ArrayList<Handler>(); HandlerConfiguration handlerConfig = ((BindingImpl) getBinding()).getHandlerConfig(); List<MessageHandler> msgHandlersSnapShot= handlerConfig.getMessageHandlers(); if (!msgHandlersSnapShot.isEmpty()) { handlers.addAll(msgHandlersSnapShot); roles = new HashSet<String>(); roles.addAll(handlerConfig.getRoles()); processor = new SOAPHandlerProcessor(true, this, getBinding(), handlers); } } }
Example #22
Source File: DispatchImpl.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
@Deprecated public static Dispatch<Source> createSourceDispatch(QName port, Mode mode, WSServiceDelegate owner, Tube pipe, BindingImpl binding, WSEndpointReference epr) { if(isXMLHttp(binding)) return new RESTSourceDispatch(port,mode,owner,pipe,binding,epr); else return new SOAPSourceDispatch(port,mode,owner,pipe,binding,epr); }
Example #23
Source File: ClientMessageHandlerTube.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
void setUpProcessor() { if (handlers == null) { // Take a snapshot, User may change chain after invocation, Same chain // should be used for the entire MEP handlers = new ArrayList<Handler>(); HandlerConfiguration handlerConfig = ((BindingImpl) getBinding()).getHandlerConfig(); List<MessageHandler> msgHandlersSnapShot= handlerConfig.getMessageHandlers(); if (!msgHandlersSnapShot.isEmpty()) { handlers.addAll(msgHandlersSnapShot); roles = new HashSet<String>(); roles.addAll(handlerConfig.getRoles()); processor = new SOAPHandlerProcessor(true, this, getBinding(), handlers); } } }
Example #24
Source File: PacketDispatch.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
private boolean calculateIsDeliverThrowableInPacket(BindingImpl binding) { return binding.isFeatureEnabled(ThrowableInPacketCompletionFeature.class); }
Example #25
Source File: HandlerConfigurator.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
@Override void configureHandlers(@NotNull WSPortInfo port, @NotNull BindingImpl binding) { if (resolver!=null) { binding.setHandlerChain(resolver.getHandlerChain(port)); } }
Example #26
Source File: RESTSourceDispatch.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
@Deprecated public RESTSourceDispatch(QName port, Mode mode, WSServiceDelegate owner, Tube pipe, BindingImpl binding, WSEndpointReference epr) { super(port, mode, owner, pipe, binding, epr); assert isXMLHttp(binding); }
Example #27
Source File: RESTSourceDispatch.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
@Deprecated public RESTSourceDispatch(QName port, Mode mode, WSServiceDelegate owner, Tube pipe, BindingImpl binding, WSEndpointReference epr) { super(port, mode, owner, pipe, binding, epr); assert isXMLHttp(binding); }
Example #28
Source File: SOAPSourceDispatch.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
public SOAPSourceDispatch(WSPortInfo portInfo, Mode mode, BindingImpl binding, WSEndpointReference epr) { super(portInfo, mode, binding, epr); assert !isXMLHttp(binding); }
Example #29
Source File: PacketDispatch.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
public PacketDispatch(WSPortInfo portInfo, BindingImpl binding, WSEndpointReference epr) { super(portInfo, Mode.MESSAGE, binding, epr, true); isDeliverThrowableInPacket = calculateIsDeliverThrowableInPacket(binding); }
Example #30
Source File: DispatchImpl.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
public static Dispatch<Source> createSourceDispatch(WSPortInfo portInfo, Mode mode, BindingImpl binding, WSEndpointReference epr) { if (isXMLHttp(binding)) return new RESTSourceDispatch(portInfo, mode, binding, epr); else return new SOAPSourceDispatch(portInfo, mode, binding, epr); }