• 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
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

Web Services Internationalization - jax-ws

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
I am new to web services and I need to develop one that returns some text that depends on the laguage of the client.
Can someone tell me please how can I do that using jax-ws?
(I am using sun's metro framework stack)

Thanks a lot :-)!
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The SOAP request could simply include an element stating the preferred language code (ISO 639) and possibly the country code (ISO 3166) to determine the locale that needs to be used.

There is a working draft for Web Services Internationalization (WS-I18N). I'm not aware that this is supported out-of-the-box (the draft hasn't been finalized in the last 2+ years).
[ March 23, 2008: Message edited by: Peer Reynders ]
 
Esteban Puertas
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for replying :-)
I can't believe there is no standard...
Do you think is a good idea to use the Accept-language http header while waiting for a standard to emerge?
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Esteban Puertas:
Do you think is a good idea to use the Accept-language http header


That would be an acceptable solution for a REST web service.

It would not an acceptable solution for a SOAP web service as the information wouldn't be inside the SOAP envelope (or WSDL description). For a SOAP web service the language/country code should be part of the SOAP request and possibly the SOAP response. You can always base your solution on the above WS-I18N working draft.

Internationalization isn't as big a priority with SOAP web services as it is with web pages as web services are consumed by other applications - not humans. In most cases normalized "generic data" is exchanged which is displayed on the client using the client's locale. SOAP web services exchanging localized text are pretty much in the minority.
[ March 24, 2008: Message edited by: Peer Reynders ]
 
It's hard to fight evil. The little things, like a nice sandwich, really helps. Right tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic