Search in sources :

Example 6 with JaxWsImplementorInfo

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"));
    }
}
Also used : Bus(org.apache.cxf.Bus) JaxWsImplementorInfo(org.apache.cxf.jaxws.support.JaxWsImplementorInfo) JaxWsServiceFactoryBean(org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean) ReflectionServiceFactoryBean(org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean) Test(org.junit.Test)

Example 7 with JaxWsImplementorInfo

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);
    }
}
Also used : JaxWsImplementorInfo(org.apache.cxf.jaxws.support.JaxWsImplementorInfo) JaxWsServiceFactoryBean(org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean)

Example 8 with JaxWsImplementorInfo

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();
}
Also used : JaxWsImplementorInfo(org.apache.cxf.jaxws.support.JaxWsImplementorInfo) URI(java.net.URI) File(java.io.File)

Aggregations

JaxWsImplementorInfo (org.apache.cxf.jaxws.support.JaxWsImplementorInfo)8 JaxWsServiceFactoryBean (org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean)6 Bus (org.apache.cxf.Bus)3 Service (org.apache.cxf.service.Service)3 InterfaceInfo (org.apache.cxf.service.model.InterfaceInfo)3 ServerImpl (org.apache.cxf.endpoint.ServerImpl)2 BindingInfo (org.apache.cxf.service.model.BindingInfo)2 ReflectionServiceFactoryBean (org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean)2 Test (org.junit.Test)2 File (java.io.File)1 URI (java.net.URI)1 URL (java.net.URL)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 WebService (javax.jws.WebService)1 JAXBContext (javax.xml.bind.JAXBContext)1 Marshaller (javax.xml.bind.Marshaller)1 QName (javax.xml.namespace.QName)1 Binding (org.apache.cxf.binding.Binding)1 SoapBinding (org.apache.cxf.binding.soap.SoapBinding)1