[ http://jira.codehaus.org/browse/XFIRE-765?page=comments#action_82414 ]
Devon Berry commented on XFIRE-765:
-----------------------------------
OK, I've read and debugged a little further. My previous assessment is
incorrect.
Here is my revised assessment:
- The CustomTypeMapping in my environment has the following chain of type
creators:
XMLTypeCreator -> Java5TypeCreator -> DefaultTypeCreator
- The Java5TypeCreator implementation appears correct. If it cannot infer a
Java 5 type, it defers to the next creator in the chain (I'm assuming this is
the intended design pattern).
- XMLTypeCreator does not delegate to the next type creator when it can't
resolve a type. Instead, it calls super.###. I'm guessing is a holdover from
before the delegation chain pattern existed?
- XMLTypeCreator appears, however, to be able to resolve collections to a
parameterized type on its own without help from the Java 5 Type Creator (they
both call the same method in their respective implementations).
The aforementioned behavior causes the bug we are seeing because the
Java5TypeCreator never gets its chance at bat due to XMLTypeCreator. If I
change the relevant Map methods in XMLTypeCreator so that it is a good citizen
and delegates to the next person in line, it should work.
Could I get a verification of my assessment from somebody who understands some
of the history of this implementation so I don't go about causing an avalanche?
> Service interface generics map generates anyType2anyTypeMap WSDL
> ----------------------------------------------------------------
>
> Key: XFIRE-765
> URL: http://jira.codehaus.org/browse/XFIRE-765
> Project: XFire
> Issue Type: Bug
> Components: Aegis Module
> Affects Versions: 1.2.2
> Environment: xbean-spring-2.7-20061026.103714-1.jar
> Tomcat 5.5.17
> Java 1.5
> Reporter: Wesley Miaw
> Assigned To: Dan Diephouse
> Priority: Minor
>
> I have the following two interface signatures:
> HashMap<Integer,Source> findMostRecentSources(int[] ids) throws SQLException;
> boolean createTask(ArrayList<Task> tasks) throws SQLException;
> The ArrayList<Task> is correctly turned into an ArrayOfTask, but for some
> reason the returned HashMap is turned into anyType2anyTypeMap from the WSDL.
> e.g.
> <xsd:complexType name="anyType2anyTypeMap">
> <xsd:sequence>
> <xsd:element maxOccurs="unbounded" minOccurs="0" name="entry">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element maxOccurs="1" minOccurs="0" name="key"
> type="xsd:anyType"/>
> <xsd:element maxOccurs="1" minOccurs="0" name="value"
> type="xsd:anyType"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> </xsd:sequence>
> </xsd:complexType>
> I was able to make it generate the correct int2TaskMap by treating it as a
> Java 1.4 collection and explicitly specifying the key and component types in
> the Interface.aegis.xml file.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email