0 Replies Latest reply: Feb 14, 2014 2:21 AM by user10404620 RSS

    Java is changing the Type in SOAP from string to Guid


      I have a question on Web services. I have a Java Application that is consuming .NET Webservice.

      When I call the Service I get an Object back that contains a List of Key Value pairs. Don’t worry about the Name "KeyValueOfanyTypeanyType". This is a convention between .NET and Java. In the List of Key Value pairs are also strings and they look like this in SOAP:


               <b:Key i:type="c:int" xmlns:c="http://www.w3.org/2001/XMLSchema">36</b:Key>
               <b:Value i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">Remark</b:Value>

      But when I send the Some Object back to .NET without changing the Object then Java sending this SOAP:


          <ns4:KeyValueOfanyTypeanyType xmlns:ns4="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
               <ns4:Key xsi:type="xsd:int">36</ns4:Key>
               <ns4:Value xsi:type="ns5:guid" xmlns:ns5="http://schemas.microsoft.com/2003/10/Serialization/">Remark</ns4:Value>

      Here you can see that Java is changing the type from `i:type="c:string"` to `xsi:type="ns5:guid"` and that leads to the Exception in .NET that .NET can’t convert the “Remark” into a GUID which is understandable. When I look at the Results for Datetime, Boolean or Long everything is correct.


      Does any one was an Idee how I can fix this?


      Regards Michael