How to deal with unresolved xs:schema references in WSDL
I have been thinking of writing this blog for quite sometime to the benefit
of those who have been having troubles importing WSDLs that references xs:schema
but do not have corresponding import for such entities. This causes wsimport
tool to report error. Mark from portal team reported the same issue while
importing Share Point services and also WSIT and other users have reported the
So this is what happens, when wsimport is run on a WSDL that references
xs:schema and does not provide a corresponding import:
Gives the following error:
[ERROR] undefined element declaration 'xs:schema'
line 1 of
To fix this, you would do two things
- Run wsimport with -b option and pass the URL of
XML Schema. This is to
take care of missing import.
- There are potential name conflicts in schema for schema. this was
here at length and Kohsuke has provided a JAXB
customization to resolve such conflicts.
So your wsimport command will be
You can do the same with NB 5.5.1, you would need to provide local copies of
these schema and customization files. If you are facing this issue try it and
know if you see any issue.