Do you really need a customer unmarshaller for this?  I would just specialize 
the setter/getter in "Role":

class Role {

  private Set<User> users;

  public void setUsers( String spaceDelimitedUsers )
  {
        for ( String userId : spaceDelimitedUsers.split( " " ) )
        {
                users.add( new User( userId ) );
        }
  }

  public String getUsers( )
  {
        String strUsers = "";

        for ( User user : users )
        {
                strUsers += user.getId( ) + " ";
        }

        return strUsers;
  }

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of ????????? 
????????
Sent: Friday, August 31, 2007 9:54 AM
To: jibx-users@lists.sourceforge.net
Subject: Re: [jibx-users] item-type at runtime?

Hello!



I have an objects like this:

class User {

  private Integer id;

}



class Role {

  private Set<User> users;

  ...

}



I want receive following document after murshalling:

<role>

  <users>1 4 6 78</users>

</role>



... node "users" must contain only "id" of objects "User".



And I want get Set of "User"-objects after unmarshalling. But have no 
information about item-type in my custom marshaller/unmarshaller.



Could you help me?



P.S. Sorry for my English =))



31.08.07, 14:24, Dennis Sosnoski ([EMAIL PROTECTED]):



> There's currently no way to do this. What's the situation, perhaps I can

> suggest a workaround.

>   - Dennis

> Dennis M. Sosnoski

> SOA and Web Services in Java

> Training and Consulting

> http://www.sosnoski.com - http://www.sosnoski.co.nz

> Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117

> Бронников Владимир wrote:

> > Hello.

> >

> >

> > How can I get value of "item-type" attribute at runtime in my custom 
> > marshaller/unmurshaller?

> >

> >

> > --

> > С уважением, Бронников Владимир

> > -------------------------------------------------------------------------This
> >  SF.net email is sponsored by: Splunk Inc.Still grepping through log files 
> > to find problems?  Stop.Now Search log events and configuration files using 
> > AJAX and a browser.Download your FREE copy of Splunk now >>  
> > http://get.splunk.com/_______________________________________________jibx-users
> >  mailing [EMAIL PROTECTED]://lists.sourceforge.net/lists/listinfo/jibx-users

> >

> >   

> -------------------------------------------------------------------------

> This SF.net email is sponsored by: Splunk Inc.

> Still grepping through log files to find problems?  Stop.

> Now Search log events and configuration files using AJAX and a browser.

> Download your FREE copy of Splunk now >>  http://get.splunk.com/

> _______________________________________________

> jibx-users mailing list

> jibx-users@lists.sourceforge.net

> https://lists.sourceforge.net/lists/listinfo/jibx-users



--

С уважением, Бронников Владимир

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to