Ok, that's the problem-- it does work if I change the descriptor, but I don't want to do that-- many other portal vendors have gotten the file I provided to work and it is also given in the portlet specification document (maybe they are not using castor, who knows?) I just need a way to get this parsed the way it is now...
Thanks, Jason
Bender Heri wrote:
I meant do change the XML-File not the Schema (xsd).
Heri
-----Original Message----- From: Jason Novotny [mailto:[EMAIL PROTECTED] Sent: Monday, March 21, 2005 7:13 PM To: [email protected] Subject: Re: [castor-user] xml unmarshalling problems
Hi Heri,
Thanks very much for your help-- I'd like to drill down to solve this problem. However, I have to use the XSD and schema I provided as it is. I cannot change the namespace since it is part of the actual JSR 168 specification.... any ideas possibly on flags I can add to castor.properties or generated code I can modify that may help?
Thanks, Jason
Bender Heri wrote:
Just a guess: The second entry of the schemaLocationattribute defines the real location where the schema can be found. Since this location exists, the parser finds the schema. Therein the attribute elementFormDefault="qualified" says, that the element tags must be qualified. When you delete the second entry, the parser will not look for the real schema file, and you be fine.
Try to qualify your tag names with "portlet:" and define thenamespace also qualified: xmlns:portlet=...
XSD that isor what you mean by "it chokes"? What happens?
Hope that helps
Heri
-----Original Message----- From: Jason Novotny [mailto:[EMAIL PROTECTED] Sent: Saturday, March 19, 2005 12:58 AM To: [email protected] Subject: [castor-user] xml unmarshalling problems
I've used Source Generator to generate my classes from an
to true onprovided as part of the JSR 168 portlet specification. However it chokes when unmarshalling the following:
<?xml version="1.0" encoding="UTF-8"?>
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
version="1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet
-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
<portlet>
...
Notice that xsi:schemaLocation attribute has 2 urls separated by a space or newline I guess. When I change it to just one url it works:
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet
-app_1_0.xsd"
Any idea what the problem could be-- I tried setting debug
-----------the castor.properties file but that didn't give me any useful info.
Thanks, Jason
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
-------------------------------------------------------------
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
------------------------------------------------------------------------
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
