aspose file tools*
The moose likes XML and Related Technologies and the fly likes XML Schema error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML Schema error " Watch "XML Schema error " New topic
Author

XML Schema error

Martin Hat
Greenhorn

Joined: Sep 23, 2013
Posts: 1
I am trying to send XMl data but keep getting the error shown below

docType to application/pdf
<RaisedBy>CH_XML_Gateway</RaisedBy>
<Number>100</Number>
<Type>fatal</Type>
<Text>XML failed schema validation: Invalid XML: Datatype error: Type:InvalidDatatypeValueException, Message:Value 'application/pdf' is not in enumeration . line 251 column 47</Text>
<Location></Location>

From what is shown above I dont know if anyone can help.

Thanks
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18987
    
    8

Hi Martin, welcome to the Ranch!

From what I can see there, here's what's going on.

Something is editing an XML document and it's using an XML schema to do that. Now, we can't see any of those three things in your post but we can see the result: the schema says that in Line 251 of the document, you've used "application/pdf" as the value of something and you aren't allowed to do that. It looks like the schema contains an approved list of what you can put in that location, and "application/pdf" isn't in that list.

So, you should have a look at the XML document and fix it. Or maybe somebody else created the document and ran it through your application? If that's the case then you would have to send the document back and get them to fix it. Anyway if that doesn't help, maybe you could tell us some more about the background for this question?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XML Schema error