Hi Jacob and everyone! I changed my XSD to use no namespace and it works. The XML is a result of a Stored Procedure, so I can not change it. Thanks for you help!
-- Fernando Bernardino -----Mensagem original----- De: Jacob Danner [mailto:[EMAIL PROTECTED] Enviada em: terça-feira, 24 de abril de 2007 11:44 Para: [email protected] Assunto: Re: Parse error - simple Hi Fernando, The problem is that the instance you have created with the Oracle JSP is does not match the namespace of the element you have defined in the schema definition. Your XSD has the following defined, targetNamespace="http://www.gvt.com/store" > which means any instances of types in the schema should be defined by <type xmlns="http://www.gvt.com/store" ... /> In your case, I think the change should be something like this OLD: <parametropacote> NEW: <parametropacote xmlns="http://www.gvt.com/store"> Best of Luck, -Jacob Danner On 4/24/07, Fernando Gomes Bernardino <[EMAIL PROTECTED]> wrote: > > > > Hello! > > I think this is a simple error but I'm new to XSD and XmlBeans. > > I have a XML generated by an Oracle SP: > > <?xml version = '1.0' encoding = 'iso-8859-1'?> > <parametropacote> > <parametros num="1"> > <row_id>1-HXCWOK</row_id> > <nome_pacote>Franquia Unique 600</nome_pacote> > <num_min_endereco>1</num_min_endereco> > <num_max_endereco>1</num_max_endereco> > <num_min_is_voz>1</num_min_is_voz> > <num_max_is_voz>2</num_max_is_voz> > <num_min_is_dados>1</num_min_is_dados> > <num_max_is_dados>1</num_max_is_dados> > <num_min_is_webline>1</num_min_is_webline> > <num_max_is_webline>1</num_max_is_webline> > <num_min_localidade>1</num_min_localidade> > <num_max_localidade>1</num_max_localidade> > <num_min_is_voip>0</num_min_is_voip> > <num_max_is_voip>0</num_max_is_voip> > > <coexiste_is_dados_webline>Não</coexiste_is_dados_webline> > </parametros> > ..... > </parametropacote> > > I've compiled my XMLBeans with this XSD: > > <?xml version="1.0" encoding="iso-8859-1"?> > <xsd:schema > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:local="http://www.gvt.com/store" > elementFormDefault="qualified" > targetNamespace="http://www.gvt.com/store" > > <xsd:element name="parametropacote" type="local:parametropacote" /> > <xsd:complexType name="parametropacote" > > <xsd:sequence> > <xsd:element name="parametros" > type="local:parametros" minOccurs="1" maxOccurs="unbounded" /> > </xsd:sequence> > </xsd:complexType> > <xsd:complexType name="parametros" > > <xsd:sequence> > <xsd:element name="row_id" type="xsd:string" > minOccurs="0" maxOccurs="1" nillable="true" /> > <xsd:element name="nome_pacote" type="xsd:string" > minOccurs="0" maxOccurs="1" nillable="true" /> > > <xsd:element name="num_min_endereco" type="xsd:int" > minOccurs="0" maxOccurs="1" nillable="true" /> > > <xsd:element name="num_max_endereco" type="xsd:int" > minOccurs="0" maxOccurs="1" nillable="true" /> > > <xsd:element name="num_min_is_voz" type="xsd:int" > minOccurs="0" maxOccurs="1" nillable="true" /> > > <xsd:element name="num_max_is_voz" type="xsd:int" > minOccurs="0" maxOccurs="1" nillable="true" /> > > <xsd:element name="num_min_is_dados" type="xsd:int" > minOccurs="0" maxOccurs="1" nillable="true" /> > > <xsd:element name="num_max_is_dados" type="xsd:int" > minOccurs="0" maxOccurs="1" nillable="true" /> > > <xsd:element name="num_min_is_webline" > type="xsd:int" minOccurs="0" maxOccurs="1" nillable="true" /> > > <xsd:element name="num_max_is_webline" > type="xsd:int" minOccurs="0" maxOccurs="1" nillable="true" /> > > <xsd:element name="num_min_is_voip" type="xsd:int" > minOccurs="0" maxOccurs="1" nillable="true" /> > > <xsd:element name="num_max_is_voip" type="xsd:int" > minOccurs="0" maxOccurs="1" nillable="true" /> > > <xsd:element > name="coexiste_is_dados_webline" type="xsd:string" > minOccurs="0" maxOccurs="1" nillable="true" /> > > </xsd:sequence> > <xsd:attribute name="num" type="xsd:int" use="required" /> > </xsd:complexType> > </xsd:schema> > > On ParametropacoteDocument.Factory.parse(xml); I got the > error: > 07/04/23 16:40:57 org.apache.xmlbeans.XmlException: error: > The document is not a [EMAIL PROTECTED]://www.gvt.com/store: document > element namespace mismatch expected "http://www.gvt.com/store" got "" > > Thanks for any help! > > -- > Fernando Bernardino --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

