Skip to end of metadata
Go to start of metadata

Deprecated Module

Icon

Before using GroovySOAP, make sure to check GroovyWS

Introduction


SOAP is a lightweight protocol intended for exchanging structured information in a decentralized, distributed environment. Groovy has a SOAP implementation based on
Xfire which allows you to create a SOAP server and/or make calls to remote SOAP servers using Groovy.

Installation

 You just need to download this jar file in your ${user.home}/.groovy/lib directory. This jar file embeds all the dependencies.

Getting Started

The Server

You can develop your web service using a groovy script and/or a groovy class. The following two groovy files are valid for building a web-service.

  1. MathService.groovy

  2. You can also using something more Groovy

  3. Then the easy part ... no need for comments

    That's all !

The Client

  1. Oh ... you want to test it ... two more lines.
  2. You're done!

Custom Data Types

This example shows how to use custom data types with Groovy SOAP. The code can be downloaded from here.

The Server

The PersonService.groovy script contains the service implementation and the custom data type (Person).

PersonService.groovy


Server.groovy is equivalent to the previous example.

Server.groovy


For each class compiled by the groovy compiler a metaClass property is added to the bytecode. This property must be excluded from being mapped by XFire, otherwise an error will be reported when trying to obtain the WSDL document from http://localhost:6980/PersonServiceInterface?wsdl. The reason is that XFire cannot map groovy.lang.MetaClass. To ignore the metaClass property a custom type mapping must be defined (for details refer to Aegis Binding).

Person.aegis.xml


However, if you compile custom data types from Java the bytecode won't contain a metaClass property and, hence, there is no need to define a custom mapping.

The Client


Client.groovy



More Information

Current limitations (and workaround)

  1. No authentication (see JIRA issue 1457)
  2. No proxy support (see JIRA issue 1458)
  3. Numeric values are represented as strings in custom data types and arrays.
  4. Custom data types cannot be processed on client side when using the Groovy SOAP module with the current groovy-1.0 release.
  5. It looks like the XFire dynamic client does not support complex datatypes. This may be a concern if you need for example to transfer an Image as a byte array. The workaround I use is to transform this in a String an transfer that String - As this is a bit painful I am investigating moving to the regular XFire client. Here is a little program demo-ing this (look at this "disco age" image - Is Groovy that old ?

The client (ImageClient.groovy)


The (ugly) server part embedding the image which is Base64 encoded (ImageServer.groovy):


and the missing and secred part is here.

Demos with public web services

There exist a lot of web-services available for testing. One which is pretty easy to evaluate is the currency rate calculator from webservicex.net.
Here is a small swing sample that demonstrate the use of the service. Enjoy !


And here is the result:
 

  • No labels

39 Comments

  1. I have a couple of questions:

    1) Is there no stub generation required?  Maybe that's just the beauty of Groovy!

    2) Is it demonstrated to be able to communicate with an Axis server?   I suppose this question belongs on the XFire mailing list so I'll ask there.

  2. Hehe, no you don't need to generate any stubs !

    I have not yet trying to use it with an Axis server.

    Thanks for considering GroovySOAP and keep me informed of your progress as well as new requirements.

  3. Hello, I'm using groovy version 1.0-jsr-05 but the class SoapClient isnt in the Lib.

    I need to download another jar?

    Thanks.

    Carlos Fernandes 

  4. Guillaume,

    I've downloaded GSOAP and have built and run it. Can it be integrated with my normal Groovy JSR-05 release? Or do I have to use the JSR-05-Snapshot release that it came with? I'd like to be able to use the GSoap stuff in my normal groovy env if possible.

     ...Kevin

  5. Kevin,

     Fine, you answered to Carlos (wink) : currrently GroovySOAP is not part of the Groovy release. I guess it will be part of the next release. Then you have to download it from the CVS.

     Of course, you can use it with your own Groovy release and not necessarily with the attached Groovy version. you just need the jar file.

    Hope this help

    Guillaume

  6. Guillaume,

    Any plan to support writing the services in Groovy?

    Thanks, 

    Tom

  7. Guillaime,

    I get a 404 when clicking on the link to the groovysoap-all-2006*00503.jar. I think the fat underlined *0 is too much?

    I succeeded in downloading it from here. 

    regards,

    Peter 

  8. Hi,

     getting over the hurdle of the broken link was not the end...

    Apparently the XFire people use a sort of special classloader with as a result that the stax jars do not get found (Always complaining of not finding the com.bea.... stuff which is basically the hardcoded default). This is solved by installing the needed stax jar's in the $

    Unknown macro: {JAVA_HOME}

    /jre/lib/endorsed  directory.

    Now I get a array index error when using webservices without a parameter. And by some strange coincidence, all the services I need, do not have any parameters....

    I have seen similar postings on the XFire mailing lists.

    regards,

    Peter 

  9. Hi peter,

    Thanks for trying GroovySOAP. Can you be more specific on your problem and maybe give a sample ?

    Thanks

    Guillaume 

  10. Does GroovySOAP only work with basic types ?

    I got the simple maths example working. Then I moved on to super complex example :o)

    I'm trying to use XMLBeans generated classes. I know XFire works with these. I added the required types to the interface and specified the imports and types in the .groovy source file (a class) and it showed errors in the Groovy source file in Eclipse (using the latest CVS build of the GroovyEclipse plugin). I added the XMLBEans generated JAR to the classpath and the errors markers were removed (i.e. could not resolve the complex return type but is able to after the classpath update).

    The JAVA interface gets compiled to a .class but no .class is generated from the .groovy file. If I use groovy or groovyc from the command line I get unable to resolve class even though I have added the JAR to the groovy\lib directory. Is there something else I need to do in order to get the service to compile ... and run

    Many thanks in advance

    Don

  11. Don,

    I am also experiencing problems when trying to use complex types directly in Groovy while this is working when the interface is done in Java. I am currently trying to solve that problem. Could you describe more precisely your process using XMLBeans. You can join me at galleon@codehaus.org

    Thanks for trying GroovySOAP. 

    Guillaume

  12.  I'm invoking a relative simple WebService from amazon, after the math example  :

     import groovy.net.SoapClient

    def proxy= new SoapClient("http://soap.amazon.com/schemas2/AmazonWebServices.wsdl")

    def result = proxy.KeywordSearchRequest("Borges","2","books","","lite","")

    I got  a classCastException. Reading the debug log, I think only the first parameter is passed to the server.

    Any sugestion?

  13. This is my sample program. It is supposed to return an array of strings (and
    does so using ruby, python, perl, PHP, Java with varying amounts of success)

    import groovy.net.soap.SoapClient
    def proxy = new SoapClient("http://dynip-56-144:8080/xxmlx_lov/LovServiceBean?wsdl")
    rslt = proxy.getPackageNames()
    print rslt

    Then I get this stack dump::

    HH:mm:ss z, EEE, dd-MM-yyyy HH:mm:ss z]
    2006-05-11 13:54:42,637

    Unknown macro: { main}

    [DEBUG,DefaultHttpParams] Set parameter http.useragent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; XFire Client +http://xfire.codehaus.org)
    2006-05-11 13:54:42,646

    [DEBUG,DefaultHttpParams] Set parameter http.protocol.expect-continue = true
    2006-05-11 13:54:42,646

    Unknown macro: { main}

    [DEBUG,DefaultHttpParams] Set parameter http.protocol.version = HTTP/1.1
    org.codehaus.xfire.fault.XFireFault: 0
    at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89)
    at org.codehaus.xfire.client.Client.invoke(Client.java:351)
    at org.codehaus.xfire.client.Client.invoke(Client.java:377)
    at groovy.net.soap.SoapClient.invokeMethod(Unknown Source)
    at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:161)
    at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:104)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod(ScriptBytecodeAdapter.java:85)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNoArgumentsMethod(ScriptBytecodeAdapter.java:175)
    at test4.run(test4.groovy:5)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    ... snip ...
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:131)
    at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:160)
    Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
    at org.codehaus.xfire.service.binding.AbstractBinding.getClientParam(AbstractBinding.java:260)
    at org.codehaus.xfire.service.binding.DocumentBinding.writeMessage(DocumentBinding.java:61)
    at org.codehaus.xfire.soap.SoapSerializer.writeMessage(SoapSerializer.java:81)
    at org.codehaus.xfire.transport.http.HttpChannel.writeWithoutAttachments(HttpChannel.java:111)
    at org.codehaus.xfire.transport.http.CommonsHttpMessageSender.getByteArrayRequestEntity(CommonsHttpMessageSender.java:209)
    at org.codehaus.xfire.transport.http.CommonsHttpMessageSender.send(CommonsHttpMessageSender.java:158)
    at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:167)
    at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:66)
    at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
    at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:98)
    at org.codehaus.xfire.client.Client.invoke(Client.java:347)
    ... 50 more

    hope it helps,

    Peter

  14. Hi all

    You are probaly aware that the main codehaus server is out. Therefore I have put a new version of GroovySOAP on this server (http://grideads.dyndns.org/groovysoap-all-20060515.jar) until it is up again. This should solve much of yours problems - if not post me a message.

    cheers

    tog

  15. Hi,

    I'm trying the MathService Sample, but all what I get from

    http://localhost:6980/MathWebServiceInterface?wsdl

     is

    HTTP ERROR: 500

    Provider com.bea.xml.stream.MXParserFactory not found
    RequestURI=/MathWebServiceInterface

    Powered by Jetty://

    I'm using
     Groovy Version: 1.0-jsr-05 JVM: 1.5.0_06-b05

    activation.jar from jaf1.1

    mail.jar from javamail-1.4

     groovysoap-all-20060508.jar or groovysoap-all-20060515.jar

    Regards,

      Steffen
     

  16. Hi steffen,

    looks like stax libraries are mandatory now for xfire-1.1. You can fetch them from http://dist.codehaus.org/stax/jars/. I will make them available in the next release.

    cheers

    tog

  17. Hi,

    Does it support JDK 1.4.2 ? I found that current groovysoap-all-xxx.jar only support JSE 5.0.

    Leo.

  18. Any idea when it will support auth?

  19. I'm having great difficulty accessing a web services generated following a netbeans tutorial: http://www.netbeans.org/kb/55/websvc-jax-ws.html

    The method add() is part of CalculatorWSPort, but I am unsure how to access a service 'port' from groovy.

    MyCode:-
    ..
    def proxy = new SoapClient("http://localhost:8084/CalculatorWSApplication/CalculatorWS?wsdl")
    def result = proxy.add(1, 2)
    ..

    Any Ideas? Cheers Matt.

  20. The implementation of the SoapClient class uses the JDK5-style annotation, Property. I can't find the defintion of this.classSource.append(" @Property ");So I get exceptions when the SoapClient tries to build the deserialiser...
    Object back = new GroovyShell(binding).evaluate(classSource.toString());Also, the syntax of the code generated doesn't seem to be valid in my JDK5.result = new ns1vesselContent (nsnotFoundFlag:"false",nsfoundVessel:new nsfoundVessel(nsparentContainer:new nsparentContainer(ns1barCode:"XXX",ns1parentContainerBarCode:"ZZZ",...From what I've read, the constructor for annotation uses '=' so the code should read

    (nsnotFoundFlag="false",...

    Great idea ! Just wish I could get it to work.

  21. Hi Mike,

    I added a JIRA issue (GROOVY-1677) releated to the problem you described. As a temporary workaround (until the bug is fixed), use Groovy SOAP with the groovy-1.0-JSR-06 release which accepts @Property annotations.

    Cheers,
    Martin

  22. Mike, This issue as been soved please use the latest version of GroovySOAP. Cheers Tog

  23. This is excellent, thank you.  I am using it as the tinest bit of glue to connect algorithms in POJO with MS Excel.

    Can I name the Windows service that is created by server.start()?  This would make it much easier to stop, at the moment the only way I know is to guess which jvm the service is running in.

    Thanks, Peter 

  24. I saved the currency demo code copied from above to a source file conv.groovy and downloaded the groovysoap jar to my groovy lib director, but I get an error:

    [btaylor@office100-59 ~]$ groovy conv.groovy
    Caught: java.lang.NoSuchMethodError: org.w3c.dom.Element.getTextContent()Ljava/lang/String;
            at conv.run(conv.groovy:4)
            at conv.main(conv.groovy)

     [btaylor@office100-59 ~]$ ls /home/btaylor/.groovy/lib/groovysoap*
    /home/btaylor/.groovy/lib/groovysoap-all-1.0-0.3-snapshot_jdk1.5.0.jar

     [btaylor@office100-59 ~]$ groovy -version
    Groovy Version: 1.0 JVM: 1.5.0_09-b01

    I checked and org.w3c.dom.Element does not have a getTextContext(String) method in java 1.5. See http://java.sun.com/j2se/1.5.0/docs/api/org/w3c/dom/Element.html 

    Any ideas? I looked in you SoapClient code, but didn't see the offending code. I also tried building it from the trunk, and I get the same error running it with groovysoap-all-1.0-0.3-snapshot.jar

  25. This isn't strictly speaking a groovySOAP issue, but it occurs while I'm using groovySoap.   I trying to access legacy web services using GS.   However, in the complex return XML the field I need to access is named 'return'.    Groovy gets an interpreter/compiler exception when i try to grab the field.   Some sample code and the response follows.     Net-net how do you can you access a groovy keyword as a regular token?

     def url='http://rhel4dev2.<...>.local:7777/t2services/LoginService?WSDL'
    def remote = new SoapClient(url)

    def result = remote.login(name.value , pass.value)
    def out = result.return

    Tue Mar 06 09:13:07 PST 2007:ERROR:org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, Script1.groovy: 13: unexpected token: return @ line 13, column 18.
    1 error

    Ideas on how to parse out 'return' from the response?

  26. @Roger
    just use
    def out = result.'return'

    If you use the following code, the SoapClient generates a ConnectException and prints a stack trace, but it processes without throwing the exception. It will not reach the catch block. Is that the intended behaviour?

    Greetings.

  27. To Bryan Taylor:

    I have the same problem using groovy 1.0.

    I got a work around by just delete xml-apis-1.0.b2.jar file under groovy_home/lib directory.

    good luck!

  28. Hello Guillaume, I have downloaded the: https://dav.codehaus.org/dist/groovy/jars/groovysoap-all-1.0-0.3.1-snapshot_jdk1.5.0.jar but I'm still having troubles with the packages. If I do the example of the server and  MathService, but put them into packages I have problems. I read the conversation you have in: http://archive.codehaus.org/groovy/user/200703220805.11854.list.groovy@newgenesys.com
    but with the groovysoap jar that you fix Im still having troubles. What can i do? here is the exception I have:
    Cannot parse Interface class:
    interface com.ikatu.kat.WebService.MathServiceInterface {
    double add(double arg0, double arg1);
    double square(double arg0);
    }
    org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, script1187638928061.groovy: 1: unexpected token: interface @ line 1, column 1.
    1 error

    at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:326)
    at org.codehaus.groovy.control.ErrorCollector.addFatalError(ErrorCollector.java:173)
    at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:143)
    at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:155)
    at org.codehaus.groovy.control.SourceUnit.addError(SourceUnit.java:382)
    at org.codehaus.groovy.antlr.AntlrParserPlugin.parseCST(AntlrParserPlugin.java:87)
    at org.codehaus.groovy.control.SourceUnit.parse(SourceUnit.java:279)
    at org.codehaus.groovy.control.CompilationUnit$1.call(CompilationUnit.java:184)
    at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:833)
    at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:480)
    at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:306)
    at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:275)
    at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:270)
    at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:242)
    at groovy.net.soap.SoapServer.setNode(SoapServer.java:185)
    at groovy.net.soap.SoapServer.setNode(SoapServer.java:213)
    at gjdk.groovy.net.soap.SoapServer_GroovyReflector.invoke(Unknown Source)
    at groovy.lang.MetaMethod.invoke(MetaMethod.java:115)
    at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:713)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:560)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:450)
    at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:119)
    at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:111)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:187)
    at com.ikatu.kat.WebService.Server.run(Server.groovy:5)
    at gjdk.com.ikatu.kat.WebService.Server_GroovyReflector.invoke(Unknown Source)
    at groovy.lang.MetaMethod.invoke(MetaMethod.java:115)
    at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:713)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:560)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:450)
    at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:131)
    at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:111)
    at org.codehaus.groovy.runtime.InvokerHelper.runScript(InvokerHelper.java:408)
    at gjdk.org.codehaus.groovy.runtime.InvokerHelper_GroovyReflector.invoke(Unknown Source)
    at groovy.lang.MetaMethod.invoke(MetaMethod.java:115)
    at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:713)
    at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:664)
    at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:111)
    at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:111)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:187)
    at com.ikatu.kat.WebService.Server.main(Server.groovy)
    Cannot parse Implementation class:
    class com.ikatu.kat.WebService.MathServiceImpl implements com.ikatu.kat.WebService.MathServiceInterface {
    def service = new com.ikatu.kat.WebService.MathService()

    double add(double arg0, double arg1)

    Unknown macro: { return service.add(arg0, arg1) }

    double square(double arg0)

    Unknown macro: { return service.square(arg0) }

    }
    org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, script1187638928295.groovy: 1: unexpected token: class @ line 1, column 1.
    1 error

    at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:326)
    at org.codehaus.groovy.control.ErrorCollector.addFatalError(ErrorCollector.java:173)
    at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:143)
    at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:155)
    at org.codehaus.groovy.control.SourceUnit.addError(SourceUnit.java:382)
    at org.codehaus.groovy.antlr.AntlrParserPlugin.parseCST(AntlrParserPlugin.java:87)
    at org.codehaus.groovy.control.SourceUnit.parse(SourceUnit.java:279)
    at org.codehaus.groovy.control.CompilationUnit$1.call(CompilationUnit.java:184)
    at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:833)
    at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:480)
    at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:306)
    at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:275)
    at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:270)
    at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:242)
    at groovy.net.soap.SoapServer.setNode(SoapServer.java:193)
    at groovy.net.soap.SoapServer.setNode(SoapServer.java:213)
    at gjdk.groovy.net.soap.SoapServer_GroovyReflector.invoke(Unknown Source)
    at groovy.lang.MetaMethod.invoke(MetaMethod.java:115)
    at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:713)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:560)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:450)
    at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:119)
    at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:111)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:187)
    at com.ikatu.kat.WebService.Server.run(Server.groovy:5)
    at gjdk.com.ikatu.kat.WebService.Server_GroovyReflector.invoke(Unknown Source)
    at groovy.lang.MetaMethod.invoke(MetaMethod.java:115)
    at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:713)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:560)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:450)
    at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:131)
    at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:111)
    at org.codehaus.groovy.runtime.InvokerHelper.runScript(InvokerHelper.java:408)
    at gjdk.org.codehaus.groovy.runtime.InvokerHelper_GroovyReflector.invoke(Unknown Source)
    at groovy.lang.MetaMethod.invoke(MetaMethod.java:115)
    at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:713)
    at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:664)
    at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:111)
    at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:111)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:187)
    at com.ikatu.kat.WebService.Server.main(Server.groovy)
    Exception in thread "main" java.lang.NullPointerException
    at org.codehaus.xfire.util.ServiceUtils.makeServiceNameFromClassName(ServiceUtils.java:27)
    at org.codehaus.xfire.service.binding.ObjectServiceFactory.makeServiceNameFromClassName(ObjectServiceFactory.java:361)
    at org.codehaus.xfire.service.binding.ObjectServiceFactory.create(ObjectServiceFactory.java:380)
    at org.codehaus.xfire.service.binding.ObjectServiceFactory.create(ObjectServiceFactory.java:356)
    at org.codehaus.xfire.service.binding.ObjectServiceFactory.create(ObjectServiceFactory.java:337)
    at groovy.net.soap.SoapServer.setNode(SoapServer.java:201)
    at groovy.net.soap.SoapServer.setNode(SoapServer.java:213)
    at gjdk.groovy.net.soap.SoapServer_GroovyReflector.invoke(Unknown Source)
    at groovy.lang.MetaMethod.invoke(MetaMethod.java:115)
    at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:713)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:560)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:450)
    at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:119)
    at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:111)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:187)
    at com.ikatu.kat.WebService.Server.run(Server.groovy:5)
    at gjdk.com.ikatu.kat.WebService.Server_GroovyReflector.invoke(Unknown Source)
    at groovy.lang.MetaMethod.invoke(MetaMethod.java:115)
    at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:713)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:560)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:450)
    at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:131)
    at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:111)
    at org.codehaus.groovy.runtime.InvokerHelper.runScript(InvokerHelper.java:408)
    at gjdk.org.codehaus.groovy.runtime.InvokerHelper_GroovyReflector.invoke(Unknown Source)
    at groovy.lang.MetaMethod.invoke(MetaMethod.java:115)
    at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:713)
    at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:664)
    at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:111)
    at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:111)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:187)
    at com.ikatu.kat.WebService.Server.main(Server.groovy)
     

  29. Can somebody please correct the download link? It is broken.

  30. I'm also having problems with the groovy soap download link.  Until someone gets around to fixing, you can download the jar from here:

     http://momupload.com/files/77499/groovysoap-all-1.0-0.3-snapshot_jdk1.5.0.jar.html

  31. I don't know how I missed this before but there's a new module: GroovyWS

    http://docs.codehaus.org/display/GROOVY/GroovyWS

    GroovyWS is taking over GroovySOAP as CXF replaces XFire. The major difference here is that GroovyWS is using Java5 so if you need to stick to 1.4 please continue to use GroovySOAP.

  32. We are using groovysoap from the http://rep1o.maven.org/groovy/groovysoap-all-jsr06/0.1

    I have taken the SoapClient.java used here, and created an AuthSoapClient which supports http basic authentication. Username and password are constructor parameters. It can be downloaded here: http://momupload.com/files/104065/AuthSoapClient.java.html

  33. Hi Kees,

    Thanks for this contribution. Btw have you try to use GroovyWS which is taking over GroovySOAP. Basic authentication is included in GroovyWS.

  34. Thanks, I know that but we are limited to java 1.4.

  35. I think that to receive the loans from creditors you must have a firm reason. Nevertheless, one time I have received a bank loan, because I was willing to buy a bike.
  36. Hi,
       I m new to groovy..i m using groovy 1.8.6 version.. i want to invoke web service using SoapClient..but its showing this error:

     
    Retrieving schema at 'http://localhost:8089/GroovySampleWS/services/GroovySOAP?xsd=Groovy.xsd'.
    Exception thrown
    Apr 11, 2012 6:56:09 PM org.codehaus.groovy.runtime.StackTraceUtils sanitize

    WARNING: Sanitizing stacktrace:

    java.lang.NoSuchMethodError: org.codehaus.groovy.runtime.InvokerHelper.getInstance()Lorg/codehaus/groovy/runtime/Invoker;

        at groovy.net.soap.SoapClient.invokeMethod(Unknown Source)

        at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45)

        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)

        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)

        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)

        at ConsoleScript7.run(ConsoleScript7:5)

        at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:266)

        at groovy.lang.GroovyShell.run(GroovyShell.java:517)

        at groovy.lang.GroovyShell.run(GroovyShell.java:172)

        at groovy.lang.GroovyShell$run.call(Unknown Source)

        at groovy.ui.Console$_runScriptImpl_closure17.doCall(Console.groovy:927)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)

        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)

        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)

        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:877)

        at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)

        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)

        at groovy.ui.Console$_runScriptImpl_closure17.doCall(Console.groovy)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)

        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)

        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)

        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:877)

        at groovy.lang.Closure.call(Closure.java:412)

        at groovy.lang.Closure.call(Closure.java:406)

        at groovy.lang.Closure.run(Closure.java:490)

        at java.lang.Thread.run(Thread.java:619)

    java.lang.NoSuchMethodError: org.codehaus.groovy.runtime.InvokerHelper.getInstance()Lorg/codehaus/groovy/runtime/Invoker;

        at ConsoleScript7.run(ConsoleScript7:5)

     


    I dono what's the problem..Suggest for this problem to resolve..



    Thank you,
    Sivaranjani
  37. Hello,

    Try using https://github.com/jwagenleitner/groovy-wslite as GroovySOAP is deprecated now.

    Guillaume