factoryBean.setEndpointName(new QName(getEndpointNamespace(), getEndpointLocalName()));
}
return ((ClientProxy)Proxy.getInvocationHandler(factoryBean.create())).getClient();
} else {
ClientFactoryBean factoryBean = createClientFactoryBean();
// configure client factory bean by CXF configurer
configure(factoryBean);
// setup client factory bean
setupClientFactoryBean(factoryBean);
// fill in values that have not been filled.
QName serviceQName = null;
try {
serviceQName = factoryBean.getServiceName();
} catch (IllegalStateException e) {
// It throws IllegalStateException if serviceName has not been set.
}
if (serviceQName == null && getServiceLocalName() != null) {
factoryBean.setServiceName(new QName(getServiceNamespace(), getServiceLocalName()));
}
if (factoryBean.getEndpointName() == null && getEndpointLocalName() != null) {
factoryBean.setEndpointName(new QName(getEndpointNamespace(), getEndpointLocalName()));
}
checkName(factoryBean.getEndpointName(), "endpoint/port name");
checkName(factoryBean.getServiceName(), "service name");
return (Client)factoryBean.create();
}
}