use of org.apache.cxf.jaxws.support.JaxWsImplementorInfo in project cxf by apache.
the class CodeFirstWSDLTest method testExcludeOnInterface.
@Test
public void testExcludeOnInterface() throws Exception {
try {
JaxWsImplementorInfo info = new JaxWsImplementorInfo(HelloExcludeImpl.class);
ReflectionServiceFactoryBean bean = new JaxWsServiceFactoryBean(info);
Bus bus = getBus();
bean.setBus(bus);
bean.create();
fail("WebMethod(exclude=true) is not allowed");
} catch (JaxWsConfigurationException e) {
assertTrue(e.getMessage().contains("WebMethod"));
}
}
use of org.apache.cxf.jaxws.support.JaxWsImplementorInfo in project cxf by apache.
the class JaxWsClientFactoryBean method setServiceClass.
public void setServiceClass(Class<?> serviceClass) {
super.setServiceClass(serviceClass);
if (((JaxWsServiceFactoryBean) getServiceFactory()).getJaxWsImplementorInfo() == null) {
JaxWsImplementorInfo implInfo = new JaxWsImplementorInfo(serviceClass);
((JaxWsServiceFactoryBean) getServiceFactory()).setJaxWsImplementorInfo(implInfo);
}
}
use of org.apache.cxf.jaxws.support.JaxWsImplementorInfo in project cxf by apache.
the class JaxwsServiceBuilder method getOutputFile.
public File getOutputFile() {
JaxWsImplementorInfo jaxwsImpl = serviceFactory.getJaxWsImplementorInfo();
String wsdlLocation = jaxwsImpl.getWsdlLocation();
if (!StringUtils.isEmpty(wsdlLocation)) {
try {
URI uri = new URI(wsdlLocation);
if ("file".equals(uri.getScheme()) || StringUtils.isEmpty(uri.getScheme())) {
File f = new File(uri);
if (f.exists()) {
return f;
}
}
} catch (Exception e) {
// ignore
}
File f = new File(wsdlLocation);
if (f.exists()) {
return f;
}
}
return super.getOutputFile();
}
Aggregations