[jboss-user] [JBoss Web Services] - Issue in WebSerice: javax.xml.bind.JAXBException

Sivaraj R do-not-reply at jboss.com
Wed Dec 7 05:01:52 EST 2011

Sivaraj R [http://community.jboss.org/people/sivar] created the discussion

"Issue in WebSerice: javax.xml.bind.JAXBException"

To view the discussion, visit: http://community.jboss.org/message/640250#640250

Hi, 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; @Remote @WebService public interface SampleEJBRemote { @WebMethod public SampleResult getDetails(String name, String value); } business class: @Stateless @WebService(endpointInterface="com.sample.SampleEJBRemote") public class SampleEJB implements SampleEJBRemote { public SampleResult getDetails(String name, String value){ Map resultObj = getData(); SampleResult result = new SampleResult(); result.setOutput(resultObj); } private Map getData(){ HashMap propsMap = new HashMap(); for(int i =0 ; i < 10; i++){ HashMap prop = new HashMap(); prop.put("name",i + "Count"); propsMap.put(i,prop); } 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 . Regards Sivaraj R

Reply to this message by going to Community

Start a new discussion in JBoss Web Services at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20111207/1a3f4932/attachment-0001.html 

More information about the jboss-user mailing list