cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "AMARNATH, Balachandar" <>
Subject Warning Could not create accessor
Date Tue, 20 Apr 2010 13:30:56 GMT
Dear All,

 I wrote a CXF web service that returns a hashmap. I wrote a marshaller
and demarshaller as well. Though I am able to invoke the method
sucessfuly, I could see the hashmap in my client side. And the error is 

WARNING: Could not create accessor for property Entry of type

I hereby providing you the ResultMap class and ResultMapAdapter class
for your reference

public class ResultMapAdapter extends

	public ResultMap marshal(Map<String, String> v)  {

		return new ResultMap(v);
		catch(Exception e){
			System.out.println("marshal exception");
		return null;

	public Map<String, String> unmarshal(ResultMap v)  {
		System.out.println("burrr  unmarshal");
		HashMap<String,String> map = new
		List<ResultMap.Entry> entries = v.getEntries();	   

		for(int i = 0; i<entries.size();i++)
		return map;
		catch(Exception e){
			System.out.println("unmarshal exception");
			return null;



@XmlType(name = "ResultMap",propOrder = {"entry"})

public class ResultMap {

    //protected List<ResultMap.Entry> entry;
    private List<ResultMap.Entry> entry;
    public ResultMap(){}
	public ResultMap(Map<String,String> map){
    	entry = new ArrayList();
    	String temp = new String();
    	Iterator<String> i = map.keySet().iterator();
    		temp =;		
    		entry.add(new ResultMap.Entry(temp,map.get(temp)));
    public List<ResultMap.Entry> getEntries() {
        return entry;

     protected static class Entry {

        @XmlElement(name = "key", required = true)
        //protected String key;
        private String key;
        @XmlElement(name = "value", required = true)
        //protected String value;
        private String value;
        protected Entry(){}
        protected Entry(String nkey, String nvalue) {
        	this.key = nkey;
        	this.value = nvalue;
        protected String getKey() {
            return key;
        protected String getValue() {
            return value;



Can anyone in the group tell me where I am doing wrong ?

Thanks in advance


The information in this e-mail is confidential. The contents may not be disclosed or used
by anyone other than the addressee. Access to this e-mail by anyone else is unauthorised.
If you are not the intended recipient, please notify Airbus immediately and delete this e-mail.
Airbus cannot accept any responsibility for the accuracy or completeness of this e-mail as
it has been sent over public networks. If you have any concerns over the content of this message
or its Accuracy or Integrity, please contact Airbus immediately.
All outgoing e-mails from Airbus are checked using regularly updated virus scanning software
but you should take whatever measures you deem to be appropriate to ensure that this message
and any attachments are virus free.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message