Groovy Modules

Set the value of a WSDL enumeration restricted simple type doesn't work

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: GroovyWS
  • Labels:
    None
  • Testcase included:
    yes
  • Patch Submitted:
    Yes
  • Number of attachments :
    1

Description

WSClient create method does not handle XSD enumerated restricted simple type.

A problem description is here:
http://www.nabble.com/How-do-I-set-the-value-of-a-WSDL-restricted-simple-type-tp18947577p18947577.html

Attached is a patch file with a new method "createEnum". Not sure if this is the best approach, but with it, I can generate requests that contains enumerated restricted simple types.

Also in the patch is a JUnit4 java test.

Please note that the patch file also include patch for GROOVY-3204.

Activity

Hide
Guillaume ALLEON added a comment -

0.5.1-SNAPSHOT just released for test and should solve this issue
Thanks for your patch

see http://www.nabble.com/-ANN--GroovyWS-0.5.1-snapshots-td23386605.html

Show
Guillaume ALLEON added a comment - 0.5.1-SNAPSHOT just released for test and should solve this issue Thanks for your patch see http://www.nabble.com/-ANN--GroovyWS-0.5.1-snapshots-td23386605.html
Hide
Tomislav Nakic-Alfirevic added a comment -

Hi, if I understand it correctly, this issue is closely related to Issue #2 of GMOD-82. GMOD-82 is labeled as "closed", but I can't confirm correct behaviour with enums and I've described the problem here: http://jira.codehaus.org/browse/GMOD-82?focusedCommentId=250553&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_250553

I am afraid the comment is not being noticed because the issue is open and I could really use enum support: most of our web services here work with objects with enum properties, making GroovyWS basically impossible to use. Could someone just confirm that the problem still exists or point out what I've been doing wrong when trying to work with enums?

Show
Tomislav Nakic-Alfirevic added a comment - Hi, if I understand it correctly, this issue is closely related to Issue #2 of GMOD-82. GMOD-82 is labeled as "closed", but I can't confirm correct behaviour with enums and I've described the problem here: http://jira.codehaus.org/browse/GMOD-82?focusedCommentId=250553&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_250553 I am afraid the comment is not being noticed because the issue is open and I could really use enum support: most of our web services here work with objects with enum properties, making GroovyWS basically impossible to use. Could someone just confirm that the problem still exists or point out what I've been doing wrong when trying to work with enums?
Hide
Tomislav Nakic-Alfirevic added a comment -

Please disregard the previous comment, I have managed to use enums with GroovyWS (ver.0.5.2). For anyone who might wander here looking for a prod in the right direction, the correct way to use enums with GroovyWS is as follows:

...
wsProxy = new WSClient(wsdlUrl, this.class.classLoader)
wsProxy.initialize()
def anObject = wsProxy.create("some.package.AClass")
def anEnum = wsProxy.create("some.package.AnEnum")
anObject.anEnumProperty = anEnum.AN_ENUM_VALUE
...

Show
Tomislav Nakic-Alfirevic added a comment - Please disregard the previous comment, I have managed to use enums with GroovyWS (ver.0.5.2). For anyone who might wander here looking for a prod in the right direction, the correct way to use enums with GroovyWS is as follows: ... wsProxy = new WSClient(wsdlUrl, this.class.classLoader) wsProxy.initialize() def anObject = wsProxy.create("some.package.AClass") def anEnum = wsProxy.create("some.package.AnEnum") anObject.anEnumProperty = anEnum.AN_ENUM_VALUE ...

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated: