i am new to webservice. i have developed a EJB and exposed it as webservice. i have deployed my EJB in JBOSS 5.

Business Logic and inteface is as below

package com.sample;
public interface SampleEJBRemote {
 public SampleResult getDetails(String name, String value);


business class:
public class SampleEJB implements SampleEJBRemote {
 public SampleResult getDetails(String name, String value){
  Map<String,Object> resultObj = getData();
  SampleResult result = new SampleResult();


 private Map<String,Object> getData(){
  HashMap<String, Object> propsMap = new HashMap<String, Object>();
  for(int i =0 ; i < 10; i++){
   HashMap<String, String> prop = new HashMap<String, String>();
   prop.put("name",i + "Count");
  return propsMap;



For the above code i created an ear and deployed in JBOSS and it works fine for EJB mode.

When i invoke the same method using WebService i am getting the below error:
 [javax.xml.bind.JAXBException: class java.util.HashMap nor any of its super class is known to this context.]
i have generated the client proxy for webservice using wsgen tool.

Kindly help me. As i am new to this WebService's and EJB's .