• Post Reply Bookmark Topic Watch Topic
  • New Topic

Web Services Internationalization - jax-ws  RSS feed

 
Esteban Puertas
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • 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 :-)!
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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 ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!