views:

43

answers:

1

I need to write a web service on a .NET platform for an IPhone client. I'm using JSON.

My question is - how will the client recognize my objects without using .NET??

Will I be able to receive objects, or all I can receive are strings which I need to deserialize?

What happens when one of my method's parameters is an "out" parameter??

As you can see I'm really a newbie in this, and so any help will be much appreciated.

A: 

If you're using JSON, it's pretty much up to you what happens. I don't have experience with .NET web services, but there's a JSON serializer, which should suffice for all your needs, i.e. you can deserialize JSON to objects.

On the other hand, if you're actually asking about what the client does with the JSON it receives, the answer is similar: JSON is already a standard to transfer objects. It's up to the client what it does with this. I don't know what the iPhone environment can do with it, but I guess it has something similar.

I'm not sure what happens if a method has an out parameter - I'd expect web service methods to never have out parameters because you can return everything in a single object, or in this case in a single JSON string.

OregonGhost
Thanks a lot... I will still appreciate an answer about the "out" parameter since it's quite critical for my app.
Oren A
After a bit of googling, it seems that there may be problems with *out* parameters anyway, for example when calling over ASP.NET AJAX. Are you the one to define the webservice interfaces? If so, the pragmatic solution might be to not use *out* parameters :)
OregonGhost