0

i only have a .wsdl file locally and i only find examples for android to create a soap service with retrofit2 with an url. Now my question is what is best practice to store the .wsdl file in the project (is this a raw file?) and parse this for example with ksoap to create my api with retrofit? Any body some ideas?

edhair
  • 195
  • 1
  • 15

1 Answers1

1

The WSDL file is a webservice file, therefore it should seat on your server, you can deploy such webservices using Tomcat or JBoss applications. So you don't want to 'store' the wsdl file in your application, it should seat on your server. And you shouldn't 'parse' a wsdl file, its function is moving data from your client to server and viceversa. If doing what you are suggesting was possible(parsing with ksoap to create my api with retrofit), then it would be a bad programming practise due to redudancy. Retrofit works similarly to soap difference being retrofit makes use of JSON while SOAP makes use of XML. Try looking at my answer here Call a soap webservice in android to understand how android interacts with soap webservice

Community
  • 1
  • 1
Gordon developer
  • 387
  • 3
  • 13