Webservice proxy null reference exception

Hi, im trying to use a Webservice under Unity trial 2.5.

I tried in all the posible ways and still getting the same error when instantiating the web service proxy.

First ive created the proxy using wsdl from VS2005 (.NET 2.0). Then converted it to a dll using csc and referencing System.web.services.dll.

When i instantiate the proxy from a C# script i get a NullObjectReferenceException on the constructor of SoapHttpClientProtocol. (Notice that the proxy extends that class). I cant remember the exact exception, but was something on system.Reflection. System.Web.Services dll is added on my proyect’s folder as an asset (from the mono folder).

As this wasnt working i tried to use the .cs file generated with wsdl directly as a Unity script, and it compiles, but the exception is still generated on the class constructor.

In my last test i created an empty class in a C# script that inherits from SoapHttpClientProtocol, added the web service binding attribute on the class and… the exception still appears on the class’s constructor.

It smells like im doing a big mistake or the Mono implementation is bugged, because inheriting from a class and instantiating it cannot give a nullreference exception!

More that Mono 1.2.5, which is used by Unity 2.x, just doesn’t have it at all.

Thanks for so fast reply.

So Mono 1.2.5 doesnt implement webservices interfaces?, ill try another way then. Maybe using another type of webservice client.

Thats what I think from the informations and threads on the topic yes. There has been a thread on that about a month ago.

I think the user ended with doing the SOAP part on the webend and using WWW / WWWForm to communicate to it.

I ended using this:

http://forum.unity3d.com/viewtopic.php?p=171024#171024

It worked for me, thanks to that user :smile:.