Ancora su SOAP :dhò: (Angelo, ricordi ?)

Ipotizziamo che ho questo messaggio SOAP che mi restituisce un Provider (con cui instauro una connession) :


<?xml version="1.0" ?>
- <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
- <SOAP-ENV:Body>
- <m:DiscoverResponse xmlns:m="urn:schemas-microsoft-com:xml-analysis">
- <m:return xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <root xmlns="urn:schemas-microsoft-com:xml-analysis:rowset" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <xsd:schema xmlns="urn:schemas-microsoft-com:xml-analysis:rowset" targetNamespace="urn:schemas-microsoft-com:xml-analysis:rowset" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sql="urn:schemas-microsoft-com:xml-sql" elementFormDefault="qualified">
- <xsd:element name="root">
- <xsd:complexType>
- <xsd:sequence>
<xsd:element name="row" type="row" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
- <xsd:simpleType name="uuid">
- <xsd:restriction base="xsd:string">
<xsd:pattern value="0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:complexType name="row">
- <xsd:sequence>
<xsd:element name="CATALOG_NAME" type="xsd:string" sql:field="CATALOG_NAME" minOccurs="0" />
<xsd:element name="DESCRIPTION" type="xsd:string" sql:field="DESCRIPTION" minOccurs="0" />
<xsd:element name="ROLES" type="xsd:string" sql:field="ROLES" minOccurs="0" />
<xsd:element name="DATE_MODIFIED" type="xsd:dateTime" sql:field="DATE_MODIFIED" minOccurs="0" />
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
- <row>
<CATALOG_NAME>FoodMart 2000</CATALOG_NAME>
<DESCRIPTION />

<ROLES>All Users</ROLES>
<DATE_MODIFIED>2003-09-26T19:08:34</DATE_MODIFIED>
</row>
- <row>
<CATALOG_NAME>Pippo </CATALOG_NAME>
<DESCRIPTION />

- <ROLES>
- <Error>
<ErrorCode>8</ErrorCode>
<Description>The provider could not determine the value.</Description>
</Error>
</ROLES>
<DATE_MODIFIED>2003-09-26T19:22:20</DATE_MODIFIED>
</row>
- <row>
<CATALOG_NAME>Tutorial</CATALOG_NAME>
<DESCRIPTION />

- <ROLES>
- <Error>
<ErrorCode>8</ErrorCode>
<Description>The provider could not determine the value.</Description>
</Error>
</ROLES>
<DATE_MODIFIED>2003-09-26T18:57:46</DATE_MODIFIED>
</row>
</root>
</m:return>
</m:DiscoverResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


Io vorrei estrapolare da questo msg SOAP i dati in rosso e inserirli in oggetti String.
Uso il JWSDP in particolare le librerie SAAJ.
Sto avendo dei grossi problemi in quanto viene lanciata un'eccezione di ClassCastException quando cerco di eseguire le classiche operazioni di ricerca (tramite il metodo getChildElement() che restituisce Iterator). L'eccezione viene lanciata nel momento in cui faccio il cast di un'oggetto, tornato da Iterator, a SOAPElement.

Mi sapete aiutare?