You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by imorales <im...@ignos.com> on 2007/12/05 10:47:50 UTC
Ant Task Bean Generation problem
Hi all. I´m generating xmlbeans with the ant task. My problem is that the
.jar that generates the task it´s including the compiled classes in the
"nonamespace". I don´t now why it´s nonamespace package because the schema
that I´m using to generate the class have the targetNamespace attribute.
My xsd begins:
------------------------------------------------------------------------------------------
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:platino="http://platino.com/servicios/registro"
targetNamespace="http://platino.com/servicios/registro">
<xs:element name="Solicitud_Registro" type="platino:Solicitud_Registro"/>
<xs:complexType name="Solicitud_Registro">
<xs:sequence>
<xs:element name="Datos_Firmados" type="platino:DatosFirmados"
minOccurs="1" maxOccurs="1"/>
...
..
.
My ant task is:
------------------------------------------------------------------------------------------
<target name="genxbeans" depends="init" description="Compiles sicres.xsd
with xmlbeans">
<taskdef name="xmlbean" classname="org.apache.xmlbeans.impl.tool.XMLBean"
classpath="${rootdir}/lib/xbean/xmlbeans-jsr173-api-2.0-dev.jar:${rootdir}/lib/xbean/xbean-2.2.0.jar"/>
<xmlbean schema="src/conf/sicres.xsd"
classgendir="src-gen/build"
srcgendir="gen/xbeans"
destfile="src-gen/dist/registro-xmlbeans.jar"
classpathref="xbean.classpath"/>
</target>
...
..
.
Any ideas?. Thanks in advance.
--
View this message in context: http://www.nabble.com/Ant-Task-Bean-Generation-problem-tf4948428.html#a14168070
Sent from the Xml Beans - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org
Re: Ant Task Bean Generation problem
Posted by Jacob Danner <ja...@gmail.com>.
Add the elementFormDefault=qualified attribute to your schema element, or
you can add the following namespace in your schema element xmlns="
http://platino.com/servicios/registro"
Also, it looks like your xmlns:platino namespace my have a space at the end
... registro "
-jacobd
On Dec 5, 2007 1:47 AM, imorales <im...@ignos.com> wrote:
>
> Hi all. I´m generating xmlbeans with the ant task. My problem is that the
> .jar that generates the task it´s including the compiled classes in the
> "nonamespace". I don´t now why it´s nonamespace package because the schema
>
> that I´m using to generate the class have the targetNamespace attribute.
>
> My xsd begins:
>
> ------------------------------------------------------------------------------------------
> <xs:schema xmlns:xs=" http://www.w3.org/2001/XMLSchema"
> xmlns:platino="http://platino.com/servicios/registro "
> targetNamespace="http://platino.com/servicios/registro">
> <xs:element name="Solicitud_Registro" type="platino:Solicitud_Registro"/>
>
> <xs:complexType name="Solicitud_Registro">
> <xs:sequence>
> <xs:element name="Datos_Firmados" type="platino:DatosFirmados"
> minOccurs="1" maxOccurs="1"/>
> ...
> ..
> .
> My ant task is:
>
> ------------------------------------------------------------------------------------------
> <target name="genxbeans" depends="init" description="Compiles sicres.xsd
> with xmlbeans">
> <taskdef name="xmlbean" classname="org.apache.xmlbeans.impl.tool.XMLBean"
> classpath="${rootdir}/lib/xbean/xmlbeans-
> jsr173-api-2.0-dev.jar:${rootdir}/lib/xbean/xbean-2.2.0.jar "/>
> <xmlbean schema="src/conf/sicres.xsd"
> classgendir="src-gen/build"
> srcgendir="gen/xbeans"
> destfile="src-gen/dist/registro- xmlbeans.jar"
> classpathref="xbean.classpath"/>
> </target>
> ...
> ..
> .
> Any ideas?. Thanks in advance.
>
> --
> View this message in context:
> http://www.nabble.com/Ant-Task-Bean-Generation-problem-tf4948428.html#a14168070
> Sent from the Xml Beans - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org
>
>