I created a jaxws webservice, but it returns only some of the attributes of my objects in the response xml.
E.g.
public class MyObject {
private String attribute1;
private String attribute2;
//getter and setter
}
But the returned XML only contains
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:mynamespaceResponse xmlns:ns2="myn开发者_JAVA技巧amespace">
<myObject>
<attribute1>stringcontent</attribute1>
</myObject>
....
Attributes which are null are not shown in the XML. In the example, attribute 2 is null, and therefore it's not shown.
精彩评论