Spring, Jackson and Customization (e.g. CustomDeserializer)

You don’t say how you’re using Jackson in Spring, so I’ll assume you’re using it through <mvc:annotation-driven/> and the @RequestBody and/or @ResponseBody annotations. One of the things that <mvc:annotation-driven/> does is to register a AnnotationMethodHandlerAdapter bean which comes with a number of pre-configured HttpMessageConverter beans, including MappingJacksonHttpMessageConverter, which handles marshalling to and from Jackson-annotated model … Read more

WSDL vs REST Pros and Cons

The two protocols have very different uses in the real world. SOAP(using WSDL) is a heavy-weight XML standard that is centered around document passing. The advantage with this is that your requests and responses can be very well structured, and can even use a DTD. The downside is it is XML, and is very verbose. … Read more

A message body writer for Java type, class myPackage.B, and MIME media type, application/octet-stream, was not found

In your client code you are not specifying the content type of the data you are sending – so Jersey is not able to locate the right MessageBodyWritter to serialize the b1 object. Modify the last line of your main method as follows: ClientResponse response = resource.type(MediaType.APPLICATION_XML).put(ClientResponse.class, b1); And add @XmlRootElement annotation to class B … Read more

How can I verify a Google authentication API access token?

For user check, just post get the access token as accessToken and post it and get the response https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=accessToken you can try in address bar in browsers too, use httppost and response in java also response will be like { “issued_to”: “xxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com”, “audience”: “xxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com”, “user_id”: “xxxxxxxxxxxxxxxxxxxxxxx”, “scope”: “https://www.googleapis.com/auth/userinfo.profile https://gdata.youtube.com”, “expires_in”: 3340, “access_type”: “offline” } The … Read more

Why would one use REST instead of SOAP based services? [closed]

Less overhead (no SOAP envelope to wrap every call in) Less duplication (HTTP already represents operations like DELETE, PUT, GET, etc. that have to otherwise be represented in a SOAP envelope). More standardized – HTTP operations are well understood and operate consistently. Some SOAP implementations can get finicky. More human readable and testable (harder to … Read more

How to consume a web service from VB6?

I use this function to get data from a web service. Private Function HttpGetRequest(url As String) As DOMDocument Dim req As XMLHTTP60 Set req = New XMLHTTP60 req.Open “GET”, url, False req.send “” Dim resp As DOMDocument If req.responseText <> vbNullString Then Set resp = New DOMDocument60 resp.loadXML req.responseText Else Set resp = req.responseXML End … Read more