Forum Home » Fuse Distributions » Fuse Services Framework

Thread: Using cxf java2wsdl causes anonymous type exception when deploying

This question is not answered. Helpful answers available: 2. Correct answers available: 1.

Permlink Replies: 0 Threads: [ Previous | Next ]

Posts: 4
Registered: 10/19/09
Using cxf java2wsdl causes anonymous type exception when deploying
Posted: Nov 3, 2009 7:45 PM
  Click to reply to this thread Reply

Issue 1:
I am generating all code from wsdl with multiple schemas and discovered when deploying a cxf-se if there are any anonymous types, an illegalargumentexception is thrown from com.sun.xml.txw2.Document.writeValue:125. That is, if any of the generated annotations contains @XmlType(name=""), you get the exception.

After determining why the Java files were generated this way, I modified the schemas to not use anonymous types and things look peachy.

Is it safe to assume this is user error and the schemas were invalid? or should the cxf JAXBUtils be able to handle these case?

Issue 2:
If I add a redefine for one of the schemas for the type House for example, cxf generates a, and My problem is with, it is generated w/ an @XmlType(name="") annotation which brings me back to the error described above.

How can I a) add type name information myself (jaxb custom binding??) or b) make cxf work w/ anonymous types?

Some reference links: