Hi Keith,
 Thanks for your detailed reply.
Ranjith Pillai.

-----Original Message-----
From: Keith Visco [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 23, 2003 12:38 PM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] Unmarshall-Name space problem.


Hi Ranjith,

The problem is that your XML file is using a "default" namespace,
meaning all elements in the XML file belong to the specified namespace.
The schema, on the other hand, doesn't specify a targetNamespace at all.

So when reading your XML, Castor is coming across a set of elements
(such as the "name" element) in the webservice15 namespace, and it's
comparing those elements against the descriptors generated by the
SourceGenerator for your schema. Since the schema didn't specify a
namespace, Castor is determining that the elements don't match and
therefore it can't find the proper descriptors.

Your best bet is to add a targetNamespace to the schema, and to set the
elementFormDefault to qualified, then re-generate the source code from
the schema.

--Keith



"PILLAI,RANJITH (HP-PaloAlto,ex1)" wrote:
> 
> Hi Keith,
> 
> Thanks for getting back... Here is my Schema...
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns="http://www.w3.org/2001/XMLSchema";>
>         <element name="person">
>                 <complexType>
>                         <sequence>
>                                 <element name="name" type="string"/>
>                                 <element name="address" type="string"/>
>                                 <element name="ssn" type="string"/>
>                                 <element name="email" type="string"/>
>                                 <element name="home-phone"
type="integer"/>
>                                 <element name="work-phone"
type="integer"/>
>                         </sequence>
>                 </complexType>
>         </element>
> </schema>
> 
> I created this schema from the following file
> <?xml version="1.0" ?>
> <person xmlns="urn:webservice15">
>   <name>myName</name>
>   <address>myAddress</address>
>   <ssn>111-222-3333</ssn>
>   <email>[EMAIL PROTECTED]</email>
>   <home-phone>123355678</home-phone>
>   <work-phone>1233455678</work-phone>
> </person>
> 
> Appreciate your reply..
> Ranjith Pillai.
> 
> -----Original Message-----
> From: Keith Visco [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 22, 2003 1:29 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [castor-dev] Unmarshall-Name space problem.
> 
> What does the schema look like?
> 
> --Keith
> 
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>         unsubscribe castor-dev
> 
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>         unsubscribe castor-dev

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to