History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: XFIRE-885
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dan Diephouse
Reporter: Joost den Boer
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
XFire

Invalid WSDL create for abstract class

Created: 23/Feb/07 04:00 AM   Updated: 26/Feb/07 01:01 PM
Component/s: Aegis Module
Affects Version/s: 1.2.4
Fix Version/s: 1.2.5

Time Tracking:
Not Specified

File Attachments: 1. Java Source File BeanType.java (25 kb)

Environment: JDK 1.4 and 5


 Description  « Hide
On XFire 1.2.4. when an abstract class extends another (abstract) class, the WSDL generated for this class is not confirm WSDL standards.
The 'abstract' attribute is added to the 'complexContent' element in stead to the 'complexType' element.
Validator like XmlSpy and IBM Rad detect this WSDL error.

Cause:
The error is caused by BeanType.writeSchema(Element) method. If the type is an extention, a 'complextContent' element is created which then become the 'root' element for the rest of this method.
The 'abstract' attribute is added to this root element after it has been replaced by the 'complexContent' element. Therefore this error only occurs if the abstract class extends another (abstract) class itself.

Fix:
The fix is easy. The small codeblock to add the 'abstract' attribute is put before the codeblock which creates the 'complexContent' element.
I attached the complete code of the BeanType class including this fix.
Code snippit :

/*

/**

  • WSDL error fix : create complexContent after abstract attribute is added to complexType element
    */
    if (info.isExtension() && sooperType != null) { Element complexContent = new Element("complexContent", SoapConstants.XSD_PREFIX, SoapConstants.XSD); complex.addContent(complexContent); complex = complexContent; }

I attached the BeanType source including this fix.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Dan Diephouse - 23/Feb/07 08:13 AM
Thanks Joost. Scheduling for 1.2.5

Dan Diephouse - 26/Feb/07 01:01 PM
Thanks, fixed in SVN. Release coming very soon.