Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JAXB namespace issue

 
Richard Roszak
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have reference to a namespace that is in a different directory then the xsd that I’m trying to bind. When I try binding I get the following error:

[ERROR] src-resolve: Cannot resolve the name ‘ms:MyMethod.Enumeration’ to a(n) type definition component.


My xsd looks like this:




The line it fails is as follows:





MS.xsd is located ..\..\..\MS directory above where this xsd is located. Not sure on how I need to use xjc to generate the java files while finding the MS.xsd?

Thanks
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
A quick reply: When I see your XML schema with the import of the MS.xsd schema file, I get the feeling that the MS.xsd file should be located in the same directory as the other XML schema.
An alternative may be to change the schema location in the import statement so that the MS.xsd schema is found.
Best wishes!
 
Richard Roszak
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ivan. You are correct. If I move the MS.xsd to current directory or give a relative path in the schemaLocation it works correctly.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic