• 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

standard error messaging in jax-ws

 
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have implemented a jax-ws (tomcat) web service. It is used for remote method invocations. There is a generic method that returns Object. Now I cannot return string with an error or exception because I do not know who's calling it might be a c# client. So I am looking for a generic way to return error like on jax-ws or soap level.
Any ideas?

Thanks,
John
 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

John Landon wrote:Hi,
I have implemented a jax-ws (tomcat) web service. It is used for remote method invocations. There is a generic method that returns Object. Now I cannot return string with an error or exception because I do not know who's calling it might be a c# client. So I am looking for a generic way to return error like on jax-ws or soap level.
Any ideas?

Thanks,
John



I don't know if you've given us quite enough info to work with here. You say you are returning an Object but you cannot return a string. However, you should be able to return a string that contains the error message and it will work just fine. Jax-ws will convert the java.lang.string to xsd:string. Then c# or whomever will be able to work with that string just fine. You may want to take a look at jaxb mapping:
http://java.sun.com/javaee/5/docs/tutorial/doc/bnazq.html#bnazv
 
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use SOAPFault to send error message.
reply
    Bookmark Topic Watch Topic
  • New Topic