Reputation: 313
I run a WCF service, who has a method taking an object - Person - as parameter.
Person contains
public String name {get; set;}
public String city {get; set;}
I'm calling the wcf service from Android (Java). How can I, in Java, create an object which C# recognizes as Person? (So I can send it as a parameter to the service)
Upvotes: 1
Views: 113
Reputation: 74530
Basically, the version of Java for Android doesn't allow for using JAX-WS (which would make things so much easier).
Instead, you have to make a number of low-level calls in order to call your web-service.
What you might want to consider is exposing the service in .NET as a RESTful service with JSON encoding. This would make things considerably easier, as the Android library has native support for JSON serialization, and making HTTP GET requests to RESTful urls is much simpler than HTTP POST requests (it's not a huge deal, but just less stuff you have to worry about).
Upvotes: 2