• Post Reply Bookmark Topic Watch Topic
  • New Topic

how write webservice using ejb 3.0

 
vaibhav bhangale
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
i am using ejb3.0 session beans in my application and i wanted to implement that session bean with webservice, when i am using java standard datatype as return type of my method its working fine but with the return type of user defined class its not working its giving error as follows

Exception in thread "main" org.jboss.ws.WSException: Cannot obtain java type mapping for: {http://webservice.regdeveloper.co.uk/jaws}SimpleCase

where SimpleCase is my user defined class
if any body having any idea regarding same pls help me
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

What does "java standard datatype" mean? You can't send just any Java class over SOAP (or if you really want to, you need to serialize it). Any class that's not a standard like the primitives, String and Calendar needs to be explicitly type-mapped.
 
Johannes Koch
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's this type mapping about after all? I'm trying to write my first own webservice and did two tutorials, leading to this client code:


leading to this exception:


I expected not to have to care about XML internals of the web service when using Java Annotations - like this:


So, if you could answer these questions:
1. Where/how can I manually specify a type mapping? Or do I need to extend my Annotations?
2. My web method has neither parameters nor a return value, how can there be any types to map??

I'd really appreciate it.

Also, does anybody know a good webservices tutorial for complete webservice rookies using JBoss?

Thanks in advance!
 
Johannes Koch
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
...where

refers to
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!