I am developing a webservice, it is java in the server, and must be c# in the client.
There is just one String as in parameter and as out parameter it will return an “object” with this structure:
- String codError
- String descError
- Object2[] arrayData
being “Object2” like this:
- String firstDataArray
- Int secondDataArray
I created a java client and it works flawlessly, but the c# client does not work. It says that the “EndElement” of the object was not expected (meaning the end of the object, not object2), and that it was expected a “codError” element.
The method does NOT return an array of Objects, just one Object.
I used httpanalyzer, and as well from the java client as from the c# client, the server retuns a well formed xml, and its contain is what it is supposed to be (in both clients).
I am using eclipse and axis2 for java, and visual studio 2005 and 2008 for c#.
What could be wrong?
Thanks in advance!!
The problem was that the auto-generated WSDL by axis and eclipse was wrong, and so, the XML sent from the server to the client was also wrong.
I think it is a common problem when creating the webservices bottom-up. It is much better create them top-down.
The XML that the server was sending to the client was something like (just the wrong part):
There is a “object2” tag there, that should not be.
It works creating a client for java using eclipse, but it does not in c#
I just made the same web service using the top-down implementation and it works great now!!
Thaks a lot to everyone!!