Posted by vivekp
on May 25, 2007 at 11:45 PM PDT
There are some WSDLs with unresolved xs:schema references, that is no import for the xs:schema entity in the WSDL or associated schema. You can deal with such WSDLs with wsimport. Here is how...
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
wsimport -b " title="http://www.w3.org/2001/XMLSchema.xsd ">http://www.w3.org/2001/XMLSchema.xsd -b customization.xjb SecureConversation.wsdl
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.