commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juan Vicente" <>
Subject Betwixt not writing empty attributes
Date Fri, 17 Nov 2006 18:52:51 GMT

I can't get betwixt to write an attribute that is empty ("").

Here's de .betwixt file:

<info primitiveTypes="attributes">
    <element name="sso">
        <element name="id">
            <attribute name="src" property="idOrigen" />
            <attribute name="dst" value="cn=AuthServer, ou=DESEIN,
o=AFIP, c=AR" />
            <attribute name="unique_id" property="idMensaje" />
            <attribute name="gen_time" property="fechaGeneracion" />
            <attribute name="exp_time" property="fechaExpiracion" />
        <element name="operation">
            <attribute name="type" value="login" />
            <element name="login">
                <attribute name="entity" property="cuitOrigen" />
                <attribute name="system" value="" />
                <attribute name="username" property="cuitUsuario" />
                <attribute name="authmethod" value="passphrase" />
                <element name="profile">
                    <element name="cuit">
                        <attribute name="number" property="cuitUsuario"

This is the class:

public class InterconexionSETI
	private String idOrigen;
	private String cuitOrigen;
	private String idMensaje;
	private String fechaGeneracion;
	private String fechaExpiracion;
	private String cuitUsuario;

This is the mapping rutine:

StringWriter resultWriter = new StringWriter();
BeanWriter writer = new BeanWriter(resultWriter);

try {
catch (IOException ioex) { }
catch (SAXException saxex) { }
catch (IntrospectionException iex) { }
return resultWriter.toString();

I get the following xml:

    <id src="CN=DEMO,OU=Seguridad Informatica,O=Certificacion
2,L=Capital Federal,ST=Buenos Aires,C=AR" dst="cn=AuthServer, ou=DESEIN,
o=AFIP, c=AR" unique_id="9991" gen_time="1163789407"
    <operation type="login">
      <login entity="30604796357" username="27281677050"
          <cuit number="27281677050"/>

Where the <login> element doesn't include the "system" attribute.

I've tried using the ValueSuppressionStrategy.ALLOW_ALL_VALUES, but I
get the following xml:


What am I doing wrong??

Juan Eduardo Vicente

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message