Grails-Plugin-Consortium / grails-cxf

CXF Plugin for the Grails web framework
http://grails.org/plugin/cxf
38 stars 46 forks source link

Grails 2.3.7 null pointer exception with using bean #38

Closed Manas101 closed 10 years ago

Manas101 commented 10 years ago

Hello, I have a problem with correct settings (propably) of cxf-client 1.6.0. My config.groovy: // cxf config cxf { client { authLdService { wsdl = "docs/wsdl/auth.wsdl" namespace = "cxf.client.ld.auth" outputDir = "src/java" clientInterface = cxf.client.ld.auth.AuthService serviceEndpointAddress = "${service.ld.url}/services/Auth" } } }

Wsdl2java script executed successfully (java classes were generated). But when I want to test a service:

class LdAuthService {

AuthService authLdService

def loginUser(String userName, String password) {
    def sid

    try {
        sid = authLdService.login(userName, password)
        return sid

    } catch (Exception e) {
        e.printStackTrace()
        throw new RuntimeException('login to LD failed')
    }
}

}

I always got a null pointer exception (at use authLdService in controller). I supposed that authLdService should be wired automatically.... What do I wrong?

Thanks a lot.