Quantcast

Consume web service in Grails app

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Consume web service in Grails app

Tommie
Hi,
in my Grails evaluation project I am now fighting web services support in Grails. Following what I found in the net I tries to use GroovyWS (0.5.1) together with the CXF plugin (0.5.1) - my Grails version is 1.2.1.
However I seem to be trapped in the kind of jar incompatibility situation that some others have reported in the web as well:

java.lang.LinkageError: loader constraint violation: when resolving interface method "org.w3c.dom.Node.setUserData(Ljava/lang/String;Ljava/lang/Object;Lorg/w3c/dom/UserDataHandler;)Ljava/lang/Object;" the class loader (instance of org/codehaus/groovy/grails/cli/support/GrailsRootLoader) of the current class, org/apache/cxf/staxutils/StaxUtils, and the class loader (instance of <bootloader>) for resolved class, org/w3c/dom/Node, have different Class objects for the type org/w3c/dom/UserDataHandler used in the signature

Any idea how a working configuration could look like?

Thanks
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Consume web service in Grails app

ld@ldaley.com
I had similar problems with HTMLUnit.

Here's a BuildConfig.groovy that pulls in HTMLUnit but excludes certain dependencies to avoid these issues. This may not be exactly the same issue as what you are experiencing of course.

http://code.google.com/p/spock/source/browse/trunk/spock-grails/grails-app/conf/BuildConfig.groovy

On 09/03/2010, at 5:25 AM, Tommie wrote:

> Hi,
> in my Grails evaluation project I am now fighting web services support in Grails. Following what I found in the net I tries to use GroovyWS (0.5.1) together with the CXF plugin (0.5.1) - my Grails version is 1.2.1.
> However I seem to be trapped in the kind of jar incompatibility situation that some others have reported in the web as well:
>
> java.lang.LinkageError: loader constraint violation: when resolving interface method "org.w3c.dom.Node.setUserData(Ljava/lang/String;Ljava/lang/Object;Lorg/w3c/dom/UserDataHandler;)Ljava/lang/Object;" the class loader (instance of org/codehaus/groovy/grails/cli/support/GrailsRootLoader) of the current class, org/apache/cxf/staxutils/StaxUtils, and the class loader (instance of <bootloader>) for resolved class, org/w3c/dom/Node, have different Class objects for the type org/w3c/dom/UserDataHandler used in the signature
>
> Any idea how a working configuration could look like?
>
> Thanks


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Consume web service in Grails app

icorn
This post has NOT been accepted by the mailing list yet.
In reply to this post by Tommie
Hi Tommie,

I have the same problem. Did you find a solution?

Thanks,
Oliver
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Consume web service in Grails app

Stiffler07
Hi There,

I got the same problem by consuming a webservice with groovyws. That's the stacktrace:

ERROR errors.GrailsExceptionResolver  - Exception occurred when processing request: [POST] /WSTS/webService/operationCall - parameters:
to: Fahrenheit
submit: Convert
value: 10.0
from: Fahrenheit
Stacktrace follows:
org.codehaus.groovy.grails.web.servlet.mvc.exceptions.ControllerExecutionException: Executing action [operationCall] of controller [wsts.WebServiceController]  caused exception: java.lang.LinkageError: loader constraint violation: when resolving interface method "org.w3c.dom.Node.setUserData(Ljava/lang/String;Ljava/lang/Object;Lorg/w3c/dom/UserDataHandler;)Ljava/lang/Object;" the class loader (instance of org/codehaus/groovy/grails/cli/support/GrailsRootLoader) of the current class, org/apache/cxf/staxutils/StaxUtils, and the class loader (instance of <bootloader>) for resolved class, org/w3c/dom/Node, have different Class objects for the type org/w3c/dom/UserDataHandler used in the signature
        at java.lang.Thread.run(Thread.java:662)
Caused by: org.codehaus.groovy.runtime.InvokerInvocationException: java.lang.LinkageError: loader constraint violation: when resolving interface method "org.w3c.dom.Node.setUserData(Ljava/lang/String;Ljava/lang/Object;Lorg/w3c/dom/UserDataHandler;)Ljava/lang/Object;" the class loader (instance of org/codehaus/groovy/grails/cli/support/GrailsRootLoader) of the current class, org/apache/cxf/staxutils/StaxUtils, and the class loader (instance of <bootloader>) for resolved class, org/w3c/dom/Node, have different Class objects for the type org/w3c/dom/UserDataHandler used in the signature
        ... 1 more
Caused by: java.lang.LinkageError: loader constraint violation: when resolving interface method "org.w3c.dom.Node.setUserData(Ljava/lang/String;Ljava/lang/Object;Lorg/w3c/dom/UserDataHandler;)Ljava/lang/Object;" the class loader (instance of org/codehaus/groovy/grails/cli/support/GrailsRootLoader) of the current class, org/apache/cxf/staxutils/StaxUtils, and the class loader (instance of <bootloader>) for resolved class, org/w3c/dom/Node, have different Class objects for the type org/w3c/dom/UserDataHandler used in the signature
        at org.apache.cxf.staxutils.StaxUtils.addLocation(StaxUtils.java:941)
        at org.apache.cxf.staxutils.StaxUtils.startElement(StaxUtils.java:799)
        at org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:868)
        at org.apache.cxf.staxutils.StaxUtils.read(StaxUtils.java:755)
        at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:217)
        at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:161)
        at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:67)
        at org.apache.cxf.endpoint.ClientImpl.<init>(ClientImpl.java:148)
        at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:253)
        at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:196)
        at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:175)
        at groovyx.net.ws.AbstractCXFWSClient.createClient(AbstractCXFWSClient.java:229)
        at groovyx.net.ws.WSClient.initialize(WSClient.java:108)
        at groovyx.net.ws.IWSClient$initialize.call(Unknown Source)
        at wsts.WebServiceController$_closure4.doCall(WebServiceController.groovy:31)
        at wsts.WebServiceController$_closure4.doCall(WebServiceController.groovy)
        ... 1 more


And that's the code in my controller which produce it:

    def operationCall = {
        WSClient proxy = new WSClient("http://www.w3schools.com/webservices/tempconvert.asmx?WSDL", this.class.classLoader)
        proxy.initialize()

        def message

        if (!params?.value || params.from.equals(params.to)) {
            message = "Units are probably the same. Don't aske me :)"
        } else {
            def result
            if ("Celsius".equals(params.from)) {
                result = proxy.CelsiusToFahrenheit(params.value)
            } else {
                result = proxy.FahrenheitToCelsius(params.value)
            }
            message = "${params.value} degrees ${params.from} are ${result} degrees ${params.to}"
        }

        flash.message = message
    }


my BuildConfig.groovy looks like:

grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
//grails.project.war.file = "target/${appName}-${appVersion}.war"
grails.project.dependency.resolution = {
    // inherit Grails' default dependencies
    inherits("global") {
        // uncomment to disable ehcache
        // excludes 'ehcache'
    }
    log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
    repositories {
        grailsPlugins()
        grailsHome()
        grailsCentral()

        // uncomment the below to enable remote dependency resolution
        // from public Maven repositories
        //mavenLocal()
        mavenCentral()
        //mavenRepo "http://snapshots.repository.codehaus.org"
        mavenRepo "http://repository.codehaus.org"
        //mavenRepo "http://download.java.net/maven/2/"
        //mavenRepo "http://repository.jboss.com/maven2/"
    }
    dependencies {
        // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg.

        runtime ('mysql:mysql-connector-java:5.1.16')
        runtime ('org.codehaus.groovy.modules:groovyws:0.5.2') {
      excludes 'jaxen'
        excludes 'xmlbeans'
        excludes 'xalan'
        excludes 'xml-apis'
                excludes 'xercesImpl'
                excludes 'xmlParserAPIs'
                excludes 'geronimo-servlet_2.5_spec'
    }
    }

    plugins {
        runtime("org.grails.plugins:cxf:0.5.1") {
                excludes 'jaxen',
                         'xmlbeans'
        }
    }
}


I think there is a problem with duplicate classes in my classpath and i tried a lot to resolve the problem, but nothing works. Any ideas?

regards

Stephan
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Consume web service in Grails app

rlovtangen
Yes, GroovyWS pulls in a few dependencies that conflicts with classes already in Java 6.
This is my excludes list:

            compile("org.codehaus.groovy.modules:groovyws:0.5.2") {
                    excludes 'geronimo-servlet_2.5_spec', 'servlet-api', 'jaxb-xjc', 'jaxb-impl', 'xml-apis', 'saaj-impl', 'junit', 'slf4j-jdk14', 'xmlParserAPIs', 'jaxb-api', 'saaj-api', 'xmlbeans', 'jaxen', 'geronimo-stax-api_1.0_spec', 'geronimo-activation_1.0.2_spec', 'abdera-client', 'geronimo-activation_1.1_spec'
            }

Ronny

On May 5, 2011, at 10:16 PM, Stiffler07 wrote:

> Hi There,
>
> I got the same problem by consuming a webservice with groovyws. That's the
> stacktrace:
>
> ERROR errors.GrailsExceptionResolver  - Exception occurred when processing
> request: [POST] /WSTS/webService/operationCall - parameters:
> to: Fahrenheit
> submit: Convert
> value: 10.0
> from: Fahrenheit
> Stacktrace follows:
> org.codehaus.groovy.grails.web.servlet.mvc.exceptions.ControllerExecutionException:
> Executing action [operationCall] of controller [wsts.WebServiceController]
> caused exception: java.lang.LinkageError: loader constraint violation: when
> resolving interface method
> "org.w3c.dom.Node.setUserData(Ljava/lang/String;Ljava/lang/Object;Lorg/w3c/dom/UserDataHandler;)Ljava/lang/Object;"
> the class loader (instance of
> org/codehaus/groovy/grails/cli/support/GrailsRootLoader) of the current
> class, org/apache/cxf/staxutils/StaxUtils, and the class loader (instance of
> <bootloader>) for resolved class, org/w3c/dom/Node, have different Class
> objects for the type org/w3c/dom/UserDataHandler used in the signature
> at java.lang.Thread.run(Thread.java:662)
> Caused by: org.codehaus.groovy.runtime.InvokerInvocationException:
> java.lang.LinkageError: loader constraint violation: when resolving
> interface method
> "org.w3c.dom.Node.setUserData(Ljava/lang/String;Ljava/lang/Object;Lorg/w3c/dom/UserDataHandler;)Ljava/lang/Object;"
> the class loader (instance of
> org/codehaus/groovy/grails/cli/support/GrailsRootLoader) of the current
> class, org/apache/cxf/staxutils/StaxUtils, and the class loader (instance of
> <bootloader>) for resolved class, org/w3c/dom/Node, have different Class
> objects for the type org/w3c/dom/UserDataHandler used in the signature
> ... 1 more
> Caused by: java.lang.LinkageError: loader constraint violation: when
> resolving interface method
> "org.w3c.dom.Node.setUserData(Ljava/lang/String;Ljava/lang/Object;Lorg/w3c/dom/UserDataHandler;)Ljava/lang/Object;"
> the class loader (instance of
> org/codehaus/groovy/grails/cli/support/GrailsRootLoader) of the current
> class, org/apache/cxf/staxutils/StaxUtils, and the class loader (instance of
> <bootloader>) for resolved class, org/w3c/dom/Node, have different Class
> objects for the type org/w3c/dom/UserDataHandler used in the signature
> at org.apache.cxf.staxutils.StaxUtils.addLocation(StaxUtils.java:941)
> at org.apache.cxf.staxutils.StaxUtils.startElement(StaxUtils.java:799)
> at org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:868)
> at org.apache.cxf.staxutils.StaxUtils.read(StaxUtils.java:755)
> at
> org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:217)
> at
> org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:161)
> at
> org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:67)
> at org.apache.cxf.endpoint.ClientImpl.<init>(ClientImpl.java:148)
> at
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:253)
> at
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:196)
> at
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:175)
> at
> groovyx.net.ws.AbstractCXFWSClient.createClient(AbstractCXFWSClient.java:229)
> at groovyx.net.ws.WSClient.initialize(WSClient.java:108)
> at groovyx.net.ws.IWSClient$initialize.call(Unknown Source)
> at
> wsts.WebServiceController$_closure4.doCall(WebServiceController.groovy:31)
> at wsts.WebServiceController$_closure4.doCall(WebServiceController.groovy)
> ... 1 more
>
>
> And that's the code in my controller which produce it:
>
>    def operationCall = {
> WSClient proxy = new
> WSClient("http://www.w3schools.com/webservices/tempconvert.asmx?WSDL",
> this.class.classLoader)
>        proxy.initialize()
>
>        def message
>
>        if (!params?.value || params.from.equals(params.to)) {
>            message = "Units are probably the same. Don't aske me :)"
>        } else {
>            def result
>            if ("Celsius".equals(params.from)) {
>                result = proxy.CelsiusToFahrenheit(params.value)
>            } else {
>                result = proxy.FahrenheitToCelsius(params.value)
>            }
>            message = "${params.value} degrees ${params.from} are ${result}
> degrees ${params.to}"
>        }
>
>        flash.message = message
>    }
>
>
> my BuildConfig.groovy looks like:
>
> grails.project.class.dir = "target/classes"
> grails.project.test.class.dir = "target/test-classes"
> grails.project.test.reports.dir = "target/test-reports"
> //grails.project.war.file = "target/${appName}-${appVersion}.war"
> grails.project.dependency.resolution = {
>    // inherit Grails' default dependencies
>    inherits("global") {
>        // uncomment to disable ehcache
>        // excludes 'ehcache'
>    }
>    log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info',
> 'debug' or 'verbose'
>    repositories {
>        grailsPlugins()
>        grailsHome()
>        grailsCentral()
>
>        // uncomment the below to enable remote dependency resolution
>        // from public Maven repositories
>        //mavenLocal()
>        mavenCentral()
>        //mavenRepo "http://snapshots.repository.codehaus.org"
>        mavenRepo "http://repository.codehaus.org"
>        //mavenRepo "http://download.java.net/maven/2/"
>        //mavenRepo "http://repository.jboss.com/maven2/"
>    }
>    dependencies {
>        // specify dependencies here under either 'build', 'compile',
> 'runtime', 'test' or 'provided' scopes eg.
>
> runtime ('mysql:mysql-connector-java:5.1.16')
> runtime ('org.codehaus.groovy.modules:groovyws:0.5.2') {
>       excludes 'jaxen'
>         excludes 'xmlbeans'
>         excludes 'xalan'
>         excludes 'xml-apis'
> excludes 'xercesImpl'
> excludes 'xmlParserAPIs'
> excludes 'geronimo-servlet_2.5_spec'
>   }
>    }
>
>    plugins {
> runtime("org.grails.plugins:cxf:0.5.1") {
> excludes 'jaxen',
> 'xmlbeans'
> }
>    }
> }
>
>
> I think there is a problem with duplicate classes in my classpath and i
> tried a lot to resolve the problem, but nothing works. Any ideas?
>
> regards
>
> Stephan
>
> --
> View this message in context: http://grails.1312388.n4.nabble.com/Consume-web-service-in-Grails-app-tp1585031p3499373.html
> Sent from the Grails - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Consume web service in Grails app

Stiffler07
Hi Ronny,

thanks, that solves the problem, but now i'm running in the following
exception produced by proxy.initialize():

2011-05-06 12:41:07,003 [http-8080-2] ERROR
errors.GrailsExceptionResolver  - Exception occurred when processing
request: [POST] /WSTS/webService/operationCall - parameters:
to: Fahrenheit
submit: Convert
value: 10.0
from: Celsius
Stacktrace follows:
java.lang.ClassNotFoundException: com.sun.tools.internal.xjc.api.XJC
       at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
       at java.lang.Class.forName0(Native Method)
       at java.lang.Class.forName(Class.java:247)
       at org.apache.cxf.jaxb.JAXBUtils.createSchemaCompiler(JAXBUtils.java:657)
       at org.apache.cxf.jaxb.JAXBUtils.createSchemaCompilerWithDefaultAllocator(JAXBUtils.java:671)
       at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:260)
       at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:196)
       at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:175)
       at groovyx.net.ws.AbstractCXFWSClient.createClient(AbstractCXFWSClient.java:229)
       at groovyx.net.ws.WSClient.initialize(WSClient.java:108)
       at groovyx.net.ws.IWSClient$initialize.call(Unknown Source)
       at wsts.WebServiceController$_closure4.doCall(WebServiceController.groovy:31)
       at wsts.WebServiceController$_closure4.doCall(WebServiceController.groovy)
       at java.lang.Thread.run(Thread.java:662)

2011/5/6 Ronny Løvtangen [via Grails]
<ml-node+3501558-931264400-210491@n4.nabble.com>:
> Yes, GroovyWS pulls in a few dependencies that conflicts with classes
> already in Java 6.
> This is my excludes list:
>
>             compile("org.codehaus.groovy.modules:groovyws:0.5.2") {
>                     excludes 'geronimo-servlet_2.5_spec', 'servlet-api',
> 'jaxb-xjc', 'jaxb-impl', 'xml-apis', 'saaj-impl', 'junit', 'slf4j-jdk14',
> 'xmlParserAPIs', 'jaxb-api', 'saaj-api', 'xmlbeans', 'jaxen',
> 'geronimo-stax-api_1.0_spec', 'geronimo-activation_1.0.2_spec',
> 'abdera-client', 'geronimo-activation_1.1_spec'
>             }
>
> Ronny
>

Regards,

Stephan
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Consume web service in Grails app

Stiffler07
I forgot, my BuildConfig.groovy now looks like:

grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
//grails.project.war.file = "target/${appName}-${appVersion}.war"
grails.project.dependency.resolution = {
    // inherit Grails' default dependencies
    inherits("global") {
        // uncomment to disable ehcache
        // excludes 'ehcache'
    }
    log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
    repositories {
        grailsPlugins()
        grailsHome()
        grailsCentral()

        // uncomment the below to enable remote dependency resolution
        // from public Maven repositories
        //mavenLocal()
        mavenCentral()
        //mavenRepo "http://snapshots.repository.codehaus.org"
        mavenRepo "http://repository.codehaus.org"
        //mavenRepo "http://download.java.net/maven/2/"
        //mavenRepo "http://repository.jboss.com/maven2/"
    }

    runtime('org.codehaus.groovy.modules:groovyws:0.5.2') {
        excludes 'geronimo-servlet_2.5_spec', 'servlet-api', 'jaxb-xjc', 'jaxb-impl', 'xml-apis', 'saaj-impl', 'junit', 'slf4j-jdk14', 'xmlParserAPIs', 'jaxb-api', 'saaj-api', 'xmlbeans', 'jaxen', 'geronimo-stax-api_1.0_spec', 'geronimo-activation_1.0.2_spec', 'abdera-client', 'geronimo-activation_1.1_spec'
    }
       
    runtime ('mysql:mysql-connector-java:5.1.16')
   
}

how can I resolve the problem? do I need to exclude some libs in compile instead of of runtime phase?

regards,

Stephan

2011/5/6 Stiffler07 [via Grails] <ml-node+3502254-1566461572-210491@n4.nabble.com>:
> Hi Ronny,
>
> thanks, that solves the problem, but now i'm running in the following
> exception produced by proxy.initialize():
>
> 2011-05-06 12:41:07,003 [http-8080-2] ERROR
> errors.GrailsExceptionResolver  - Exception occurred when processing
> request: [POST] /WSTS/webService/operationCall - parameters:
> to: Fahrenheit
> submit: Convert
> value: 10.0
> from: Celsius
> Stacktrace follows:
> java.lang.ClassNotFoundException: com.sun.tools.internal.xjc.api.XJC
>        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>        at java.lang.Class.forName0(Native Method)
>        at java.lang.Class.forName(Class.java:247)
>        at
> org.apache.cxf.jaxb.JAXBUtils.createSchemaCompiler(JAXBUtils.java:657)
>        at
> org.apache.cxf.jaxb.JAXBUtils.createSchemaCompilerWithDefaultAllocator(JAXBUtils.java:671)
>        at
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:260)
>        at
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:196)
>        at
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:175)
>        at
> groovyx.net.ws.AbstractCXFWSClient.createClient(AbstractCXFWSClient.java:229)
>        at groovyx.net.ws.WSClient.initialize(WSClient.java:108)
>        at groovyx.net.ws.IWSClient$initialize.call(Unknown Source)
>        at
> wsts.WebServiceController$_closure4.doCall(WebServiceController.groovy:31)
>        at
> wsts.WebServiceController$_closure4.doCall(WebServiceController.groovy)
>        at java.lang.Thread.run(Thread.java:662)
>
> 2011/5/6 Ronny Løvtangen [via Grails]
> <ml-node+3501558-931264400-210491@n4.nabble.com>:
>> Yes, GroovyWS pulls in a few dependencies that conflicts with classes
>> already in Java 6.
>> This is my excludes list:
>>
>>             compile("org.codehaus.groovy.modules:groovyws:0.5.2") {
>>                     excludes 'geronimo-servlet_2.5_spec', 'servlet-api',
>> 'jaxb-xjc', 'jaxb-impl', 'xml-apis', 'saaj-impl', 'junit', 'slf4j-jdk14',
>> 'xmlParserAPIs', 'jaxb-api', 'saaj-api', 'xmlbeans', 'jaxen',
>> 'geronimo-stax-api_1.0_spec', 'geronimo-activation_1.0.2_spec',
>> 'abdera-client', 'geronimo-activation_1.1_spec'
>>             }
>>
>> Ronny
>>
>
> Regards,
>
> Stephan
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Consume web service in Grails app

rlovtangen
What OS and JVM version are you using? I have com.sun.tools.internal.xjc.api.XJC inside standard Java 6 classes.jar on Mac OS X.

Ronny


On May 6, 2011, at 1:18 PM, Stiffler07 wrote:

> I forgot, my BuildConfig.groovy now looks like:
>
> grails.project.class.dir = "target/classes"
> grails.project.test.class.dir = "target/test-classes"
> grails.project.test.reports.dir = "target/test-reports"
> //grails.project.war.file = "target/${appName}-${appVersion}.war"
> grails.project.dependency.resolution = {
>    // inherit Grails' default dependencies
>    inherits("global") {
>        // uncomment to disable ehcache
>        // excludes 'ehcache'
>    }
>    log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info',
> 'debug' or 'verbose'
>    repositories {
>        grailsPlugins()
>        grailsHome()
>        grailsCentral()
>
>        // uncomment the below to enable remote dependency resolution
>        // from public Maven repositories
>        //mavenLocal()
>        mavenCentral()
>        //mavenRepo "http://snapshots.repository.codehaus.org"
>        mavenRepo "http://repository.codehaus.org"
>        //mavenRepo "http://download.java.net/maven/2/"
>        //mavenRepo "http://repository.jboss.com/maven2/"
>    }
>
>    runtime('org.codehaus.groovy.modules:groovyws:0.5.2') {
> excludes 'geronimo-servlet_2.5_spec', 'servlet-api', 'jaxb-xjc',
> 'jaxb-impl', 'xml-apis', 'saaj-impl', 'junit', 'slf4j-jdk14',
> 'xmlParserAPIs', 'jaxb-api', 'saaj-api', 'xmlbeans', 'jaxen',
> 'geronimo-stax-api_1.0_spec', 'geronimo-activation_1.0.2_spec',
> 'abdera-client', 'geronimo-activation_1.1_spec'
>    }
>
>    runtime ('mysql:mysql-connector-java:5.1.16')
>
> }
>
> how can I resolve the problem? do I need to exclude some libs in compile
> instead of of runtime phase?
>
> regards,
>
> Stephan
>
> 2011/5/6 Stiffler07 [via Grails]
> &lt;[hidden email]&gt;:
>> Hi Ronny,
>>
>> thanks, that solves the problem, but now i'm running in the following
>> exception produced by proxy.initialize():
>>
>> 2011-05-06 12:41:07,003 [http-8080-2] ERROR
>> errors.GrailsExceptionResolver  - Exception occurred when processing
>> request: [POST] /WSTS/webService/operationCall - parameters:
>> to: Fahrenheit
>> submit: Convert
>> value: 10.0
>> from: Celsius
>> Stacktrace follows:
>> java.lang.ClassNotFoundException: com.sun.tools.internal.xjc.api.XJC
>>        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
>>        at java.security.AccessController.doPrivileged(Native Method)
>>        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>>        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>>        at java.lang.Class.forName0(Native Method)
>>        at java.lang.Class.forName(Class.java:247)
>>        at
>> org.apache.cxf.jaxb.JAXBUtils.createSchemaCompiler(JAXBUtils.java:657)
>>        at
>> org.apache.cxf.jaxb.JAXBUtils.createSchemaCompilerWithDefaultAllocator(JAXBUtils.java:671)
>>        at
>> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:260)
>>        at
>> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:196)
>>        at
>> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:175)
>>        at
>> groovyx.net.ws.AbstractCXFWSClient.createClient(AbstractCXFWSClient.java:229)
>>        at groovyx.net.ws.WSClient.initialize(WSClient.java:108)
>>        at groovyx.net.ws.IWSClient$initialize.call(Unknown Source)
>>        at
>> wsts.WebServiceController$_closure4.doCall(WebServiceController.groovy:31)
>>        at
>> wsts.WebServiceController$_closure4.doCall(WebServiceController.groovy)
>>        at java.lang.Thread.run(Thread.java:662)
>>
>> 2011/5/6 Ronny Løvtangen [via Grails]
>> &lt;[hidden email]&gt;:
>>> Yes, GroovyWS pulls in a few dependencies that conflicts with classes
>>> already in Java 6.
>>> This is my excludes list:
>>>
>>>             compile("org.codehaus.groovy.modules:groovyws:0.5.2") {
>>>                     excludes 'geronimo-servlet_2.5_spec', 'servlet-api',
>>> 'jaxb-xjc', 'jaxb-impl', 'xml-apis', 'saaj-impl', 'junit', 'slf4j-jdk14',
>>> 'xmlParserAPIs', 'jaxb-api', 'saaj-api', 'xmlbeans', 'jaxen',
>>> 'geronimo-stax-api_1.0_spec', 'geronimo-activation_1.0.2_spec',
>>> 'abdera-client', 'geronimo-activation_1.1_spec'
>>>             }
>>>
>>> Ronny
>>>
>>
>> Regards,
>>
>> Stephan
>
> --
> View this message in context: http://grails.1312388.n4.nabble.com/Consume-web-service-in-Grails-app-tp1585031p3502291.html
> Sent from the Grails - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Consume web service in Grails app

Stiffler07
I'm using ubtunu natty narwhal. java -version prints the following on console:

java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)

regards
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Consume web service in Grails app

rlovtangen
We're running on RHEL and CentOS in production, with the excludes I sent. No problem there.
But I had a colleague running Ubuntu, he had to add the following dependencies:

                        compile 'com.sun.xml.bind:jaxb-xjc:2.1.12', 'com.sun.xml.bind:jaxb-impl:2.1.12'

Don't know why JVM on Ubuntu is different than OS X, CentOS and RHEL.

Ronny

On May 6, 2011, at 2:08 PM, Stiffler07 wrote:

> I'm using ubtunu natty narwhal. java -version prints the following on
> console:
>
> java version "1.6.0_24"
> Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
> Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)
>
> regards
>
> --
> View this message in context: http://grails.1312388.n4.nabble.com/Consume-web-service-in-Grails-app-tp1585031p3502433.html
> Sent from the Grails - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Consume web service in Grails app

Stiffler07
Okay, that solves the problem, now I'm be able to run groovyws on
grails as described in the official groovy guide on codehaus.org
(http://groovy.codehaus.org/Using+WSClient+in+Grails).

Very much thanks to you Ronny! I had tried to getting this example to
run for a few days in different ways. For anyone else having the same
problem, my BuildConfig.groovy now looks like:
- Zitierten Text ausblenden -

grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
//grails.project.war.file = "target/${appName}-${appVersion}.war"
grails.project.dependency.resolution = {
   // inherit Grails' default dependencies
   inherits("global") {
       // uncomment to disable ehcache
       // excludes 'ehcache'
   }
   log "warn" // log level of Ivy resolver, either 'error', 'warn',
'info', 'debug' or 'verbose'
   repositories {
       grailsPlugins()
       grailsHome()
       grailsCentral()

       // uncomment the below to enable remote dependency resolution
       // from public Maven repositories
       //mavenLocal()
       mavenCentral()
       //mavenRepo "http://snapshots.repository.codehaus.org"
       mavenRepo "http://repository.codehaus.org"
       //mavenRepo "http://download.java.net/maven/2/"
       //mavenRepo "http://repository.jboss.com/maven2/"
   }

   runtime('org.codehaus.groovy.modules:groovyws:0.5.2') {
       excludes 'geronimo-servlet_2.5_spec', 'servlet-api', 'jaxb-xjc',
'jaxb-impl', 'xml-apis', 'saaj-impl', 'junit',           'slf4j-jdk14',
'xmlParserAPIs', 'jaxb-api', 'saaj-api', 'xmlbeans', 'jaxen',
'geronimo-stax-api_1.0_spec',                    'geronimo-activation_1.0.2_spec',
'abdera-client', 'geronimo-activation_1.1_spec'
   }

   runtime ('mysql:mysql-connector-java:5.1.16')

   compile 'com.sun.xml.bind:jaxb-xjc:2.1.12',
'com.sun.xml.bind:jaxb-impl:2.1.12'
}

regards,

Stephan
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Consume web service in Grails app

rlovtangen
Good to hear :)

We tried to wrap the two additional dependencies needed on Ubuntu in something like this:

                if (basedir=="/home/finn/src/troll/troll-web") { //not sure why Ubuntu don't have these provided in the JVM
                        compile 'com.sun.xml.bind:jaxb-xjc:2.1.12', 'com.sun.xml.bind:jaxb-impl:2.1.12'
                }

So that only the developer using ubuntu got these dependencies.
Not sure if he got it to work or not. Would be great if someone has a solution to include dependencies depending on OS.

Ronny

On May 6, 2011, at 2:48 PM, Stiffler07 wrote:

> Okay, that solves the problem, now I'm be able to run groovyws on
> grails as described in the official groovy guide on codehaus.org
> (http://groovy.codehaus.org/Using+WSClient+in+Grails).
>
> Very much thanks to you Ronny! I had tried to getting this example to
> run for a few days in different ways. For anyone else having the same
> problem, my BuildConfig.groovy now looks like:
> - Zitierten Text ausblenden -
>
> grails.project.class.dir = "target/classes"
> grails.project.test.class.dir = "target/test-classes"
> grails.project.test.reports.dir = "target/test-reports"
> //grails.project.war.file = "target/${appName}-${appVersion}.war"
> grails.project.dependency.resolution = {
>   // inherit Grails' default dependencies
>   inherits("global") {
>       // uncomment to disable ehcache
>       // excludes 'ehcache'
>   }
>   log "warn" // log level of Ivy resolver, either 'error', 'warn',
> 'info', 'debug' or 'verbose'
>   repositories {
>       grailsPlugins()
>       grailsHome()
>       grailsCentral()
>
>       // uncomment the below to enable remote dependency resolution
>       // from public Maven repositories
>       //mavenLocal()
>       mavenCentral()
>       //mavenRepo "http://snapshots.repository.codehaus.org"
>       mavenRepo "http://repository.codehaus.org"
>       //mavenRepo "http://download.java.net/maven/2/"
>       //mavenRepo "http://repository.jboss.com/maven2/"
>   }
>
>   runtime('org.codehaus.groovy.modules:groovyws:0.5.2') {
>       excludes 'geronimo-servlet_2.5_spec', 'servlet-api', 'jaxb-xjc',
> 'jaxb-impl', 'xml-apis', 'saaj-impl', 'junit',           'slf4j-jdk14',
> 'xmlParserAPIs', 'jaxb-api', 'saaj-api', 'xmlbeans', 'jaxen',
> 'geronimo-stax-api_1.0_spec',                  
> 'geronimo-activation_1.0.2_spec',
> 'abdera-client', 'geronimo-activation_1.1_spec'
>   }
>
>   runtime ('mysql:mysql-connector-java:5.1.16')
>
>   compile 'com.sun.xml.bind:jaxb-xjc:2.1.12',
> 'com.sun.xml.bind:jaxb-impl:2.1.12'
> }
>
> regards,
>
> Stephan
>
>
> --
> View this message in context: http://grails.1312388.n4.nabble.com/Consume-web-service-in-Grails-app-tp1585031p3502586.html
> Sent from the Grails - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Consume web service in Grails app

coxor
In reply to this post by Stiffler07
Hi Stiffler07,

I used your BuildConfig.groovy to make WSclinet working but i still got error:

Error 500: Executing action [conversion] of controller [wstest.TemperatureController] caused exception: java.lang.LinkageError: loader constraint violation: when resolving interface method "org.w3c.dom.Node.setUserData(Ljava/lang/String;Ljava/lang/Object;Lorg/w3c/dom/UserDataHandler;)Ljava/lang/Object;" the class loader (instance of org/codehaus/groovy/grails/cli/support/GrailsRootLoader) of the current class, org/apache/cxf/staxutils/StaxUtils, and the class loader (instance of <bootloader>) for resolved class, org/w3c/dom/Node, have different Class objects for the type org/w3c/dom/UserDataHandler used in the signature

I'm using MS Window7 64bit, with java version "1.6.0_27"
Java(TM) SE Runtime Environment (build 1.6.0_27-b07)
Java HotSpot(TM) 64-Bit Server VM (build 20.2-b06, mixed mode).

Any idea what can be wrong?

regards, Cox



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Consume web service in Grails app

robelsner
> the class loader (instance of
> org/codehaus/groovy/grails/cli/support/GrailsRootLoader) of the current
> class, org/apache/cxf/staxutils/StaxUtils, and the class loader (instance of
> <bootloader>) for resolved class, org/w3c/dom/Node, have different Class
> objects for the type org/w3c/dom/UserDataHandler used in the signature

Your class loader is different than the one which loaded the class originally.

How are you passing the class loader to the WSClient?

Rob

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Consume web service in Grails app

ctoestreich
This post has NOT been accepted by the mailing list yet.
I have nearly completed work and documentation on a cxf client plugin.  You can find the source for the plugin here https://github.com/ctoestreich/cxf-client.  I found the current plugins a bit cumbersome for consuming soap services.  It was especially slow consuming wsdls that were complex and large due to ws client dynamically recreating the proxy service and objects every time.

There is a demo project also on there for reference at https://github.com/ctoestreich/cxf-client-demo.

If you are consuming soap services this offers a pretty easy and fast alternative to existing plugins.

This plugin is still a wip and I am still testing un/pw secured services with wss4j, so that might not be working 100%, but simple services not backed with credentials should be working.  You will have to get code and refer to the plugin inline in the buildconfig or do a package-plugin and put the zip into your lib dir or install it from the file system for now.

Cheers!
Christian Oestreich
http://www.christianoestreich.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Consume web service in Grails app

rlovtangen
In reply to this post by coxor
You have two instances of org.w3c.dom.UserDatahandler in your classpath. One of them is the one included in Java 6. You need to find the other one, and exclude it. The usual suspect is xml-apis.
If you use IntelliJ, you can use "Go To" --> "Class..." and type in "UserDataHandler". If your using Eclipse, there's "Open Type" if I remember correctly. Or you can use some command line grepping.
If you get more than one result, you have your problem right there.

Ronny

On Sep 7, 2011, at 2:38 PM, coxor wrote:

> Hi Stiffler07,
>
> I used your BuildConfig.groovy to make WSclinet working but i still got
> error:
>
> Error 500: Executing action [conversion] of controller
> [wstest.TemperatureController] caused exception: java.lang.LinkageError:
> loader constraint violation: when resolving interface method
> "org.w3c.dom.Node.setUserData(Ljava/lang/String;Ljava/lang/Object;Lorg/w3c/dom/UserDataHandler;)Ljava/lang/Object;"
> the class loader (instance of
> org/codehaus/groovy/grails/cli/support/GrailsRootLoader) of the current
> class, org/apache/cxf/staxutils/StaxUtils, and the class loader (instance of
> <bootloader>) for resolved class, org/w3c/dom/Node, have different Class
> objects for the type org/w3c/dom/UserDataHandler used in the signature
>
> I'm using MS Window7 64bit, with java version "1.6.0_27"
> Java(TM) SE Runtime Environment (build 1.6.0_27-b07)
> Java HotSpot(TM) 64-Bit Server VM (build 20.2-b06, mixed mode).
>
> Any idea what can be wrong?
>
> regards, Cox
>
>
>
>
>
> --
> View this message in context: http://grails.1312388.n4.nabble.com/Consume-web-service-in-Grails-app-tp1585031p3795990.html
> Sent from the Grails - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

consuming a web service in "http://groovy.codehaus.org/Using+WSClient+in+Grails"

7amituec
This post has NOT been accepted by the mailing list yet.
my controller code is
package temp.change

import groovyx.net.ws.WSClient

class TemperatureController {

    def index = { }

    def conversion = {
        def proxy = new WSClient("http://www.w3schools.com/webservices/tempconvert.asmx?WSDL",
                 this.class.classLoader)
         proxy.initialize()

        def message
        if (!params?.value || params.from.equals(params.to)) {
            message = "Units are probably the same. Don't aske me :)"
        } else {
            def result
            if ("Celsius".equals(params.from)) {
                result = proxy.CelsiusToFahrenheit(params.value)
            } else {
                result = proxy.FahrenheitToCelsius(params.value)
            }
            message = "${params.value} degrees ${params.from} are ${result} degrees ${params.to}"
        }

        flash.message = message
similarly i have proceeded just as given in that page......................have put all required jars in app library....................but error
Error 2012-06-14 00:22:00,200 [http-bio-8080-exec-4] ERROR errors.GrailsExceptionResolver  - ConnectException occurred when processing request: [POST] /temp-change/temperature/conversion - parameters:
to: Fahrenheit
submit: Convert
value: 10.0
from: Celsius
Connection timed out. Stacktrace follows:
Message: Connection timed out
    Line | Method
->>  327 | doConnect        in java.net.AbstractPlainSocketImpl
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|    193 | connectToAddress in     ''
|    180 | connect . . . .  in     ''
|    384 | connect          in java.net.SocksSocketImpl
|    546 | connect . . . .  in java.net.Socket
|    495 | connect          in     ''
|    150 | tryFileSystem .  in org.apache.cxf.resource.URIResolver
|     84 | <init>           in     ''
|    592 | composeUrl . . . in org.apache.cxf.endpoint.dynamic.DynamicClientFactory
|    251 | createClient     in     ''
|    196 | createClient . . in     ''
|    175 | createClient     in     ''
|    194 | createClient . . in groovyx.net.ws.AbstractCXFWSClient
|    107 | initialize       in groovyx.net.ws.WSClient
|     12 | doCall . . . . . in temp.change.TemperatureController$_closure2
|   1110 | runWorker        in java.util.concurrent.ThreadPoolExecutor
|    603 | run . . . . . .  in java.util.concurrent.ThreadPoolExecutor$Worker
^    679 | run              in java.lang.Thread

my buildconfig.groovy code is
grails.servlet.version = "2.5" // Change depending on target container compliance (2.5 or 3.0)
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
grails.project.target.level = 1.6
grails.project.source.level = 1.6
//grails.project.war.file = "target/${appName}-${appVersion}.war"

grails.project.dependency.resolution = {
    // inherit Grails' default dependencies
    inherits("global") {
        // uncomment to disable ehcache
        // excludes 'ehcache'
    }
    log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
    checksums true // Whether to verify checksums on resolve

    repositories {
        inherits true // Whether to inherit repository definitions from plugins
        grailsPlugins()
        grailsHome()
        grailsCentral()
        mavenCentral()

        // uncomment these to enable remote dependency resolution from public Maven repositories
        //mavenCentral()
        //mavenLocal()
        //mavenRepo "http://snapshots.repository.codehaus.org"
        mavenRepo "http://repository.codehaus.org"
        //mavenRepo "http://download.java.net/maven/2/"
        //mavenRepo "http://repository.jboss.com/maven2/"
    }
    dependencies {
                compile 'com.sun.xml.bind:jaxb-xjc:2.1.12', 'com.sun.xml.bind:jaxb-impl:2.1.12'
               
        // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg.
                compile("org.codehaus.groovy.modules:groovyws:0.5.2") {
                        excludes 'geronimo-servlet_2.5_spec', 'servlet-api', 'jaxb-xjc', 'jaxb-impl', 'xml-apis', 'saaj-impl', 'junit', 'slf4j-jdk14', 'xmlParserAPIs', 'jaxb-api', 'saaj-api', 'xmlbeans', 'jaxen', 'geronimo-stax-api_1.0_spec', 'geronimo-activation_1.0.2_spec', 'abdera-client', 'geronimo-activation_1.1_spec'
       
                        }

        // runtime 'mysql:mysql-connector-java:5.1.16'
    }

    plugins {
        runtime ":hibernate:$grailsVersion"
        runtime ":jquery:1.7.1"
        runtime ":resources:1.1.6"

        // Uncomment these (or add new ones) to enable additional resources capabilities
        //runtime ":zipped-resources:1.0"
        //runtime ":cached-resources:1.0"
        //runtime ":yui-minify-resources:0.1.4"

        build ":tomcat:$grailsVersion"
    }
}
and i m using ubuntu 12.04.......what i should do.........................
no plugin have been added though i have tried,but unsuccessful...................................
plz guide me what i should do n prerequuisite for calling a web service in grails 2.0.3..................proxy() initialise is having some error??????????????????????????
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: consuming a web service in "http://groovy.codehaus.org/Using+WSClient+in+Grails"

7amituec
This post has NOT been accepted by the mailing list yet.
when i m giving command to install plugin
grails install-plugin ws-client 1.0
following error come
WARNINGS
                module not found: org.grails.plugins#ws-client;1.0
        ==== grailsPlugins: tried
          -- artifact org.grails.plugins#ws-client;1.0!ws-client.zip:
          /home/amit/new WorkSpaces/SpringSource/temp-change/lib/ws-client-1.0.zip
          /home/amit/.grails/2.0.3/projects/temp-change/plugins/tomcat-2.0.3/lib/ws-client-1.0.zip
          /home/amit/.grails/2.0.3/projects/temp-change/plugins/resources-1.1.6/lib/ws-client-1.0.zip
          /home/amit/.grails/2.0.3/projects/temp-change/plugins/hibernate-2.0.3/lib/ws-client-1.0.zip
          /home/amit/.grails/2.0.3/projects/temp-change/plugins/jquery-1.7.1/lib/ws-client-1.0.zip
          /home/amit/.grails/2.0.3/projects/temp-change/plugins/webxml-1.4.1/lib/ws-client-1.0.zip
        ==== grailsHome: tried
          /home/amit/springsource-old/grails-2.0.3/lib/org.grails.plugins/ws-client/ivy-1.0.xml
          -- artifact org.grails.plugins#ws-client;1.0!ws-client.zip:
          /home/amit/springsource-old/grails-2.0.3/lib/org.grails.plugins/ws-client/jars/ws-client-1.0.zip
          /home/amit/springsource-old/grails-2.0.3/lib/org.grails.plugins/ws-client/bundles/ws-client-1.0.zip
        ==== grailsHome: tried
          /home/amit/springsource-old/grails-2.0.3/src/libs/ws-client-1.0.xml
          -- artifact org.grails.plugins#ws-client;1.0!ws-client.zip:
          /home/amit/springsource-old/grails-2.0.3/src/libs/ws-client-1.0.zip
        ==== grailsHome: tried
          /home/amit/springsource-old/grails-2.0.3/dist/ws-client-1.0.xml
          -- artifact org.grails.plugins#ws-client;1.0!ws-client.zip:
          /home/amit/springsource-old/grails-2.0.3/dist/ws-client-1.0.zip
        ==== grailsHome: tried
          /home/amit/.grails/2.0.3/cached-installed-plugins/ws-client-1.0.xml
          -- artifact org.grails.plugins#ws-client;1.0!ws-client.zip:
          /home/amit/.grails/2.0.3/cached-installed-plugins/ws-client-1.0.zip
        ==== grailsHome: tried
          -- artifact org.grails.plugins#ws-client;1.0!ws-client.zip:
          /home/amit/springsource-old/grails-2.0.3/plugins/ws-client-1.0.zip
        ==== grailsCentral: tried
          http://plugins.grails.org/grails-ws-client/tags/RELEASE_1.0/ws-client-1.0.pom
          -- artifact org.grails.plugins#ws-client;1.0!ws-client.zip:
          http://plugins.grails.org/grails-ws-client/tags/RELEASE_1.0/grails-ws-client-1.0.zip
        ==== http://repo.grails.org/grails/plugins: tried
          http://repo.grails.org/grails/plugins/org/grails/plugins/ws-client/1.0/ws-client-1.0.pom
          -- artifact org.grails.plugins#ws-client;1.0!ws-client.zip:
          http://repo.grails.org/grails/plugins/org/grails/plugins/ws-client/1.0/ws-client-1.0.zip
        ==== http://repo.grails.org/grails/core: tried
          http://repo.grails.org/grails/core/org/grails/plugins/ws-client/1.0/ws-client-1.0.pom
          -- artifact org.grails.plugins#ws-client;1.0!ws-client.zip:
          http://repo.grails.org/grails/core/org/grails/plugins/ws-client/1.0/ws-client-1.0.zip
        ==== grailsCore: tried
          http://svn.codehaus.org/grails/trunk/grails-plugins/grails-ws-client/tags/RELEASE_1.0/ws-client-1.0.pom
          -- artifact org.grails.plugins#ws-client;1.0!ws-client.zip:
          http://svn.codehaus.org/grails/trunk/grails-plugins/grails-ws-client/tags/RELEASE_1.0/grails-ws-client-1.0.zip
        ==== mavenCentral: tried
          http://repo1.maven.org/maven2/org/grails/plugins/ws-client/1.0/ws-client-1.0.pom
          -- artifact org.grails.plugins#ws-client;1.0!ws-client.zip:
          http://repo1.maven.org/maven2/org/grails/plugins/ws-client/1.0/ws-client-1.0.zip
        ==== http://repository.codehaus.org: tried
          http://repository.codehaus.org/org/grails/plugins/ws-client/1.0/ws-client-1.0.pom
          -- artifact org.grails.plugins#ws-client;1.0!ws-client.zip:
          http://repository.codehaus.org/org/grails/plugins/ws-client/1.0/ws-client-1.0.zip
                ::::::::::::::::::::::::::::::::::::::::::::::
                ::          UNRESOLVED DEPENDENCIES         ::
                ::::::::::::::::::::::::::::::::::::::::::::::
                :: org.grails.plugins#ws-client;1.0: not found
                ::::::::::::::::::::::::::::::::::::::::::::::
:::: ERRORS
        Server access Error: Connection timed out url=http://plugins.grails.org/grails-ws-client/tags/RELEASE_1_0/ws-client-1.0.pom
        Server access Error: Connection timed out url=http://plugins.grails.org/grails-ws-client/tags/RELEASE_1_0/grails-ws-client-1.0.zip
        Server access Error: Connection timed out url=http://repo.grails.org/grails/plugins/org/grails/plugins/ws-client/1.0/ws-client-1.0.pom
        Server access Error: Connection timed out url=http://repo.grails.org/grails/plugins/org/grails/plugins/ws-client/1.0/ws-client-1.0.zip
        Server access Error: Connection timed out url=http://repo.grails.org/grails/core/org/grails/plugins/ws-client/1.0/ws-client-1.0.pom
        Server access Error: Connection timed out url=http://repo.grails.org/grails/core/org/grails/plugins/ws-client/1.0/ws-client-1.0.zip
        Server access Error: Connection timed out url=http://svn.codehaus.org/grails/trunk/grails-plugins/grails-ws-client/tags/RELEASE_1_0/ws-client-1.0.pom
        Server access Error: Connection timed out url=http://svn.codehaus.org/grails/trunk/grails-plugins/grails-ws-client/tags/RELEASE_1_0/grails-ws-client-1.0.zip
        Server access Error: Connection timed out url=http://repo1.maven.org/maven2/org/grails/plugins/ws-client/1.0/ws-client-1.0.pom
        Server access Error: Connection timed out url=http://repo1.maven.org/maven2/org/grails/plugins/ws-client/1.0/ws-client-1.0.zip
        Server access Error: Connection timed out url=http://repository.codehaus.org/org/grails/plugins/ws-client/1.0/ws-client-1.0.pom
        Server access Error: Connection timed out url=http://repository.codehaus.org/org/grails/plugins/ws-client/1.0/ws-client-1.0.zip
| Error resolving plugin [name:ws-client, group:org.grails.plugins, version:1.0]. Plugin not found.
| Error Plugin not found for name [ws-client] and version [1.0]




what i should do????
Loading...