sclz.setClassJavaDoc(jaxwsBinding.getClassJavaDoc());
model.addServiceClass(name, sclz);
}
private JavaPort processPort(JavaModel model, EndpointInfo port) throws ToolException {
JavaPort jport = new JavaPort(NameUtil.mangleNameToClassName(port.getName().getLocalPart()));
jport.setPortName(port.getName().getLocalPart());
BindingInfo binding = port.getBinding();
jport.setBindingAdress(port.getAddress());
jport.setBindingName(binding.getName().getLocalPart());
String namespace = binding.getInterface().getName().getNamespaceURI();
String packageName = ProcessorUtil.parsePackageName(namespace, context.mapPackageName(namespace));
jport.setPackageName(packageName);
InterfaceInfo infInfo = binding.getInterface();
String portType = binding.getInterface().getName().getLocalPart();
jport.setPortType(portType);
JAXWSBinding infBinding = infInfo.getExtensor(JAXWSBinding.class);
if (infBinding != null) {
if (infBinding.getJaxwsClass() != null
&& !StringUtils.isEmpty(infBinding.getJaxwsClass().getClassName())) {
jport.setPortType(infBinding.getJaxwsClass().getClassName());
jaxwsBinding.setClassJavaDoc(infBinding.getJaxwsClass().getComments());
}
if (!infBinding.isEnableAsyncMapping()) {
jaxwsBinding.setEnableAsyncMapping(false);
}
if (!infBinding.isEnableWrapperStyle()) {
jaxwsBinding.setEnableWrapperStyle(false);
}
if (infBinding.getPackage() != null) {
jaxwsBinding.setPackage(infBinding.getPackage());
}
if (!infBinding.getPackageJavaDoc().equals("")) {
jaxwsBinding.setPackageJavaDoc(infBinding.getPackageJavaDoc());
}
}
if (jaxwsBinding.getPackage() != null) {
jport.setPackageName(jaxwsBinding.getPackage());
}
if (infBinding != null && infBinding.getJaxwsClass() != null
&& infBinding.getJaxwsClass().getClassName() != null) {
String className = NameUtil.mangleNameToClassName(infBinding.getJaxwsClass().getClassName());
jport.setInterfaceClass(className);
} else {
jport.setInterfaceClass(NameUtil.mangleNameToClassName(portType));
}
bindingType = getBindingType(binding);
if (bindingType == null) {
org.apache.cxf.common.i18n.Message msg =
new org.apache.cxf.common.i18n.Message("BINDING_SPECIFY_ONE_PROTOCOL",
LOG,
binding.getName());
throw new ToolException(msg);
}
if (isSoapBinding()) {
SoapBinding spbd = SOAPBindingUtil.getProxy(SoapBinding.class, this.bindingObj);
jport.setStyle(SOAPBindingUtil.getSoapStyle(spbd.getStyle()));
jport.setTransURI(spbd.getTransportURI());
}
Collection<BindingOperationInfo> operations = binding.getOperations();
for (BindingOperationInfo bop : operations) {
processOperation(model, bop, binding);