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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content