本文整理汇总了Java中com.sun.xml.internal.ws.model.RuntimeModeler类的典型用法代码示例。如果您正苦于以下问题:Java RuntimeModeler类的具体用法?Java RuntimeModeler怎么用?Java RuntimeModeler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RuntimeModeler类属于com.sun.xml.internal.ws.model包,在下文中一共展示了RuntimeModeler类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getPort
import com.sun.xml.internal.ws.model.RuntimeModeler; //导入依赖的package包/类
@Override
public <T> T getPort(Class<T> portInterface, WebServiceFeature... features) {
//get the portType from SEI
QName portTypeName = RuntimeModeler.getPortTypeName(portInterface, getMetadadaReader(new WebServiceFeatureList(features), portInterface.getClassLoader()));
WSDLService tmpWsdlService = this.wsdlService;
if (tmpWsdlService == null) {
// assigning it to local variable and not setting it back to this.wsdlService intentionally
// as we don't want to include the service instance with information gathered from sei
tmpWsdlService = getWSDLModelfromSEI(portInterface);
//still null? throw error need wsdl metadata to create a proxy
if(tmpWsdlService == null) {
throw new WebServiceException(ProviderApiMessages.NO_WSDL_NO_PORT(portInterface.getName()));
}
}
//get the first port corresponding to the SEI
WSDLPort port = tmpWsdlService.getMatchingPort(portTypeName);
if (port == null) {
throw new WebServiceException(ClientMessages.UNDEFINED_PORT_TYPE(portTypeName));
}
QName portName = port.getName();
return getPort(portName, portInterface,features);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:23,代码来源:WSServiceDelegate.java
示例2: getPort
import com.sun.xml.internal.ws.model.RuntimeModeler; //导入依赖的package包/类
public <T> T getPort(Class<T> portInterface, WebServiceFeature... features) {
//get the portType from SEI
QName portTypeName = RuntimeModeler.getPortTypeName(portInterface);
WSDLServiceImpl wsdlService = this.wsdlService;
if(wsdlService == null) {
// assigning it to local variable and not setting it back to this.wsdlService intentionally
// as we don't want to include the service instance with information gathered from sei
wsdlService = getWSDLModelfromSEI(portInterface);
//still null? throw error need wsdl metadata to create a proxy
if(wsdlService == null) {
throw new WebServiceException(ProviderApiMessages.NO_WSDL_NO_PORT(portInterface.getName()));
}
}
//get the first port corresponding to the SEI
WSDLPortImpl port = wsdlService.getMatchingPort(portTypeName);
if (port == null)
throw new WebServiceException(ClientMessages.UNDEFINED_PORT_TYPE(portTypeName));
QName portName = port.getName();
return getPort(portName, portInterface,features);
}
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:21,代码来源:WSServiceDelegate.java
示例3: DatabindingImpl
import com.sun.xml.internal.ws.model.RuntimeModeler; //导入依赖的package包/类
public DatabindingImpl(DatabindingProviderImpl p, DatabindingConfig config) {
RuntimeModeler modeler = new RuntimeModeler(config);
modeler.setClassLoader(config.getClassLoader());
seiModel = modeler.buildRuntimeModel();
WSDLPort wsdlport = config.getWsdlPort();
packetFactory = new MessageContextFactory(seiModel.getWSBinding().getFeatures());
clientConfig = isClientConfig(config);
if (clientConfig) {
initStubHandlers();
}
seiModel.setDatabinding(this);
if (wsdlport != null) {
freeze(wsdlport);
}
if (operationDispatcher == null) {
operationDispatcherNoWsdl = new OperationDispatcher(null, seiModel.getWSBinding(), seiModel);
}
// if(!clientConfig) {
for (JavaMethodImpl jm : seiModel.getJavaMethods()) {
if (!jm.isAsync()) {
TieHandler th = new TieHandler(jm, seiModel.getWSBinding(), packetFactory);
wsdlOpMap.put(jm, th);
tieHandlers.put(th.getMethod(), th);
}
}
// }
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:28,代码来源:DatabindingImpl.java
示例4: preProcessWebService
import com.sun.xml.internal.ws.model.RuntimeModeler; //导入依赖的package包/类
protected void preProcessWebService(WebService webService, TypeElement element) {
processedMethods = new HashSet<String>();
seiContext = context.getSeiContext(element);
String targetNamespace = null;
if (webService != null)
targetNamespace = webService.targetNamespace();
PackageElement packageElement = builder.getProcessingEnvironment().getElementUtils().getPackageOf(element);
if (targetNamespace == null || targetNamespace.length() == 0) {
String packageName = packageElement.getQualifiedName().toString();
if (packageName == null || packageName.length() == 0) {
builder.processError(WebserviceapMessages.WEBSERVICEAP_NO_PACKAGE_CLASS_MUST_HAVE_TARGETNAMESPACE(
element.getQualifiedName()), element);
}
targetNamespace = RuntimeModeler.getNamespace(packageName);
}
seiContext.setNamespaceUri(targetNamespace);
if (serviceImplName == null)
serviceImplName = seiContext.getSeiImplName();
if (serviceImplName != null) {
seiContext.setSeiImplName(serviceImplName);
context.addSeiContext(serviceImplName, seiContext);
}
portName = ClassNameInfo.getName(element.getSimpleName().toString().replace('$', '_'));
packageName = packageElement.getQualifiedName();
portName = webService != null && webService.name() != null && webService.name().length() > 0 ?
webService.name() : portName;
serviceName = ClassNameInfo.getName(element.getQualifiedName().toString()) + WebServiceConstants.SERVICE.getValue();
serviceName = webService != null && webService.serviceName() != null && webService.serviceName().length() > 0 ?
webService.serviceName() : serviceName;
wsdlNamespace = seiContext.getNamespaceUri();
typeNamespace = wsdlNamespace;
SOAPBinding soapBinding = element.getAnnotation(SOAPBinding.class);
if (soapBinding != null) {
pushedSoapBinding = pushSoapBinding(soapBinding, element, element);
} else if (element.equals(typeElement)) {
pushedSoapBinding = pushSoapBinding(new MySoapBinding(), element, element);
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:40,代码来源:WebServiceVisitor.java
示例5: DatabindingImpl
import com.sun.xml.internal.ws.model.RuntimeModeler; //导入依赖的package包/类
public DatabindingImpl(DatabindingProviderImpl p, DatabindingConfig config) {
RuntimeModeler modeler = new RuntimeModeler(config);
modeler.setClassLoader(config.getClassLoader());
seiModel = modeler.buildRuntimeModel();
WSDLPort wsdlport = config.getWsdlPort();
Object facProp = config.properties().get("com.sun.xml.internal.ws.api.message.MessageContextFactory");
packetFactory = (facProp != null && facProp instanceof MessageContextFactory)? (MessageContextFactory)facProp :
new MessageContextFactory(seiModel.getWSBinding().getFeatures());
clientConfig = isClientConfig(config);
if (clientConfig) {
initStubHandlers();
}
seiModel.setDatabinding(this);
if (wsdlport != null) {
freeze(wsdlport);
}
if (operationDispatcher == null) {
operationDispatcherNoWsdl = new OperationDispatcher(null, seiModel.getWSBinding(), seiModel);
}
// if(!clientConfig) {
for (JavaMethodImpl jm : seiModel.getJavaMethods()) {
if (!jm.isAsync()) {
TieHandler th = new TieHandler(jm, seiModel.getWSBinding(), packetFactory);
wsdlOpMap.put(jm, th);
tieHandlers.put(th.getMethod(), th);
}
}
// }
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:30,代码来源:DatabindingImpl.java
示例6: createSEIPortInfo
import com.sun.xml.internal.ws.model.RuntimeModeler; //导入依赖的package包/类
private SEIPortInfo createSEIPortInfo(QName portName, Class portInterface, WebServiceFeature... features) {
WSDLPortImpl wsdlPort = getPortModel(wsdlService, portName);
RuntimeModeler modeler = new RuntimeModeler(portInterface, serviceName, wsdlPort, features);
modeler.setClassLoader(portInterface.getClassLoader());
modeler.setPortName(portName);
AbstractSEIModelImpl model = modeler.buildRuntimeModel();
return new SEIPortInfo(this, portInterface, (SOAPSEIModel) model, wsdlPort);
}
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:9,代码来源:WSServiceDelegate.java
示例7: getNamespace
import com.sun.xml.internal.ws.model.RuntimeModeler; //导入依赖的package包/类
protected String getNamespace(PackageElement packageElement) {
return RuntimeModeler.getNamespace(packageElement.getQualifiedName().toString());
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:4,代码来源:WebServiceVisitor.java
示例8: getNamespace
import com.sun.xml.internal.ws.model.RuntimeModeler; //导入依赖的package包/类
protected String getNamespace(PackageDeclaration packageDecl) {
return RuntimeModeler.getNamespace(packageDecl.getQualifiedName());
}
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:4,代码来源:WebServiceVisitor.java
注:本文中的com.sun.xml.internal.ws.model.RuntimeModeler类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论