本文整理汇总了Java中com.sun.xml.internal.ws.server.EndpointFactory类的典型用法代码示例。如果您正苦于以下问题:Java EndpointFactory类的具体用法?Java EndpointFactory怎么用?Java EndpointFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EndpointFactory类属于com.sun.xml.internal.ws.server包,在下文中一共展示了EndpointFactory类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: create
import com.sun.xml.internal.ws.server.EndpointFactory; //导入依赖的package包/类
public static <T> WSEndpoint<T> create(
@NotNull 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,
@Nullable EntityResolver resolver,
boolean isTransportSynchronous,
boolean isStandard)
{
final WSEndpoint<T> endpoint =
EndpointFactory.createEndpoint(
implType,processHandlerAnnotation, invoker,serviceName,portName,container,binding,primaryWsdl,metadata,resolver,isTransportSynchronous,isStandard);
final Iterator<ManagedEndpointFactory> managementFactories = ServiceFinder.find(ManagedEndpointFactory.class).iterator();
if (managementFactories.hasNext()) {
final ManagedEndpointFactory managementFactory = managementFactories.next();
final EndpointCreationAttributes attributes = new EndpointCreationAttributes(
processHandlerAnnotation, invoker, resolver, isTransportSynchronous);
WSEndpoint<T> managedEndpoint = managementFactory.createEndpoint(endpoint, attributes);
if (endpoint.getAssemblerContext().getTerminalTube() instanceof EndpointAwareTube) {
((EndpointAwareTube)endpoint.getAssemblerContext().getTerminalTube()).setEndpoint(managedEndpoint);
}
return managedEndpoint;
}
return endpoint;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:37,代码来源:WSEndpoint.java
示例2: createEndpoint
import com.sun.xml.internal.ws.server.EndpointFactory; //导入依赖的package包/类
private void createEndpoint(String urlPattern) {
// Checks permission for "publishEndpoint"
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
sm.checkPermission(ENDPOINT_PUBLISH_PERMISSION);
}
// See if HttpServer implementation is available
try {
Class.forName("com.sun.net.httpserver.HttpServer");
} catch (Exception e) {
throw new UnsupportedOperationException("Couldn't load light weight http server", e);
}
container = getContainer();
MetadataReader metadataReader = EndpointFactory.getExternalMetadatReader(implClass, binding);
WSEndpoint wse = WSEndpoint.create(
implClass, true,
invoker,
getProperty(QName.class, Endpoint.WSDL_SERVICE),
getProperty(QName.class, Endpoint.WSDL_PORT),
container,
binding,
getPrimaryWsdl(metadataReader),
buildDocList(),
(EntityResolver) null,
false
);
// Don't load HttpEndpoint class before as it may load HttpServer classes
actualEndpoint = new HttpEndpoint(executor, getAdapter(wse, urlPattern));
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:31,代码来源:EndpointImpl.java
示例3: getPrimaryWsdl
import com.sun.xml.internal.ws.server.EndpointFactory; //导入依赖的package包/类
/**
* Gets wsdl from @WebService or @WebServiceProvider
*/
private @Nullable SDDocumentSource getPrimaryWsdl(MetadataReader metadataReader) {
// Takes care of @WebService, @WebServiceProvider's wsdlLocation
EndpointFactory.verifyImplementorClass(implClass, metadataReader);
String wsdlLocation = EndpointFactory.getWsdlLocation(implClass, metadataReader);
if (wsdlLocation != null) {
ClassLoader cl = implClass.getClassLoader();
URL url = cl.getResource(wsdlLocation);
if (url != null) {
return SDDocumentSource.create(url);
}
throw new ServerRtException("cannot.load.wsdl", wsdlLocation);
}
return null;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:EndpointImpl.java
示例4: getPrimaryWsdl
import com.sun.xml.internal.ws.server.EndpointFactory; //导入依赖的package包/类
/**
* Gets wsdl from @WebService or @WebServiceProvider
*/
private @Nullable SDDocumentSource getPrimaryWsdl(MetadataReader metadataReader) {
// Takes care of @WebService, @WebServiceProvider's wsdlLocation
EndpointFactory.verifyImplementorClass(implClass, metadataReader);
String wsdlLocation = EndpointFactory.getWsdlLocation(implClass, metadataReader);
if (wsdlLocation != null) {
return SDDocumentSource.create(implClass, wsdlLocation);
}
return null;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:13,代码来源:EndpointImpl.java
示例5: getPrimaryWsdl
import com.sun.xml.internal.ws.server.EndpointFactory; //导入依赖的package包/类
/**
* Gets wsdl from @WebService or @WebServiceProvider
*/
private @Nullable SDDocumentSource getPrimaryWsdl(MetadataReader metadataReader) {
// Takes care of @WebService, @WebServiceProvider's wsdlLocation
EndpointFactory.verifyImplementorClass(implClass, metadataReader);
String wsdlLocation = EndpointFactory.getWsdlLocation(implClass, metadataReader);
if (wsdlLocation != null) {
ClassLoader cl = implClass.getClassLoader();
URL url = cl.getResource(wsdlLocation);
if (url != null) {
return SDDocumentSource.create(url);
}
return SDDocumentSource.create(implClass, wsdlLocation);
}
return null;
}
开发者ID:campolake,项目名称:openjdk9,代码行数:18,代码来源:EndpointImpl.java
示例6: getPrimaryWsdl
import com.sun.xml.internal.ws.server.EndpointFactory; //导入依赖的package包/类
/**
* Gets wsdl from @WebService or @WebServiceProvider
*/
private @Nullable SDDocumentSource getPrimaryWsdl() {
// Takes care of @WebService, @WebServiceProvider's wsdlLocation
EndpointFactory.verifyImplementorClass(implClass);
String wsdlLocation = EndpointFactory.getWsdlLocation(implClass);
if (wsdlLocation != null) {
ClassLoader cl = implClass.getClassLoader();
URL url = cl.getResource(wsdlLocation);
if (url != null) {
return SDDocumentSource.create(url);
}
throw new ServerRtException("cannot.load.wsdl", wsdlLocation);
}
return null;
}
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:18,代码来源:EndpointImpl.java
示例7: getDefaultServiceName
import com.sun.xml.internal.ws.server.EndpointFactory; //导入依赖的package包/类
public static @NotNull QName getDefaultServiceName(Class endpointClass, boolean isStandard, MetadataReader metadataReader){
return EndpointFactory.getDefaultServiceName(endpointClass, isStandard, metadataReader);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:WSEndpoint.java
示例8: getDefaultPortName
import com.sun.xml.internal.ws.server.EndpointFactory; //导入依赖的package包/类
public static @NotNull QName getDefaultPortName(@NotNull QName serviceName, Class endpointClass, boolean isStandard, MetadataReader metadataReader){
return EndpointFactory.getDefaultPortName(serviceName, endpointClass, isStandard, metadataReader);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:WSEndpoint.java
示例9: getDefaultServiceName
import com.sun.xml.internal.ws.server.EndpointFactory; //导入依赖的package包/类
/**
* Gives the wsdl:service default name computed from the endpoint implementaiton class
*/
public static @NotNull QName getDefaultServiceName(Class endpointClass){
return EndpointFactory.getDefaultServiceName(endpointClass);
}
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:7,代码来源:WSEndpoint.java
示例10: getDefaultPortName
import com.sun.xml.internal.ws.server.EndpointFactory; //导入依赖的package包/类
/**
* Gives the wsdl:service/wsdl:port default name computed from the endpoint implementaiton class
*/
public static @NotNull QName getDefaultPortName(@NotNull QName serviceName, Class endpointClass){
return EndpointFactory.getDefaultPortName(serviceName, endpointClass);
}
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:7,代码来源:WSEndpoint.java
示例11: parseAdapters
import com.sun.xml.internal.ws.server.EndpointFactory; //导入依赖的package包/类
private List<A> parseAdapters(XMLStreamReader reader) {
if (!reader.getName().equals(QNAME_ENDPOINTS)) {
failWithFullName("runtime.parser.invalidElement", reader);
}
List<A> adapters = new ArrayList<A>();
Attributes attrs = XMLStreamReaderUtil.getAttributes(reader);
String version = getMandatoryNonEmptyAttribute(reader, attrs, ATTR_VERSION);
if (!version.equals(ATTRVALUE_VERSION_1_0)) {
failWithLocalName("runtime.parser.invalidVersionNumber",
reader, version);
}
while (XMLStreamReaderUtil.nextElementContent(reader) !=
XMLStreamConstants.END_ELEMENT) if (reader.getName().equals(QNAME_ENDPOINT)) {
attrs = XMLStreamReaderUtil.getAttributes(reader);
String name = getMandatoryNonEmptyAttribute(reader, attrs, ATTR_NAME);
if (!names.add(name)) {
logger.warning(
WsservletMessages.SERVLET_WARNING_DUPLICATE_ENDPOINT_NAME(/*name*/));
}
String implementationName =
getMandatoryNonEmptyAttribute(reader, attrs, ATTR_IMPLEMENTATION);
Class<?> implementorClass = getImplementorClass(implementationName,reader);
EndpointFactory.verifyImplementorClass(implementorClass);
SDDocumentSource primaryWSDL = getPrimaryWSDL(reader, attrs, implementorClass);
QName serviceName = getQNameAttribute(attrs, ATTR_SERVICE);
if (serviceName == null)
serviceName = EndpointFactory.getDefaultServiceName(implementorClass);
QName portName = getQNameAttribute(attrs, ATTR_PORT);
if (portName == null)
portName = EndpointFactory.getDefaultPortName(serviceName, implementorClass);
//get enable-mtom attribute value
String enable_mtom = getAttribute(attrs, ATTR_ENABLE_MTOM);
String mtomThreshold = getAttribute(attrs, ATTR_MTOM_THRESHOLD_VALUE);
String bindingId = getAttribute(attrs, ATTR_BINDING);
if (bindingId != null)
// Convert short-form tokens to API's binding ids
bindingId = getBindingIdForToken(bindingId);
WSBinding binding = createBinding(bindingId,implementorClass,
enable_mtom,mtomThreshold);
String urlPattern =
getMandatoryNonEmptyAttribute(reader, attrs, ATTR_URL_PATTERN);
// TODO use 'docs' as the metadata. If wsdl is non-null it's the primary.
boolean handlersSetInDD = setHandlersAndRoles(binding, reader, serviceName, portName);
ensureNoContent(reader);
WSEndpoint<?> endpoint = WSEndpoint.create(
implementorClass, !handlersSetInDD,
null,
serviceName, portName, container, binding,
primaryWSDL, docs.values(), createEntityResolver(),false
);
adapters.add(adapterFactory.createAdapter(name, urlPattern, endpoint));
} else {
failWithLocalName("runtime.parser.invalidElement", reader);
}
return adapters;
}
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:69,代码来源:DeploymentDescriptorParser.java
注:本文中的com.sun.xml.internal.ws.server.EndpointFactory类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论