hi ,

try with this

<?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:city></ns2:city>*

                            <ns2:country>china</ns2:country>

                   </ns2:setWeather>

         </soapenv:Body>
</soapenv:Envelope>

2012/2/10 bohr.qiu <bohr....@gmail.com>

> 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.****
>
> ** **
>
> ** **
>



-- 
Shameera Rathnayaka
Undergraduate
Department of Computer Science and Engineering
University of Moratuwa.
Sri Lanka.

Blog : http://shameerarathnayaka.blogspot.com/

Reply via email to