WSDL Parser Errorhttps://www.eclipse.org/forums/index.php/mv/msg/68526/214876/#msg_214876
If i import a wsdl document using wsdl:import, and if the importing
doucment doesn't use any component from the imported document then

javax.wsdl.Import.getDefinition() returns null

I dont know if there is any rational behind this but i presume this to be
a bug.

I don't say for sure the intent in WSDL, but in XSD itself, imports are
only resolved as they are needed to look up names in that namespace. An
import that isn't resolved results in a warning. Oddly an import that
fails to resolve (as opposed to just isn't needed) is not considered an
error in the XML Schema specification so that too generates only a
warning; the actual references that fail to resolve are errors of
course. Perhaps this import only on demand behavior is the same thing
going on in what you describe...

Keshavrao Veerapaneni wrote:
> Hi,
>
> If i import a wsdl document using wsdl:import, and if the
> importing doucment doesn't use any component from the imported
> document then
>
> javax.wsdl.Import.getDefinition() returns null
>
> I dont know if there is any rational behind this but i presume this to
> be a bug.
>
>
> Thanks and regards,
> Keshav Veerapaneni.
>]]>2008-06-06T13:46:37-00:00Re: WSDL Parser Errorhttps://www.eclipse.org/forums/index.php/mv/msg/68526/214991/#msg_214991
Originally posted by: dcarver.starstandard.org

Ed Merks wrote:
> Keshav,
>
> I don't say for sure the intent in WSDL, but in XSD itself, imports are
> only resolved as they are needed to look up names in that namespace. An
> import that isn't resolved results in a warning. Oddly an import that
> fails to resolve (as opposed to just isn't needed) is not considered an
> error in the XML Schema specification so that too generates only a
> warning; the actual references that fail to resolve are errors of
> course. Perhaps this import only on demand behavior is the same thing
> going on in what you describe...
>
>

Ed is correct on this, imports are only resolved as they are needed.
The imports are treated the same as an xsd import. In fact in the
wsdl:type, one should be using xsd:includes and xsd:imports instead of
the wsdl:import for those sections.]]>2008-06-08T23:10:11-00:00Re: WSDL Parser Errorhttps://www.eclipse.org/forums/index.php/mv/msg/68526/215235/#msg_215235
> Ed Merks wrote:
>> Keshav,
>>
>> I don't say for sure the intent in WSDL, but in XSD itself, imports are
>> only resolved as they are needed to look up names in that namespace. An
>> import that isn't resolved results in a warning. Oddly an import that
>> fails to resolve (as opposed to just isn't needed) is not considered an
>> error in the XML Schema specification so that too generates only a
>> warning; the actual references that fail to resolve are errors of
>> course. Perhaps this import only on demand behavior is the same thing
>> going on in what you describe...
>>
>>

> Ed is correct on this, imports are only resolved as they are needed.
> The imports are treated the same as an xsd import. In fact in the
> wsdl:type, one should be using xsd:includes and xsd:imports instead of
> the wsdl:import for those sections.
But isnt it a restriction from the parser that the user has to explicitly
parse the referred document in case if he is not using any of the
components from the imported doucment.
As such when the specification doesn't put any restriction on using the
components from the imported documents, from the usability point of view
it would relive the user from the pain of parsing the documents again if
the parser resolves the document.]]>Keshavrao 2008-06-13T06:19:46-00:00Re: WSDL Parser Errorhttps://www.eclipse.org/forums/index.php/mv/msg/68526/215250/#msg_215250
Originally posted by: merks.ca.ibm.com

Keshav,

Comments below.

Keshav Veerapaneni wrote:
> David Carver wrote:
>
>> Ed Merks wrote:
>>> Keshav,
>>>
>>> I don't say for sure the intent in WSDL, but in XSD itself, imports
>>> are only resolved as they are needed to look up names in that
>>> namespace. An import that isn't resolved results in a warning.
>>> Oddly an import that fails to resolve (as opposed to just isn't
>>> needed) is not considered an error in the XML Schema specification
>>> so that too generates only a warning; the actual references that
>>> fail to resolve are errors of course. Perhaps this import only on
>>> demand behavior is the same thing going on in what you describe...
>>>
>>>
>
>> Ed is correct on this, imports are only resolved as they are needed.
>> The imports are treated the same as an xsd import. In fact in the
>> wsdl:type, one should be using xsd:includes and xsd:imports instead
>> of the wsdl:import for those sections.
> But isnt it a restriction from the parser that the user has to
> explicitly parse the referred document in case if he is not using any
> of the components from the imported doucment.
The specification doesn't always seem particularly well focused on the
user. For example, the fact that an import that fails to resolve at all
is not an error seems odd. If you compounded that with an expectation
that it generally would always try resolve and if it did successfully,
but there were errors in the resolved result, you'd know about that,
you'd never be quite sure if the lack of errors truly meant there were
no error.
>
> As such when the specification doesn't put any restriction on using
> the components from the imported documents, from the usability point
> of view it would relive the user from the pain of parsing the
> documents again if the parser resolves the document.
The XSD model does produce a warning on imports that aren't resolved.
And in the EMF XSD importer, the code explicitly forces the imports to
resolve for much the reason you describe. Tools can do pretty much
whatever they want on top of the base frameworks....

Adding pointless imports to a schema or WSDL document seems like not a
good approach on the user's part though. An import whose resolution has
no impact on the importing schema will clearly have no effect on the
validity of that schema...]]>2008-06-13T10:46:20-00:00