Need help with Web services

I am currently try to connect my unity application to a J2EE server. I am converting a wsdl file to cs format, but some namespace are missing.

Unity give me an error on System.Web.Services.Protocols.SoapHttpClientProtocol, because it doesn’t find Web namespace in System.

I had download Mono tools for the wsdl file conversion.

Normally web services are supported by mono :
http://www.mono-project.com/Web_Services

depending on the platform you target you can include them.
but if the platform is for example webplayer, then you will need to change the way you are working and the format you are using (System.XML is present, litjson / json FX work with the various platforms)
Depends a bit on the explicit needs you have but webservices in general will not work in unity.

I am targeting the PC platform only. I found the System.Web.Services.dll in the unity installation folder.

Does I miss something?

In that case you are lucky :slight_smile:
All you need to do is copy the dll manually after build (or write a postprocessbuild script which does it for you) as unity won’t copy it over to the build folder after having finished the build.

Thats naturally assuming that the code works fine in the editor.

Thx,

I just need more explanations on which dll I need copy and where.

The part on which dll is normally a matter of checking in which dll which namespace is present. go-mono and msdn can help on this, trial and error too or using Visual Studio / MonoDevelop to check the dll after adding it to the references

As for the where: the same place you will find the other assemblies that are already in use (within the generated data folder). I’m not my windows system where I’ve U3 on so I can’t backcheck, sorry

I just copy System.Web.Services.dll from Unity\Editor\Data\Mono\lib\mono\2.0 to myProject\unity\Assets\Plugins and the error disappeared.

Thx a lot for your reactivity.

glad it worked.
Didn’t think about just going that way but yes thats naturally a way to enforce it, treat it like a 3rd party assembly
But I would keep a note on where you got it from / that it is a standard assembly present in unity in case Unity gets this bug fixed so it somewhen correctly includes required assemblies as that would lead to an “already defined” error wave