Hello,
I quite new to the mailinglist and I hope I am on the right list.
I am building a webservice in Document Literal form and I am using xml
schema's
(schema is at the bottom) to define the content structure of the message. I am
generating java like beans with XMLBeans 2.2.0 so my own client(of the
webservice) and the webservice can populate and read the message
documents. The
webservice itself is Tomcat 5.5.16 and it makes use of axis 1.4, also I
am using
xerces 2.8.0.
My client application, before it calls a webservice method, populates a
xmlbean
generated java object and transform that to a w3c document. It then calls the
webservice method.
On the webservice side.
I receive an object, I cast it to a w3c, and then transform it to a xmlbean
generated java object, so I can easily access the elements and their values.
Fine and all, you would say... well I did join the list for a reason...
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.
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.
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.
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]