I have a .NET WCF Web service working great when called from another .NET app. Now I was trying to build a Java client to test the service but one of the methods won't work.
I try to send a List of updates. The complex type is:
<xs:complexType name="ArrayOfRegisterUpdate">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="OneUpdateRegister"
nillable="true" type="tns:OneUpdateRegister" />
</xs:sequence>
</xs:complexType>
<xs:element name="ArrayOfRegisterUpdate" nillable="true"
type="tns:ArrayOfRegisterUpdate" />
<xs:complexType name="OneUpdateRegister">
<xs:sequence>
<xs:element minOccurs="0" name="Field" type="tns:RegisterField" />
<xs:element minOccurs="0" name="Value" nillable="true" type="xs:anyType" />
</xs:sequence>
</xs:complexType>
<xs:element name="OneUpdateRegister" nillable="true" type="tns:OneUpdateRegister" />
My Java Proxy lets me insert any object in "Value", as expected (it could be Strings, ints or DateTimes). But if I enter a String, the following Exception launches:
The formatter threw an exception while trying to deserialize the message:
There was an error while trying to deserialize parameter http://tempuri.org/:updates.
The InnerException message was 'There was an error deserializing the object of type
System.Collections.Generic.List`1
[[xxx.xxx.OneUpdateRegister, XXx.XXx, Version=1.0.0.0, Culture=neutral, `PublicKeyToken=null]].
The value 'John' cannot be parsed as the type 'Guid.'. Please see InnerException for more details.
The web method doesn't even get called. I don't know what does type 'Guid' have to do with all this, I just can see this type in the xsd of simple types.
Any idea? Please let me know any other info that could be useful. Thank you.