It would most likely be something like:
public class CollectionOfHashtableType{
List<MyHashtable> listHashtable;
}
public class MyHashtable {
List<MyHashPair> listHashtable;
}
public class MyHashPair {
String key;
String value;
}
Dan
On Thursday 25 March 2010 1:15:29 am chengy wrote:
> dkulp wrote:
> > On Wednesday 24 March 2010 9:38:14 am chengy wrote:
> >> Is it possible to adapter a List<Hashtable<String, String>> type??I try
> >> some way,but always throws Unmarshalling Error
> >>
> >> java method:
> >> String sayHi2(@XmlJavaTypeAdapter(HashtableAdapter.class)
> >> List<Hashtable<String, String>> list);
> >>
> >> Below is not correct:
> >> public class HashtableAdapter extends XmlAdapter<HashtableType,
> >> Hashtable<String, String>> {
> >> ...
> >> }
> >
> > I think the XmlAdapter would have to be for the entire parameter. Like
> > XmlAdapter<CollectionOfHashtableType, List<Hashtable<String, String>> or
> > similar.
>
> I think so.XmlAdapter<CollectionOfHashtableType, List<Hashtable<String,
> String>> .But I dont know how to implement CollectionOfHashtableType,In my
> opinion,It may like this:
>
> public class CollectionOfHashtableType{
> List<MyHashtableExtendsHashtable<String, String>> listHashtable;//how
> to ???
> }
>
> @XmlJavaTypeAdapter
> public class MyHashtableExtendsHashtable{
> List<HashtableEntryPair> listHashtablePair;
> }
>
> But it seems not correct, so any suggestion ?
--
Daniel Kulp
[email protected]
http://dankulp.com/blog