如何使用 java.util.Locale 的实例作为参数或生成 web 服务?
我的网络服务使用 Apache CXF。
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.