Hi,

It´s something like this:

public class ContratoLN extends BaseLN {

        private Arraylist paineis;
        private Arraylist segurados;
}

public class BaseLN {
        private BaseDetails details;
        private Arraylist anexos;
}

public class ContratoDetails extends BaseDetails {
        private TomadorSeguroDetails tomadorSeguro;
}


<binding>
       <mapping name="MS01.0.1" class="pt.aps.coseguro.contrato.ContratoLN">
        <structure name="HeaderMensagem" field="details"                        
usage="required"
type="pt.aps.details.comuns.IBaseDetails"/>
                
        <collection name="Documentos" usage="optional"
field="anexos"/>        <collection name="IdentificacaoPainel"
usage="required" field="paineis"/>
        <collection name="IdentificacaoSegurados" usage="required"
field="pessoasSeguras"/>
        </mapping>
        <mapping class="pt.aps.details.comuns.IBaseDetails"
abstract="true"/>
        <mapping name="HeaderMensagem"
class="pt.aps.details.coseguro.gp.contrato.ContratoDetails"                     
        extends="pt.aps.details.comuns.IBaseDetails">
        <value name="CodigoMensagem" field="mensagemId_cd" style="attribute"/>
    </mapping>
</binding>

And when i start i have to instance a ContratoLN, and put inside a
ContratoDetails in details and a TomadorSeguroDetails inside a
ContratoDetails, and of course the collections inside paineis,
segurados e anexos.
But it doesn´t work...


I´m sorry if i wasn´t clear in the late message!!!









On 8/17/05, Mocky Habeeb <[EMAIL PROTECTED]> wrote:
> I'm not sure I understand what the problem is. Can you include a small
> piece of your java source and your binding that is giving you trouble,
> along with any error message?
> 
> Mocky
> 
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Nuno
> Ferreira
> Sent: Wednesday, August 17, 2005 5:26 AM
> To: [email protected]
> Subject: [jibx-users] Problems to make a mapping of my xml
> 
> 
> Hi all,
> 
> I´m try to make a binding to marshall and unmarshall a xml file, but i´m
> not been sucessfull... can anyone help me???
> 
> 
> This is the xml i´m trying to have a binding:
> 
> <MS01.0.1>
>        <HeaderMensagem CodigoMensagem="0000"/>
>        <DadosMensagem TipoInformacao="0000"/>
>        <TomadorSeguro NumeroCliente="123333" TipoCliente="S"/>
>        <IdentificacaoPainel CodigoLider="Stri"
> PercParticipacaoLider="0,0">
>                <CompanhiaNL Referencia="0000" CodigoNaoLider="000" />
>                <CompanhiaNL Referencia="0000" CodigoNaoLider="001" />
>                <CompanhiaNL Referencia="0000" CodigoNaoLider="002" />
>        </IdentificacaoPainel>
>        <CaracterizacaoBasica ApoliceSegurNet="Stringaaaaaaaaaaaa" />
>        <IdentificacaoSegurados NumSegurados="000">
>                <Participante ReferenciaParticipante="000" />
>                <Participante ReferenciaParticipante="000" />
>                <Participante ReferenciaParticipante="000" />
>                <Participante ReferenciaParticipante="000" />
>        </IdentificacaoSegurados>
>        <Documentos>
>                        <Documento>
>                        <NomeDocumento>ola.jpg</NomeDocumento>
>                        <Ficheiro>####</Ficheiro>
>                </Documento>
>                <Documento>
>                        <NomeDocumento>ole.jpg</NomeDocumento>
>                        <Ficheiro>###</Ficheiro>
>                </Documento>
>                <Documento>
>                        <NomeDocumento>oli.jpg</NomeDocumento>
>                        <Ficheiro>##</Ficheiro>
>                </Documento>
>        </Documentos>
> </MS01.0.1>
> 
> 
> And this is the structure that i have to put the data :
> 
>        ContratoLN -> (MS01.0.1)
> 
>        contratoLN.details = (MS01.0.1) - Type (BaseDetails)
>                      instance of object - ContratoDetails extends
> BaseDetails
> 
>        contratoLN.details.tomadorSeguro = (TomadorSeguro) - Type
> (TomadorSeguroDetails)
> 
>        And the collections: (That work fine)
> 
>        contratoLN.paineis = (IdentificacaoPainel) - Type
> (IntervenienteDetails)
>        contratoLN.segurados = (IdentificacaoSegurados ) - Type
> (IdentificacaoSeguradosDetails)
>        contratoLN.anexos= (Documentos) - Type (AnexosDetails)
> 
> 
> in resume the problem is to make a bindind of the object
> contratoLN.details, that have the same binding of contratoLN, probably
> the XML is no well constructed but now are no remedy, i stuck with this.
> I try diferent forms but no one result.
> 
> Can anyone have a example of a binding of this???
> 
> cheers
> 
> 
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle
> Practices Agile & Plan-Driven Development * Managing Projects & Teams *
> Testing & QA Security * Process Improvement & Measurement *
> http://www.sqe.com/bsce5sf
> _______________________________________________
> jibx-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jibx-users
> 
> 
> 
> 
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> _______________________________________________
> jibx-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jibx-users
>


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to