void processClass(Class clazz) {
WebService webService = getPrivClassAnnotation(clazz, WebService.class);
String portTypeLocalName = clazz.getSimpleName();
if (webService.name().length() >0)
portTypeLocalName = webService.name();
targetNamespace = webService.targetNamespace();
packageName = "";
if (clazz.getPackage() != null)
packageName = clazz.getPackage().getName();
if (targetNamespace.length() == 0) {
targetNamespace = getNamespace(packageName);
}
model.setTargetNamespace(targetNamespace);
QName portTypeName = new QName(targetNamespace, portTypeLocalName);
model.setPortTypeName(portTypeName);
model.setWSDLLocation(webService.wsdlLocation());
SOAPBinding soapBinding = getPrivClassAnnotation(clazz, SOAPBinding.class);
if (soapBinding != null) {
if (soapBinding.style() == SOAPBinding.Style.RPC && soapBinding.parameterStyle() == SOAPBinding.ParameterStyle.BARE) {
throw new RuntimeModelerException("runtime.modeler.invalid.soapbinding.parameterstyle",
soapBinding, clazz);
}
isWrapped = soapBinding.parameterStyle()== WRAPPED;
}
defaultBinding = createBinding(soapBinding);
/*
* if clazz != portClass then there is an SEI. If there is an
* SEI, then all methods should be processed. However, if there is
* no SEI, and the implementation class uses at least one
* WebMethod annotation, then only methods with this annotation
* will be processed.
*/
/* if (clazz == portClass) {
WebMethod webMethod;
for (Method method : clazz.getMethods()) {
webMethod = getPrivMethodAnnotation(method, WebMethod.class);
if (webMethod != null &&
!webMethod.exclude()) {
usesWebMethod = true;
break;
}
}
}*/
for (Method method : clazz.getMethods()) {
if (!clazz.isInterface()) { // if clazz is SEI, then all methods are web methods
if (!isWebMethodBySpec(method, clazz)) {
continue;
}
}
// TODO: binding can be null. We need to figure out how to post-process
// RuntimeModel to link to WSDLModel
processMethod(method);
}
//Add additional jaxb classes referenced by {@link XmlSeeAlso}
XmlSeeAlso xmlSeeAlso = getPrivClassAnnotation(clazz, XmlSeeAlso.class);
if(xmlSeeAlso != null)
model.addAdditionalClasses(xmlSeeAlso.value());
}
RuntimeModeler.java 文件源码
java
阅读 27
收藏 0
点赞 0
评论 0
项目:openjdk-icedtea7
作者:
评论列表
文章目录