0

Working on restful webservices. Getting the following error while invoking rest ful service but Integration test is working for same request.

Error: SEVERE: Jul 15, 2012 8:59:10 AM org.apache.cxf.jaxrs.utils.JAXRSUtils readFromMessageBody SEVERE: Error deserializing input stream into target class UserActivity, content type : / Jul 15, 2012 8:59:10 AM org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper toResponse WARNING: WebApplicationException has been caught : No content to map to Object due to end of input

and the JsonInput is : {"pageURL":"https://google.com,"activityType":"LOGIN","userGUID":"105"}

and if I try same input with test client it is working... any idea what's going on here, am i missing any library?

Any suggestions would be more appreciated.

TP_JAVA
  • 1,002
  • 5
  • 23
  • 49

2 Answers2

2

You are missing quote after google.com URL thus the JSON is not well-formed.

Should be:

{"pageURL":"https://google.com","activityType":"LOGIN","userGUID":"105"}

You can always validate your JSON with free tools like:

Mike S.
  • 4,806
  • 1
  • 33
  • 35
  • Mine is valid but example you showed above is not. You are missing the double quote after google.com and that is why your JSON is not working. ;-) – Mike S. Jul 15 '12 at 13:44
0

Got it resolved..

I was Not passing proper request value to Jersey client.

Thanks

TP_JAVA
  • 1,002
  • 5
  • 23
  • 49
  • I trust my answer was correct so can you give it the green check for accepted answer please? Glad you got it fixed! – Mike S. Jul 15 '12 at 14:37
  • Mike, the Jsonrequest is correct but I'm sending no input param for Jersey post method. There is no problem with the json request as you said. – TP_JAVA Jul 17 '12 at 21:35