this entire set up has been driving me crazy for days. I REALLY hope somebody can help.
Idea :
What I want is to consume a wsdl service and communicate to the server. I want to deploy to iOS and Android eventually.
Problem :
I got the wsdl file. I converted it to .cs via the mono wsdl function. So now I have my SOAP class ready. This class is using System.Web System.Web.Services as well as System.Xml and others. In my Plugins folder I only have the System.Web.dll System.Web.Services.dll.
If I change it to .Net 2.0 (no subset) then it build for iOS successfully but then Xcode throws and error that :
The second one happens because Apple does not allow code to be generated, so I suppose it is not an option. This leaves the first option with the subset, but I just can not seem to build that version for iOS.
I tried System.Web files from mono 2.0 wsdl generated for 2.0 as well as mono 4.0 wsdl generated for 4.0 ! Did not work for me.
Please help someone.
Did someone actually successfully implemented a wsdl SOAP service in Unity that was deployed to iOS ?
Does someone have any ideas I can try, cause I think I ran out of brain power and ideas.
@Landern : The error in which case ? The Xcode JIT error or the build to iOS error ?
@npsf3000 : I should have also clarified. I do not have any control of the web service. I can either use REST or SOAP. REST is very limited comparing to the SOAP service and will not cut it functionality wise. So, I need to use the SOAP one.
I will hopefully find the time to post a more complete description, but I ended up doing the following.
Took the Cs. file of the WSDL and took out every System.XML reference and JIT methods. Stripped down everything to just the classes.
Then I created TCP communication script and a Soap script. The Soap script creates the POST structure and via the TCP I send it to the server. I parce the reply and instantiate the according classes from the stripped WSLD.
I needed the TCP (and not using WWW or other HTTPRequest functionality) because I needed the comm to function in a thread.
Hope this helps someone as I have search a lot until I ended up doing this.
Note : This process might be easier for other platform, but I needed this to work on iOS, thus the complexity.
I believe that the only way Unity guarantees HTTP requests working across platforms is the WWW class.
So you might want to make a wrapper around this, or use something that already wraps it, like eDriven framework’s HttpConnector class.
I’ve been using this class all the time, for instance with this WebPlayer demo: http://edrivenunity.com/load-images (check out the demo source, containt the info on using HttpConnector).
I’ve been successfully communicating with Drupal CMS on backend using its REST service module; SOAP should not be much harder.
Like I mentioned, I took the above mentioned approach because I needed to communicate in a separate Thread.
As far as I know the WWW class is not available unless used in the main Thread, thus the implementation mentioned.
If there is some other way, I would be more than glad to hear it.