Web Service Internationalization
i18n,之前在J2EE里,自然用struts來做。但是Web Service里貌似應該不需要這部分,但是實際上,有些操作還是避免不了要支持多國語言。
查了一圈兒,好像WS-i18n還在working draft的階段,而且好像已經好幾年了……也沒找到什么開源中間件的實現。
大意是在SOAP header中加上<i18n:international>相關的標簽。
因為畢竟是Web Service,利用http header還是不太妥,還是要放在SOAP里面。
記錄一下查到的鏈接,備用。
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.
查了一圈兒,好像WS-i18n還在working draft的階段,而且好像已經好幾年了……也沒找到什么開源中間件的實現。
大意是在SOAP header中加上<i18n:international>相關的標簽。
因為畢竟是Web Service,利用http header還是不太妥,還是要放在SOAP里面。
記錄一下查到的鏈接,備用。
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.