Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » WSDL Parser Error
WSDL Parser Error [message #214876] Fri, 06 June 2008 06:20 Go to next message
Keshavrao  is currently offline Keshavrao Friend
Messages: 34
Registered: July 2009
Member
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.
Re: WSDL Parser Error [message #214882 is a reply to message #214876] Fri, 06 June 2008 13:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

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...


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.
>
Re: WSDL Parser Error [message #214991 is a reply to message #214882] Sun, 08 June 2008 23:10 Go to previous messageGo to next message
Eclipse UserFriend
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.
Re: WSDL Parser Error [message #215235 is a reply to message #214991] Fri, 13 June 2008 06:19 Go to previous messageGo to next message
Keshavrao  is currently offline Keshavrao Friend
Messages: 34
Registered: July 2009
Member
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.
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.
Re: WSDL Parser Error [message #215250 is a reply to message #215235] Fri, 13 June 2008 10:46 Go to previous message
Eclipse UserFriend
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...
Previous Topic:Javascript editor
Next Topic:web service question
Goto Forum:
  


Current Time: Fri Apr 19 14:31:01 GMT 2024

Powered by FUDForum. Page generated in 0.02009 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top