XFire

Collection Generics resolve to xsd:ArrayOfTypeAny instead of ns1:ArrayOfGenerisizedType in the wsdl

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.2.1
  • Fix Version/s: 1.2.2
  • Component/s: Aegis Module, Annotations
  • Labels:
    None
  • Environment:
    OSX 10.4.7
    Eclipse 3.2.0
    Jetty-6.0.0
  • Number of attachments :
    0

Description

Collection generics which work in 1.2 no longer work in 1.2.1 when generating the wsdl. This can be replicated by annotating a service that has a @WebMethod that returns Collection<SomeObject> or annotating a bean (parameter or return type) that contains an attribute that is Collection<SomeObject>.

After some debugging (we are new to the xfire source) we believe we have traced the problem to changes in the org.codehaus.xfire.aegis.type.XMLTypeCreator. When entering the createCollectionTypeMethod(TypeClassInfo), the TypeClassInfo contains a genericType which is an instance of ParameterizedTypeImpl. In 1585, it is compared against Class, which is false, and moves on to the nextCreator. In our case nextCreator is a Java5TypeCreator. In the labeled version for 1.2.1 (1891), the info.getGenericType is passed into AbstractTypeCreator.createCollectionTypeFromGeneric(TypeClassInfo), which returns null since it is not aware of the ParameterizedTypeImpl. This causes the type to be returned as null and not move on to the child TypeCreator.

Activity

Hide
Dan Diephouse added a comment -

I've fixed this in SVN. Here is a patched build:

http://snapshots.repository.codehaus.org/org/codehaus/xfire/xfire-all/1.2-SNAPSHOT/xfire-all-1.2-20060929.210820-24.jar

We'll be doing 1.2.2 late this weekend. Thanks!

Show
Dan Diephouse added a comment - I've fixed this in SVN. Here is a patched build: http://snapshots.repository.codehaus.org/org/codehaus/xfire/xfire-all/1.2-SNAPSHOT/xfire-all-1.2-20060929.210820-24.jar We'll be doing 1.2.2 late this weekend. Thanks!
Hide
Brad Sneade added a comment -

Works great, you rock! Looking forward to the 1.2.2 release.

Show
Brad Sneade added a comment - Works great, you rock! Looking forward to the 1.2.2 release.
Hide
Dan Diephouse added a comment -

Well if I rocked, this probably wouldn't be an issue in the first place. Its kind of an embarassing bug actually and I was surprised to find there wasn't a unit test for it.

Show
Dan Diephouse added a comment - Well if I rocked, this probably wouldn't be an issue in the first place. Its kind of an embarassing bug actually and I was surprised to find there wasn't a unit test for it.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: