cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <>
Subject Re: How to do java first with imported XSD schema correctly?
Date Tue, 15 Nov 2011 22:07:58 GMT
On Tuesday, November 15, 2011 8:52:10 AM Conficio wrote:
> Hi guys,
> I'm working with CXF 2.4.3 on Java first web services (attached Eclipse
> project
> )  and can't get around the following error when attempting
> to generate WSDL with referenced XSD files.
> SEVERE: Schema element {}appFault references undefined
> type {}appFaultDetails for service
> {}RoleApiService.
> I want/need to do this, because several services do share the Fault,
> FaultDetails and error code beans.
> Here are my questions:
> * Why is java2ws not seeing the appFaultDetails (generating the severe
> message above)?
> * Why is java2ws not generating the import statement for the fault.xsd?
> * Why is the import statement for the role.xsd not using the stated location
> from the file?

These are all related I think.   When we call the JAXBContext.generateSchmema 
method, it seems to only be calling back into the output resolver for the 
schemas it actually generates.   Kind of strange, but OK.   In your case, due 
to the package-info stuff, it's not generating those schemas.   Without that 
callback, currently, CXF doesn't know anything about it and it will fail to 
include those schemas into the resulting wsdl in any fassion. 

Definitely log a bug about this if you can.   It's going to require some 
thought about how to deal with it though.   In particular, a "runtime java 
first" case like this is going to require quite a bit of code to get the ?wsdl 
and ?xsd things to resolve correctly as it's a mixed bag of stuff with some 
stuff JAXB generated and some stuff provided.

> In addition how is the Validator coming up with the idea that this is valid
> WSDL, when the Eclipse validation clearly shows it is not.

CXF just validates the wsdl parts of it, not the schema. 

> Thanks for helping me out on this one. Let me know if I'm doing something
> odd/bad or if this is a bug in java2ws?

Bug, or restriction.


> K<o>
> --
> View this message in context:
> ma-correctly-tp4994906p4994906.html Sent from the cxf-user mailing list
> archive at
Daniel Kulp
Talend -

View raw message