|
I'm trying to call a web service, using the WWW class with a WWWForm to fill in the POST data. It's an extremely simple web service for this test purpose. All it does is take in two ints, sum them and return the result. Unfortunately, when I call the service I get this error when it returns: "necessary data rewind wasn't possible" Does anybody have any idea what the cause of this could be? Here is my code snippet for the request. It's really just this simple a test: Any assistance on this issue would be greatly appreciated. Thanks in advance. ::EDIT:: - Added server side web method. And here is the URL which is stored in the variable
(comments are locked)
|
|
Solved. I grabbed a hold of Wireshark and had a look at the TCP Stream that was being returned from my request. There was an error from the Web Service that was different to the error Unity's WWW class had stored. The ASP web service actually had an error along the lines of:
Basically my ASP Web Service was only willing to handle SOAP requests. To enable the handling of Web Form POST requests "application/x-www-form-urlencoded". I just need to add the following to my web.config: Thanks to BerggreenDK for his answer which made me scrutinize my server side setup, rather than my Unity scripts.
(comments are locked)
|
|
Sounds to me like the server script needs something. Not your Unity script. Is it PHP? I'm using http://ASP.net/C# and havent seen this type of error so far and I use plenty of WWWForm calls. How to you store your FORM values on the server? are they appended to some textstream perhaps and could it be that you need to rewind this stream to be able to save? Thanks for the reply. It's an http://ASP.NET web service. I usually call them writing my SOAP requests manually, when working in Objective-C or C++, and haven't experienced an issue like this before. I will update my question and place the server side function definition in it.
Aug 24 '11 at 01:00 PM
KeithK
(comments are locked)
|
