ServiceStack.Java Guid conversion in GET request

Hello,

I’m having an issue with GUID when they are used in a URL. I have a GET request with the route "/someUrl/{Value}" where {Value} is a GUID and the generated URL does not have the correct value for {Value}: it looks like it uses the UUID ‘format’.

I tried putting a break point in the serializer/dezerialiser but it looks like the serializer/deserializer are not called for the values inside the URL; I do not have this issue with a POST or PUT request. Is this the expected behavior? I tried a similar test with a TimeSpan instead of a GUID and I got similar results

.Net
    [Route("/someUrl/{Value}")]
    public class RequestWithGuid : IReturnVoid
    {
        public Guid Value { get; set; }
    }
Java:
      dto.RequestWithGuid rwg = new dto.RequestWithGuid();
      rwg.value = net.servicestack.client.Utils.fromGuidString("179d08aa77fe46e8951d1643b0873274");
      net.servicestack.client.JsonServiceClient ssClient = new net.servicestack.client.JsonServiceClient("...");
      ssClient.get(rwg);
Generated URL:
http://.../json/reply/RequestWithGuid?value=aa089d17-fe77-e846-951d-1643b0873274
Generated URL for a TimeSpan:
http://.../json/reply/RequestWithGuid

The issue is that the value of GET requests are added using its natural string value, whilst the properties in the body are encoded in JSON and goes through the custom Gson type Adapters. Unfortunately Microsoft chose to use “crazy-endian” formatting for Guids which is why they’re natural string representation doesn’t match Java’s UUID.

I’ll look into this behavior soon.

I’ll use the TreatTypesAsStrings feature until this is fixed.
Thanks