WebService (SOAP/WCF) + Webplayer

Hi,

I know that there are a lot of threads about this subject but all I found is old enough to deserve a new thread… I guess!

Well… I coded a really simple (just as POC) webservice with WCF and cosumed it in unity. Works fine if in stand alone. For webplayer just dont build.

I tried a SOAP webservice and I got the same result: works fine inside Unity but when I try to build it crashes.

My last try (SOAP) is crashing becouse system.web.dll is trying to load system.drawing.dll (i really dont know why…) and Unity seems to block this operation (becouse of sandbox?).

I also tried to create my own sockets… I coded a simple server listening a port and a unity client connecting it. Also works but only in Unity ambient… does not build (security reasons with reflection, i think.)

Well, how to do this works??? Does anybody has a solution?

Thanks in advance!

Reigota

(sorry for my bad english… )

No solution to this problem? Is there no way to consume a webservice from a webplayer? Even if both are in same host?

Best regards,

Reigota

Yes, you should use WWW class to consume web service.
On server side use HttpGet protocol, and decorate everything with:
[WebMethod]
[ScriptMethod(UseHttpGet = true)]
public string HelloUnity(string data)
{

}

Hmm I will try! thanks