com.sun.xml.internal.ws.api.server.Container Java Examples
The following examples show how to use
com.sun.xml.internal.ws.api.server.Container.
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: DispatchImpl.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public final Future<?> invokeAsync(T param, AsyncHandler<T> asyncHandler) { Container old = ContainerResolver.getDefault().enterContainer(owner.getContainer()); try { if (LOGGER.isLoggable(Level.FINE)) { dumpParam(param, "invokeAsync(T, AsyncHandler<T>)"); } AsyncInvoker invoker = new DispatchAsyncInvoker(param); AsyncResponseImpl<T> ft = new AsyncResponseImpl<T>(invoker,asyncHandler); invoker.setReceiver(ft); invoker.setNonNullAsyncHandlerGiven(asyncHandler != null); ft.run(); return ft; } finally { ContainerResolver.getDefault().exitContainer(old); } }
Example #2
Source File: EndpointFactory.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public static <T> WSEndpoint<T> createEndpoint( Class<T> implType, boolean processHandlerAnnotation, @Nullable Invoker invoker, @Nullable QName serviceName, @Nullable QName portName, @Nullable Container container, @Nullable WSBinding binding, @Nullable SDDocumentSource primaryWsdl, @Nullable Collection<? extends SDDocumentSource> metadata, EntityResolver resolver, boolean isTransportSynchronous, boolean isStandard) { EndpointFactory factory = container != null ? container.getSPI(EndpointFactory.class) : null; if (factory == null) factory = EndpointFactory.getInstance(); return factory.create( implType,processHandlerAnnotation, invoker,serviceName,portName,container,binding,primaryWsdl,metadata,resolver,isTransportSynchronous,isStandard); }
Example #3
Source File: RuntimeWSDLParser.java From hottub with GNU General Public License v2.0 | 5 votes |
public static WSDLModel parse(XMLEntityResolver.Parser wsdl, XMLEntityResolver resolver, boolean isClientSide, Container container, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException { assert resolver != null; RuntimeWSDLParser parser = new RuntimeWSDLParser( wsdl.systemId.toExternalForm(), resolver, isClientSide, container, PolicyResolverFactory.create(), extensions); parser.extensionFacade.start(parser.context); parser.parseWSDL(wsdl, false); parser.wsdlDoc.freeze(); parser.extensionFacade.finished(parser.context); parser.extensionFacade.postFinished(parser.context); return parser.wsdlDoc; }
Example #4
Source File: WSDLGenerator.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Creates the WSDLGenerator * @param model The {@link AbstractSEIModelImpl} used to generate the WSDL * @param wsdlResolver The {@link WSDLResolver} to use resovle names while generating the WSDL * @param binding specifies which {@link javax.xml.ws.BindingType} to generate * @param disableXmlSecurity specifies whether to disable the secure xml processing feature * @param extensions an array {@link WSDLGeneratorExtension} that will * be invoked to generate WSDL extensions */ public WSDLGenerator(AbstractSEIModelImpl model, WSDLResolver wsdlResolver, WSBinding binding, Container container, Class implType, boolean inlineSchemas, boolean disableXmlSecurity, WSDLGeneratorExtension... extensions) { this.model = model; resolver = new JAXWSOutputSchemaResolver(); this.wsdlResolver = wsdlResolver; this.binding = binding; this.container = container; this.implType = implType; extensionHandlers = new ArrayList<WSDLGeneratorExtension>(); this.inlineSchemas = inlineSchemas; this.disableXmlSecurity = disableXmlSecurity; // register handlers for default extensions register(new W3CAddressingWSDLGeneratorExtension()); register(new W3CAddressingMetadataWSDLGeneratorExtension()); register(new PolicyWSDLGeneratorExtension()); if (container != null) { // on server WSDLGeneratorExtension[] wsdlGeneratorExtensions = container.getSPI(WSDLGeneratorExtension[].class); if (wsdlGeneratorExtensions != null) { for (WSDLGeneratorExtension wsdlGeneratorExtension : wsdlGeneratorExtensions) { register(wsdlGeneratorExtension); } } } for (WSDLGeneratorExtension w : extensions) register(w); this.extension = new WSDLGeneratorExtensionFacade(extensionHandlers.toArray(new WSDLGeneratorExtension[0])); }
Example #5
Source File: EndpointFactory.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Implements {@link WSEndpoint#create}. * * No need to take WebServiceContext implementation. When InvokerPipe is * instantiated, it calls InstanceResolver to set up a WebServiceContext. * We shall only take delegate to getUserPrincipal and isUserInRole from adapter. * * <p> * Nobody else should be calling this method. */ public <T> WSEndpoint<T> create( Class<T> implType, boolean processHandlerAnnotation, @Nullable Invoker invoker, @Nullable QName serviceName, @Nullable QName portName, @Nullable Container container, @Nullable WSBinding binding, @Nullable SDDocumentSource primaryWsdl, @Nullable Collection<? extends SDDocumentSource> metadata, EntityResolver resolver, boolean isTransportSynchronous) { return create(implType, processHandlerAnnotation, invoker, serviceName, portName, container, binding, primaryWsdl, metadata, resolver, isTransportSynchronous, true); }
Example #6
Source File: RuntimeWSDLParser.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public static WSDLModel parse(XMLEntityResolver.Parser wsdl, XMLEntityResolver resolver, boolean isClientSide, Container container, PolicyResolver policyResolver, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException { assert resolver != null; RuntimeWSDLParser parser = new RuntimeWSDLParser( wsdl.systemId.toExternalForm(), resolver, isClientSide, container, policyResolver, extensions); parser.extensionFacade.start(parser.context); parser.parseWSDL(wsdl, false); parser.wsdlDoc.freeze(); parser.extensionFacade.finished(parser.context); parser.extensionFacade.postFinished(parser.context); return parser.wsdlDoc; }
Example #7
Source File: ClientTubeAssemblerContext.java From TencentKona-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 #8
Source File: DispatchImpl.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public final T invoke(T in) { Container old = ContainerResolver.getDefault().enterContainer(owner.getContainer()); try { if (LOGGER.isLoggable(Level.FINE)) { dumpParam(in, "invoke(T)"); } return doInvoke(in,requestContext,this); } finally { ContainerResolver.getDefault().exitContainer(old); } }
Example #9
Source File: ClientTubeAssemblerContext.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
private ClientTubeAssemblerContext(@NotNull EndpointAddress address, @Nullable WSDLPort wsdlModel, @Nullable WSService rootOwner, @Nullable WSBindingProvider bindingProvider, @NotNull WSBinding binding, @NotNull Container container, Codec codec, SEIModel seiModel, Class sei) { this.address = address; this.wsdlModel = wsdlModel; this.rootOwner = rootOwner; this.bindingProvider = bindingProvider; this.binding = binding; this.container = container; this.codec = codec; this.seiModel = seiModel; this.sei = sei; }
Example #10
Source File: RuntimeWSDLParser.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public static WSDLModel parse(XMLEntityResolver.Parser wsdl, XMLEntityResolver resolver, boolean isClientSide, Container container, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException { assert resolver != null; RuntimeWSDLParser parser = new RuntimeWSDLParser( wsdl.systemId.toExternalForm(), resolver, isClientSide, container, PolicyResolverFactory.create(), extensions); parser.extensionFacade.start(parser.context); parser.parseWSDL(wsdl, false); parser.wsdlDoc.freeze(); parser.extensionFacade.finished(parser.context); parser.extensionFacade.postFinished(parser.context); return parser.wsdlDoc; }
Example #11
Source File: DispatchImpl.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public final T invoke(T in) { Container old = ContainerResolver.getDefault().enterContainer(owner.getContainer()); try { if (LOGGER.isLoggable(Level.FINE)) { dumpParam(in, "invoke(T)"); } return doInvoke(in,requestContext,this); } finally { ContainerResolver.getDefault().exitContainer(old); } }
Example #12
Source File: ProviderInvokerTube.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public static <T> ProviderInvokerTube<T> create(final Class<T> implType, final WSBinding binding, final Invoker invoker, final Container container) { final ProviderEndpointModel<T> model = new ProviderEndpointModel<T>(implType, binding); final ProviderArgumentsBuilder<?> argsBuilder = ProviderArgumentsBuilder.create(model, binding); if (binding instanceof SOAPBindingImpl) { //set portKnownHeaders on Binding, so that they can be used for MU processing ((SOAPBindingImpl) binding).setMode(model.mode); } return ProviderInvokerTubeFactory.create(null, container, implType, invoker, argsBuilder, model.isAsync); }
Example #13
Source File: RuntimeWSDLParser.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public static WSDLModel parse(XMLEntityResolver.Parser wsdl, XMLEntityResolver resolver, boolean isClientSide, Container container, WSDLParserExtension... extensions) throws IOException, XMLStreamException, SAXException { assert resolver != null; RuntimeWSDLParser parser = new RuntimeWSDLParser( wsdl.systemId.toExternalForm(), resolver, isClientSide, container, PolicyResolverFactory.create(), extensions); parser.extensionFacade.start(parser.context); parser.parseWSDL(wsdl, false); parser.wsdlDoc.freeze(); parser.extensionFacade.finished(parser.context); parser.extensionFacade.postFinished(parser.context); return parser.wsdlDoc; }
Example #14
Source File: EndpointFactory.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Generates the WSDL and XML Schema for the endpoint if necessary * It generates WSDL only for SOAP1.1, and for XSOAP1.2 bindings */ private static SDDocumentImpl generateWSDL(WSBinding binding, AbstractSEIModelImpl seiModel, Collection<SDDocumentImpl> docs, Container container, Class implType) { BindingID bindingId = binding.getBindingId(); if (!bindingId.canGenerateWSDL()) { throw new ServerRtException("can.not.generate.wsdl", bindingId); } if (bindingId.toString().equals(SOAPBindingImpl.X_SOAP12HTTP_BINDING)) { String msg = ServerMessages.GENERATE_NON_STANDARD_WSDL(); logger.warning(msg); } // Generate WSDL and schema documents using runtime model WSDLGenResolver wsdlResolver = new WSDLGenResolver(docs,seiModel.getServiceQName(),seiModel.getPortTypeName()); WSDLGenInfo wsdlGenInfo = new WSDLGenInfo(); wsdlGenInfo.setWsdlResolver(wsdlResolver); wsdlGenInfo.setContainer(container); wsdlGenInfo.setExtensions(ServiceFinder.find(WSDLGeneratorExtension.class).toArray()); wsdlGenInfo.setInlineSchemas(false); wsdlGenInfo.setSecureXmlProcessingDisabled(isSecureXmlProcessingDisabled(binding.getFeatures())); seiModel.getDatabinding().generateWSDL(wsdlGenInfo); // WSDLGenerator wsdlGen = new WSDLGenerator(seiModel, wsdlResolver, binding, container, implType, false, // ServiceFinder.find(WSDLGeneratorExtension.class).toArray()); // wsdlGen.doGeneration(); return wsdlResolver.updateDocs(); }
Example #15
Source File: DispatchImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public final Response<T> invokeAsync(T param) { Container old = ContainerResolver.getDefault().enterContainer(owner.getContainer()); try { if (LOGGER.isLoggable(Level.FINE)) { dumpParam(param, "invokeAsync(T)"); } AsyncInvoker invoker = new DispatchAsyncInvoker(param); AsyncResponseImpl<T> ft = new AsyncResponseImpl<T>(invoker,null); invoker.setReceiver(ft); ft.run(); return ft; } finally { ContainerResolver.getDefault().exitContainer(old); } }
Example #16
Source File: ClientTubeAssemblerContext.java From jdk8u60 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. * * @since JAX-WS 2.2 */ public ClientTubeAssemblerContext(@NotNull EndpointAddress address, @Nullable WSDLPort wsdlModel, @NotNull WSBindingProvider bindingProvider, @NotNull WSBinding binding, @NotNull Container container, Codec codec, SEIModel seiModel, Class sei) { this(address, wsdlModel, (bindingProvider==null? null: bindingProvider.getPortInfo().getOwner()), bindingProvider, binding, container, codec, seiModel, sei); }
Example #17
Source File: EndpointFactory.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Implements {@link WSEndpoint#create}. * * No need to take WebServiceContext implementation. When InvokerPipe is * instantiated, it calls InstanceResolver to set up a WebServiceContext. * We shall only take delegate to getUserPrincipal and isUserInRole from adapter. * * <p> * Nobody else should be calling this method. */ public static <T> WSEndpoint<T> createEndpoint( Class<T> implType, boolean processHandlerAnnotation, @Nullable Invoker invoker, @Nullable QName serviceName, @Nullable QName portName, @Nullable Container container, @Nullable WSBinding binding, @Nullable SDDocumentSource primaryWsdl, @Nullable Collection<? extends SDDocumentSource> metadata, EntityResolver resolver, boolean isTransportSynchronous) { return createEndpoint(implType, processHandlerAnnotation, invoker, serviceName, portName, container, binding, primaryWsdl, metadata, resolver, isTransportSynchronous, true); }
Example #18
Source File: EndpointFactory.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public static <T> WSEndpoint<T> createEndpoint( Class<T> implType, boolean processHandlerAnnotation, @Nullable Invoker invoker, @Nullable QName serviceName, @Nullable QName portName, @Nullable Container container, @Nullable WSBinding binding, @Nullable SDDocumentSource primaryWsdl, @Nullable Collection<? extends SDDocumentSource> metadata, EntityResolver resolver, boolean isTransportSynchronous, boolean isStandard) { EndpointFactory factory = container != null ? container.getSPI(EndpointFactory.class) : null; if (factory == null) factory = EndpointFactory.getInstance(); return factory.create( implType,processHandlerAnnotation, invoker,serviceName,portName,container,binding,primaryWsdl,metadata,resolver,isTransportSynchronous,isStandard); }
Example #19
Source File: WSEndpointMOMProxy.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
@Override public Container getContainer() { return this.wsEndpoint.getContainer(); }
Example #20
Source File: EndpointFactory.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
protected <T> WSEndpoint<T> create(QName serviceName, QName portName, WSBinding binding, Container container, SEIModel seiModel, WSDLPort wsdlPort, Class<T> implType, ServiceDefinitionImpl serviceDefinition, EndpointAwareTube terminal, boolean isTransportSynchronous, PolicyMap policyMap) { return new WSEndpointImpl<T>(serviceName, portName, binding, container, seiModel, wsdlPort, implType, serviceDefinition, terminal, isTransportSynchronous, policyMap); }
Example #21
Source File: WSService.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public Container getContainer() { return container; }
Example #22
Source File: WSEndpointMOMProxy.java From hottub with GNU General Public License v2.0 | 4 votes |
@Override public Container getContainer() { return this.wsEndpoint.getContainer(); }
Example #23
Source File: Stub.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
private Stub(WSServiceDelegate owner, @Nullable Tube master, @Nullable WSPortInfo portInfo, QName portname, BindingImpl binding, @Nullable WSDLPort wsdlPort, EndpointAddress defaultEndPointAddress, @Nullable WSEndpointReference epr) { Container old = ContainerResolver.getDefault().enterContainer(owner.getContainer()); try { this.owner = owner; this.portInfo = portInfo; this.wsdlPort = wsdlPort != null ? wsdlPort : (portInfo != null ? portInfo.getPort() : null); this.portname = portname; if (portname == null) { if (portInfo != null) { this.portname = portInfo.getPortName(); } else if (wsdlPort != null) { this.portname = wsdlPort.getName(); } } this.binding = binding; ComponentFeature cf = binding.getFeature(ComponentFeature.class); if (cf != null && Target.STUB.equals(cf.getTarget())) { components.add(cf.getComponent()); } ComponentsFeature csf = binding.getFeature(ComponentsFeature.class); if (csf != null) { for (ComponentFeature cfi : csf.getComponentFeatures()) { if (Target.STUB.equals(cfi.getTarget())) components.add(cfi.getComponent()); } } // if there is an EPR, EPR's address should be used for invocation instead of default address if (epr != null) { this.requestContext.setEndPointAddressString(epr.getAddress()); } else { this.requestContext.setEndpointAddress(defaultEndPointAddress); } this.engine = new Engine(getStringId(), owner.getContainer(), owner.getExecutor()); this.endpointReference = epr; wsdlProperties = (wsdlPort == null) ? new WSDLDirectProperties(owner.getServiceName(), portname) : new WSDLPortProperties(wsdlPort); this.cleanRequestContext = this.requestContext.copy(); // ManagedObjectManager MUST be created before the pipeline // is constructed. managedObjectManager = new MonitorRootClient(this).createManagedObjectManager(this); if (master != null) { this.tubes = new TubePool(master); } else { this.tubes = new TubePool(createPipeline(portInfo, binding)); } addrVersion = binding.getAddressingVersion(); // This needs to happen after createPipeline. // TBD: Check if it needs to happen outside the Stub constructor. managedObjectManager.resumeJMXRegistration(); } finally { ContainerResolver.getDefault().exitContainer(old); } }
Example #24
Source File: Engine.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
public Engine(String id, Container container) { this.id = id; this.container = container; }
Example #25
Source File: ClientTubeAssemblerContext.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 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, Codec codec) { this(address, wsdlModel, rootOwner, binding, container, codec, null, null); }
Example #26
Source File: ClientPipeAssemblerContext.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
public ClientPipeAssemblerContext(@NotNull EndpointAddress address, @NotNull WSDLPort wsdlModel, @NotNull WSService rootOwner, @NotNull WSBinding binding, @NotNull Container container) { super(address, wsdlModel, rootOwner, binding, container); }
Example #27
Source File: Engine.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
public Engine(String id, Container container) { this.id = id; this.container = container; }
Example #28
Source File: WSDLGenExtnContext.java From hottub with GNU General Public License v2.0 | 4 votes |
public Container getContainer() { return container; }
Example #29
Source File: WSDLGenInfo.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
public void setContainer(Container container) { this.container = container; }
Example #30
Source File: WsimportTool.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
public WsimportTool(OutputStream logStream, Container container) { this.out = (logStream instanceof PrintStream)?(PrintStream)logStream:new PrintStream(logStream); this.container = container; }