Forum Stats

  • 3,734,696 Users
  • 2,247,027 Discussions


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="">36</b:Key>
         <b:Value i:type="c:string" xmlns:c="">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="">
         <ns4:Key xsi:type="xsd:int">36</ns4:Key>
         <ns4:Value xsi:type="ns5:guid" xmlns:ns5="">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

This discussion has been closed.