How to auto-generate classes from XSD to Objective-C IOS?

I was looking for a solution that can generate Objective-C classes from an XSD schema, but so far I have not found anything useful. I plan to use it in my next application in Xcode.

+4
source share
2 answers

You might want to try making SOAP-to-ObjectiveC a tool for this purpose. Their number was revealed as a result of a Google search. They may not work perfectly if your services are not SOAP based. However, all SOAP-based interfaces will internally use the XSD schema files to describe their interface, so the SOAP library may be something you can use to generate the code you want.

+1
source

Another approach that I found successful when I have only a few SOAP calls that I need to make:

  • Use a tool like SOAPUI to generate a sample SOAP message
  • Copy / paste the sample message into the new files that you store in your application, with placeholder text for any message fields that you want to specify at run time.
  • If you want to send a message, read the message file in the sample file, and then do some simple XML manipulations to fill in the fields you need.

I use this approach for a simple SOAP-based client, instead of using one of the full-blown solutions. I need to use 5 or 6 simple SOAP methods from several dozen defined in my service WSDL file, so this approach worked pretty well for me.

-1
source

All Articles