ok. Thanks.

Here's the problem.

Title:
Invalid WSDL create for abstract class

Description:
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. Adding abstract attribute before creating
complexContent element
        * See Java Virtual Machine specification:
        *
http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html#75734
        */
       if (((info.getTypeClass().getModifiers() & Modifier.ABSTRACT) != 0)
&&
               !info.getTypeClass().isInterface())
       {
           complex.setAttribute(new Attribute("abstract", "true"));
       }

       /**
        * 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;
       }



On 2/22/07, Tomek Sztelak <[EMAIL PROTECTED]> wrote:

Hi
If you still have a problem with filling jira issue, i can do it for you.
Just send mi details.

On 2/22/07, Joost den Boer <[EMAIL PROTECTED]> wrote:
> Hey,
>
> I just wanted to create an XFire issue with fix, but I can't see XFire
in
> the project list anymore.
> Is this a personal restriction ? Is there a stop on XFire issues ? Or is
it
> because the XFire - Celtix merge ?
>
> Regards,
> Joost
>
> --
> E-id! Internet Strategies BV
> www. e-id.nl
> T: 0347 344345
> F: 0347 343 655


--
-----
When one of our products stops working, we'll blame another vendor
within 24 hours.

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email




--
E-id! Internet Strategies BV
www. e-id.nl
T: 0347 344345
F: 0347 343 655

Attachment: BeanType.java
Description: Binary data

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to