0

如何使用 java.util.Locale 的实例作为参数或生成 web 服务?

我的网络服务使用 Apache CXF。

4

1 回答 1

1

The only way to do so is to use an XmlTypeAdapter to map the Locale object into something that JAXB can understand. Check the JAXB docs for instructions about the type adapters. CXF also has an example in the java_first_jaxws sample folder for mapping some interface things into stuff that JAXB can understand. Very similar concept here.

于 2009-03-29T16:57:15.730 回答