I create a webservice with axis2 like that:
public void setWeather(@WebParam(name = "weather") Weather weather,
@WebParam(name = "city") String city,
@WebParam(name = "country") String country) {
System.out.println("weather:" + weather);
System.out.println("city:" + city);
System.out.println("country:" + country);
this.weather = weather;
}
Then I send a soap message :
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<ns2:setWeather xmlns:ns2="http://service.pojo.sample">
<ns2:weather>
<ns1:forecast
xmlns:ns1="http://data.pojo.sample/xsd">rain</ns1:forecast>
<ns1:howMuchRain
xmlns:ns1="http://data.pojo.sample/xsd">102.3</ns1:howMuchRain>
<ns1:rain
xmlns:ns1="http://data.pojo.sample/xsd">true</ns1:rain>
<ns1:temperature
xmlns:ns1="http://data.pojo.sample/xsd">20.3</ns1:temperature>
</ns2:weather>
<ns2:country>china</ns2:country>
</ns2:setWeather>
</soapenv:Body>
</soapenv:Envelope>
And I receive
weather:Weather [temperature=20.3, forecast=rain, rain=true,
howMuchRain=102.3]
city:china
country:null
ns2:country node have been assigned null,why this happy ,please somebody
help me,thx.