Passing java complex object as parameters in EJB3 exposed as Webservice

Solution Verified - Updated -

Issue

  • Trying to expose an API of EJB3 Session Bean as webservice, but when attempting to pass HashMap as parameter then the value of HashMap is empty when it comes on EJB3 WebService API.
  • How can I pass complex generic java types as a parameter or a return type from Web Service implementation ?
  • When a generic type public HashMap<String,String> is used, this works fine but then blows up when we make the use of public HashMap<String,Object>.

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 5.1.2
    • 6.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.