Take a look at /framework/service/src/org/ofbiz/service/engine/ GroovyEngine.java... all you need to do to is create a map called "result" in your groovy script and put your OUT parameters there.

The error below is just a type mismatch... groovy strings in with variables in them (${ex}) are GStrings, not Strings. You can fix this by calling .toString() on the groovy string before putting it into the result map.


On Apr 14, 2010, at 10:24 AM, Kranti Agrawal wrote:

Can you please give some examples of groovy services which return a List?

Regards,
Kranti Agrawal
Student, IIIT Bangalore
krantiagrawal.blogspot.com


On Wed, Apr 14, 2010 at 7:53 PM, Robert Morley <[email protected]> wrote:

We had a period of time where people wrote some services in groovy.
However, in our Obiz code we report the same error as what is listed here (with testGroovy). The groovy services we currently have in play (for the
most part) have no OUT parameters and the ones that do return a
GenericEntity, a List, and an Integer (all of those I would suspect are working). Appears we have a bug here dealing with String OUT parameters
(granted it must have worked at one point in time).


On Apr 14, 2010, at 9:42 AM, Kranti Agrawal wrote:

Hi,
I tried running the service 'testGroovy' in the Service Engine under
webtools, I got the following error

<li>Service dispatcher threw an exceptionType check failed for field
[testGroovy.successMessage]; expected type is [String]; actual type is
[org.codehaus.groovy.runtime.GStringImpl]




Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to