-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin conflicts with grails-cxf? #36
Comments
tested with grails 2.2.1 and https://github.com/Grails-Plugin-Consortium/grails-cxf-client-demo and they work fine together. Trying 2.3.0 now with that project. |
The demo project also works find with grails 2.3.0. You can clone that here. https://github.com/Grails-Plugin-Consortium/grails-cxf-client-demo/tree/grails-2.3.0 I will need more info to help debug. It could be in your config or some other conflicting plugins?? |
(I'm working on the same project as the OP) @GrailsCxfEndpoint(expose=EndpointType.SIMPLE)
class MyService {
...
} works fine. @GrailsCxfEndpoint(expose=EndpointType.SIMPLE)
class MyService {
def endpointBeanWasSetupByCxfClientPluginInConfigDotGroovy
...
} does not. |
I am not sure I ever tested this. I would guess it has to do with the order of bean wiring or the cxf proxy class. Can you wrap the cxf client in a grails service and call the FooService class that will in turn call the endpointbean class? |
Hi ctoestreich, class FooService{
def cxfClientEndpoint
public String someMethod(){
...
}
}
@GrailsCxfEndpoint(expose=EndpointType.SIMPLE)
class MyService {
def fooService
public String exposedMethod(){
return fooService.someMethod()
}
} This is actually our setup, but unfortunately doesn't work. It did however work with grails 1.3.7 |
I found a workaround for the problem: cxf{
client {
targetServiceEndpoint {
...
}
}
@GrailsCxfEndpoint(expose=EndpointType.SIMPLE)
class MyService{
def grailsApplication
MyEndpoint myEndpoint
private MyEndpoint getEndpoint(){
if(myEndpoint==null){
myEndpoint = grailsApplication.getMainContext().getBean("targetServiceEndpoint")
}
return myEndpoint
}
public String exposedMethod(){
return getEndpoint().someMethod()
}
} Not pretty, but works. I don't know enough about the Spring internals to make a prettier solution though. |
Had a similar problem. I have a cxf service that works fine when using cxf plugin alone. In that application i also need to consume an external service. After i add cxf-client and generate the stubs using wsdl2java, i get no service found error when trying to list services. Saw similar errors, one suggested modifying the cxf-client plugin WebServiceClientFactoryImpl class. Bus bus = Holders.grailsApplication.mainContext.getBean("cxf") as Bus (http://stackoverflow.com/questions/26470223/cant-get-cxf-and-cxf-client-to-work-at-the-same-time-grails). I tried with no luck. Grails version 2.4.5 and cxf client version 2.1.1 |
Hi all,
We try to use both grails-cxf-client for endpoints and grails-cxf for exposing simple services.
They both work independently (only configurating one), but not together - why? No error messages are thrown, nothing what so ever.
We are running with grails 2.3.0RC1. Everything newest version.:
runtime ":cxf:1.1.1"
compile ":cxf-client:1.5.6"
Can anyone help? What are we doing wrong? We even tried a whole new "hello world"-grails project, and still doesn't work.
Jon.
The text was updated successfully, but these errors were encountered: