A class that can be used directly or as a template to do map transformations of service method responses. This will currently only marshal to/from primitives. If you want to use objects (and not use the simple .toString() as I have done) you will need to roll your own adapter to marshal and unmarshal your data. For example if you are using domain objects whose toString() returns more than just an id.
Map 类型的返回值和参数示例:
@WebResult(name = 'result')
@WebMethod(operationName = 'testMap')
@XmlJavaTypeAdapter(MapAdapter.class)
Map<String, String> testMap(
@WebParam(name = 'map')
@XmlJavaTypeAdapter(MapAdapter.class)
Map<String, String> p) {
return ['foo': ''bar', 'ying': 'yang']
}
| Methods inherited from class | Name |
|---|---|
class javax.xml.bind.annotation.adapters.XmlAdapter |
javax.xml.bind.annotation.adapters.XmlAdapter#unmarshal(Object), javax.xml.bind.annotation.adapters.XmlAdapter#marshal(Object), javax.xml.bind.annotation.adapters.XmlAdapter#wait(long, int), javax.xml.bind.annotation.adapters.XmlAdapter#wait(long), javax.xml.bind.annotation.adapters.XmlAdapter#wait(), javax.xml.bind.annotation.adapters.XmlAdapter#equals(Object), javax.xml.bind.annotation.adapters.XmlAdapter#toString(), javax.xml.bind.annotation.adapters.XmlAdapter#hashCode(), javax.xml.bind.annotation.adapters.XmlAdapter#getClass(), javax.xml.bind.annotation.adapters.XmlAdapter#notify(), javax.xml.bind.annotation.adapters.XmlAdapter#notifyAll() |
class Object |
Object#wait(long, int), Object#wait(long), Object#wait(), Object#equals(Object), Object#toString(), Object#hashCode(), Object#getClass(), Object#notify(), Object#notifyAll() |