Hello Daniel,

[EMAIL PROTECTED] wrote on 06/30/2006 05:46:41 AM:

<snip/>

> The webservice throws an exception, even before it can reach my own 
code.
> The exception is as follows:
> org.xml.sax.SAXException: SimpleDeserializer encountered a child 
> element, which
> is NOT expected, in something it was trying to deserialize.

This error doesn't come from Xerces.

> When setting axis(the webservice) to debug a lot of info comes by. When 
> it comes
> to parsing the categoryEntry element it will throw the exception.
> That element has no namespace, so the serializer adds a empty xmlns="" 
to
> it(which is a known fact) but when it reaches axis, it can not parse 
this
> element.
> I read on the news page of xerces J that this is known. Although it is 
> axis who
> is throwing a fault, I believe the source of the problem might be with 
xerces.

What known issue are you referring to? If you were reading the release 
notes and saw "Fixed a bug which caused an NPE to be thrown for a 
namespace declaration such as xmlns="" which appeared on an ancestor 
element of an <annotation>.", I can assure you that it isn't relevant.

> The following is what axis receives.
>
> <categoryObject2 xsi:type="ns1:Document"
> xmlns="http://webservice.r2d2.react.ssb.ccsd.nc3a.nato.int_";
> xmlns:ns1="http://xml.apache.org/xml-soap";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><sch:category
> xmlns:sch="http://ssb.ccsd.nc3a.nato.int_/react/r2d2/webservice/schemas
> "><categoryEntry
> 
xmlns=""><targetNamespace>zzzz</targetNamespace><schemaElementName>zzzzz</schemaElementName></categoryEntry></sch:
> category></categoryObject2>
> 
> If anyone can give any insight I would be gratefull, cause I'm running 
out of
> ideas. I am also considering in mailing this to the axis user 
mailinglist, but
> I read the xerces news page, so I thought I'd try it here first. I am 
hoping
> that this has something todo with the newest version of xerces or axis, 
since
> axis is depending on xerces as well.

The category element in the document has a different namespace 
(http://ssb.ccsd.nc3a.nato.int_/react/r2d2/webservice/schemas) than the 
one expected (http://webservice/schemas) by your schema. I suspect Axis or 
XMLBeans detects the mismatch and then throws the exception.
 
> Thanks in advance,
> 
> Daniel Ettema
> Netherlands.
> 
> Below is my schema:
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> targetNamespace="http://webservice/schemas";>
>   <xsd:element name="category">
>     <xsd:complexType>
>       <xsd:sequence>
>         <xsd:element name="categoryEntry" minOccurs="0" maxOccurs="1">
>           <xsd:complexType>
>             <xsd:sequence>
>               <xsd:element name="categoryName" type="xsd:string" 
minOccurs="0"
> maxOccurs="1"/>
>               <xsd:element name="targetNamespace" type="xsd:string"
> minOccurs="0" maxOccurs="1"/>
>               <xsd:element name="schemaElementName" type="xsd:string"
> minOccurs="0" maxOccurs="1"/>
>               <xsd:element name="description" type="xsd:string" 
minOccurs="0"
> maxOccurs="1"/>
>               <xsd:element name="xsddocument" 
type="xsd:anyType"minOccurs="0"
> maxOccurs="1"/>
>             </xsd:sequence>
>           </xsd:complexType>
>         </xsd:element>
>       </xsd:sequence>
>     </xsd:complexType>
>   </xsd:element>
> </xsd:schema>
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: [EMAIL PROTECTED]
E-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to