• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how write webservice using ejb 3.0

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
...where

refers to
reply
    Bookmark Topic Watch Topic
  • New Topic