是否可以从端点中的xml String提供任意数据,而无需解组/创建类?
例如
@WebService(endpointInterface = "java.somewhere")
public class MyService {
@Override
public JAXBElement<?> getOrderData(String id) {
String response = "<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>";
return response; //how?
}
}