Since you have it setup as a webservice, have you tried calling postman to 
see what you actually get back?

On Thursday, May 20, 2021 at 7:06:35 PM UTC-5 Pablo Vidaurri wrote:

> are you returning a 200?
>
> Is that JSON what you actually received or is it what you think you are 
> sending?
>
> On Wednesday, May 19, 2021 at 4:43:48 AM UTC-5 [email protected] wrote:
>
>> Hello, 
>>
>> I'm configuring CAS v6.3 to use restful service registry based on this 
>> documentation (
>> https://apereo.github.io/cas/6.3.x/services/REST-Service-Management.html#restful-service-registry
>> ).
>>
>> When I run CAS server, I got error like this. 
>>
>> Caused by: 
>> org.springframework.http.converter.HttpMessageNotReadableException: JSON 
>> parse error: Cannot deserialize value of type `[Ljava.io.Serializable;` 
>> from Object value (token `JsonToken.START_OBJECT`); nested exception is 
>> com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot 
>> deserialize value of type `[Ljava.io.Serializable;` from Object value 
>> (token `JsonToken.START_OBJECT`) at [Source: (PushbackInputStream); line: 
>> 1, column: 1] at 
>> org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.readJavaType(AbstractJackson2HttpMessageConverter.java:285)
>>  
>> at 
>> org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.read(AbstractJackson2HttpMessageConverter.java:243)
>>  
>> at 
>> org.springframework.web.client.HttpMessageConverterExtractor.extractData(HttpMessageConverterExtractor.java:105)
>>  
>> ... 193 more Caused by: 
>> com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot 
>> deserialize value of type `[Ljava.io.Serializable;` from Object value 
>> (token `JsonToken.START_OBJECT`) at [Source: (PushbackInputStream); line: 
>> 1, column: 1] at 
>> com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)
>>  
>> at 
>> com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java:1603)
>>  
>> at 
>> com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1377)
>>  
>> at 
>> com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1324)
>>  
>> at 
>> com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.handleNonArray(ObjectArrayDeserializer.java:343)
>>  
>> at 
>> com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:194)
>>  
>> at 
>> com.fasterxml.jackson.databind.deser.std.ObjectArrayDeserializer.deserialize(ObjectArrayDeserializer.java:24)
>>  
>> at 
>> com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:322)
>>  
>> at 
>> com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4591)
>>  
>> at 
>> com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3599)
>>  
>> at 
>> org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.readJavaType(AbstractJackson2HttpMessageConverter.java:274)
>>  
>> ... 195 more
>>
>> Here is the rest api response that I provided. 
>>
>> {"@class" : "org.apereo.cas.services.RegexRegisteredService", 
>>   "serviceId" : "^(https|imaps)://.*", 
>>   "name" : "HTTPS and IMAPS", 
>>   "id" : 10000001}
>>
>> It's in JSON format. Is there any specific format that I should provide?
>> Thank you
>>
>

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/ea18dd8b-b34a-47ee-abe2-53b1161bf683n%40apereo.org.

Reply via email to