When doing java-first stuff, the WSDL that we generate uses inline schemas as it simplified things quite a bit. When inlining the schemas, there shouldn't be schemaLocations on the imports. JAXB sticks kind of "fake" schemaLocations there that we strip off.
Dan On Friday, August 26, 2011 1:09:09 AM [email protected] wrote: > In AbstractDataBinding.addSchemaDocument, all schemaLocation attributes > from any import statements are removed as some kind of "patch" (the > schemaLocation attribute was generated before). > > (1) anyone knows what patch the code speaks about (variable patchRequired) Just a detection if we need to patch the imports (aka: remove them) Since removing them involves copying the DOM, walking it, etc..., it can be a bit expensive so if there isn't an import, we can skip a lot of it. > (2) if the WSDL is read from a WS client, the import element cannot > resolve the declared namespace to an XSD since the schemaLocation > attribute is removed. I do not understand the logic of this patch...? If a wsdl is read and is completely valid, this code should likely not even get hit. -- Daniel Kulp [email protected] http://dankulp.com/blog Talend - http://www.talend.com
