Hi,  
 I am running into an issue -Caused By:
com.sun.xml.bind.v2.runtime.IllegalAnnotationsException:.

I know it because of Jaxb custom binding. But I am unable to find the proper
documentation/solution

Here is the scenario I am doing

@WebService
public interface AuthService {

        @XmlJavaTypeAdapter(MedEntryTypeAdapter.class)
        Map<String, MedId> getMap(Set<String> setTest);
}
----------------------------------------------------------------------

public class MapToMedType {
         public List<MedEntryType> entry = new ArrayList<MedEntryType>();
}

----------------------------------------------------------------------

public class MedEntryType {


        @XmlAttribute
        public String key;
        @XmlValue
        public MedId value;

        
}

----------------------------------------------------------------------


public class MedEntryTypeAdapter extends
                XmlAdapter<MapToMedType, Map<String, MedId>> {


        public MapToMedType marshal(Map<String, MedId> v) throws Exception {
                System.out.println("In JAXB.. trying to marshel");
                MapToMedType myMapType = new MapToMedType();
                for (Entry<String, MedId> entry : v.entrySet()) {
                        MedEntryType medEntryType = new MedEntryType();
                        medEntryType.key = entry.getKey();
                        medEntryType.value = entry.getValue();
                        myMapType.entry.add(medEntryType);
                }
                return myMapType;

        }


        public Map<String, MedId> unmarshal(MapToMedType v) throws Exception {
                System.out.println("In JAXB.. trying to UNMARSHl");
                HashMap<String, MedId> hashMap = new HashMap<String, MedId>();
                for (MedEntryType myEntryType : v.entry) {
                        hashMap.put(myEntryType.key, myEntryType.value);
                }
                return hashMap;

        }

}


----------------------------------------------------------------------

MedId - is a simple pojo.
----------------------------------------------------------------------
webservice declaration

<jaxws:endpoint id="auth" implementor="#hello" address="/cxfAuth">

                
        </jaxws:endpoint>

----------------------------------------------------------------------
Please suggest me What I am doing wrong.. or Do I need to add anything
special to the custom binding? or refer to any document..

Please help me..

thanks,

-- 
View this message in context: 
http://cxf.547215.n5.nabble.com/Custom-JxBBindings-for-CXF-tp3368602p3368602.html
Sent from the cxf-dev mailing list archive at Nabble.com.

Reply via email to