Is anyone else using generics and WSGen and having issues with the resulting WSDL not being correct by putting *object* as the type instead of the actual class type?
Daniel King, R2D2, C3P0 Application Engineer Web Team Nemours Office: (904) 288-5643 Fax: (904) 288-5758 *** Call me Daniel *** NOTICE...This electronic transmission is intended only for the person(s) named. It may contain information that is (i) proprietary to the sender, and/or (ii) privileged, confidential and/or otherwise exempt from disclosure under applicable State and Federal law, including, but not limited to, privacy standards imposed pursuant to the federal Health Insurance Portability and Accountability Act of 1996 (HIPAA). Receipt by anyone other than the named recipient(s) is not a waiver of any applicable privilege. If you received this confidential communication in error, please notify the sender immediately by reply e-mail message and permanently delete the original message from your system. ________________________________ From: Daniel King [mailto:[EMAIL PROTECTED] Sent: Friday, May 04, 2007 2:55 PM To: [email protected] Subject: [xfire-user] WS Generation - Generics issue Either I'm doing something wrong or the generation isn't correct. I'm using XFire 1.2.5 and Java 1.6. The following code is just an example: I have the following interface: public interface IDataList<T> { List<T> getList(); int getTotalResultSize(); int getStartIndex(); int getPageOffset(); } I created an implementation class: public class PatientDataList<IPatient> { public List<IPatient> getList() {//...code here} public int getTotalResultSize() {//...code here } public int getStartIndex() {//...code here } public int getPageOffset() {//...code here } } The WSDL generated from this doesn't include IPatient. It turns the T into an ArrayOfAnyType. When I generate the client from the WSDL using MyEclipse or WSGen directly on cmd prompt, the IDataList object comes back fine. I can get a List from the ArrayOfAnyType and the class is of type ArrayList. However the list is List<Object> not List<IPatient>. I can't cast the list to anything else and the actual object in the list is a xerces node implementation object. If I drop the <T> on the interface and implementation class and change the List<T> to List<IPatient> within the IDataList class everything works fine. public interface IDataList { List<IPatient> getList(); int getTotalResultSize(); int getStartIndex(); int getPageOffset(); } I created an implementation class: public class PatientDataList { public List<IPatient> getList() {//...code here} public int getTotalResultSize() {//...code here } public int getStartIndex() {//...code here } public int getPageOffset() {//...code here } } Has anyone else run into this issue? I've read JIRA issues where this was a problem in earlier versions but fixed in 1.2.5. I also had to set nillable="false" in the WSDL where minOccurs="0" and nillable="true" on IDataList and IPatient elements. Thanks, Daniel King, R2D2, C3P0 Application Engineer Web Team Nemours Office: (904) 288-5643 Fax: (904) 288-5758 *** Call me Daniel *** NOTICE...This electronic transmission is intended only for the person(s) named. It may contain information that is (i) proprietary to the sender, and/or (ii) privileged, confidential and/or otherwise exempt from disclosure under applicable State and Federal law, including, but not limited to, privacy standards imposed pursuant to the federal Health Insurance Portability and Accountability Act of 1996 (HIPAA). Receipt by anyone other than the named recipient(s) is not a waiver of any applicable privilege. If you received this confidential communication in error, please notify the sender immediately by reply e-mail message and permanently delete the original message from your system.
