• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

javax.xml.validation doubt!

 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I am trying to validate the Xml instance against a XSD which is in the local(system). I get a error.


'samlp:ResponseType' is the root element of the xml.

My Code in the validation program sets the features and properties as


The "schemaUrl" is the path of the xsd location in string. the xsd exist in that location.I think the error is because it is unable to locate the xsd. can any one explain me how to solve the problem or the real problem is something else?

thanks in advance.
Arjun.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Two questions occur to me - in the line

are you sure that url format is correct.

The setProperty call with
"external-noNamespaceSchemaLocation"

now I don't know what that is supposed to do, but you appear to have a namespace in "samlp:ResponseType"

Bill
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, I don't know much about XML Schema. But from what I can see, shouldn't the value of the external-noNamespaceSchemaLocation property be a URL? You don't show us what value you used, but you said it was a path. A path is not a valid URL, but you can make it into one (a "file:" URL) fairly easily.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic