2

I am using ksoap to consume soap webservices in android.

Following is the request I am able to generate:

<?xml version="1.0" encoding="utf-8"?>
<v:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:d="http://www.w3.org/2001/XMLSchema" xmlns:c="http://schemas.xmlsoap.org/soap/encoding/" xmlns:v="http://schemas.xmlsoap.org/soap/envelope/">
 <v:Header />
 <v:Body>
  <registerUser xmlns="http://ws.itec.com/">
   <email>droidwala@gmail.com</email>
  </registerUser>
 </v:Body>
</v:Envelope>

Following is the request format I need else the webservice doesnt give proper response:

<?xml version="1.0" encoding="utf-8"?>
<v:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:d="http://www.w3.org/2001/XMLSchema" xmlns:c="http://schemas.xmlsoap.org/soap/encoding/" xmlns:v="http://schemas.xmlsoap.org/soap/envelope/">
 <v:Header />
 <v:Body>
  <registerUser xmlns="http://ws.itec.com/">
   <email xmlns="">droidwala@gmail.com</email>
  </registerUser>
 </v:Body>
</v:Envelope>

the problem is adding xmlns="" in the email tag

Also the response is correct if the request format is following:

   <?xml version="1.0" encoding="utf-8"?>
    <v:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:d="http://www.w3.org/2001/XMLSchema" xmlns:c="http://schemas.xmlsoap.org/soap/encoding/" xmlns:v="http://schemas.xmlsoap.org/soap/envelope/">
     <v:Header />
     <v:Body>
      <n0:registerUser xmlns:n0="http://ws.itec.com/">
       <email>droidwala@gmail.com</email>
      </registerUser>
     </v:Body>
    </v:Envelope>

Please help me generate any of the two acceptable formats. Thanks

Pramod Ravikant
  • 1,039
  • 2
  • 11
  • 28

0 Answers0