jclouds-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nirmal Fernando <nir...@wso2.com>
Subject Re: INTERNAL_SERVER_ERROR on getting versions of a vcloud server
Date Wed, 01 Jan 2014 17:01:14 GMT
Hi Ignasi,

Sorry, I'm not the jaxrs expert, can you please point to a sample where I
can set a header using @Consumes?

This is how the class looks like now and my fix was to add the filter.

/**
 * Establishes a context with a VCloud endpoint.
 * <p/>
 *
 * @see <a href="
https://community.vcloudexpress.terremark.com/en-us/discussion_forums/f/60.aspx"
/>
 * @author Adrian Cole
 */
*@RequestFilters(VcloudSupportedVersions.class)*
public interface VCloudVersionsAsyncClient extends Closeable {

   /**
    * Retrieve information for supported versions
    */
   @GET
   @XMLResponseParser(SupportedVersionsHandler.class)
   @Path("/versions")
   ListenableFuture<SortedMap<String, URI>> getSupportedVersions();
}


On Wed, Jan 1, 2014 at 9:40 PM, Ignasi Barrera <ignasi.barrera@gmail.com>wrote:

> More than a request filter, could you try to add a @Consumes annotation at
> class level to include that header in the methods that don't override it
> explicitly?
>
> That would reduce the complexity too and remove the need for an additional
> filter.
> El 01/01/2014 17:07, "Andrew Phillips" <andrewp@apache.org> escribió:
>
>  Thanks for your thoughts. As Andrew said, I think the much safer approach
>>> would be to handle this at the vcloud level. So, I've implemented a
>>> request
>>> filter for VCloudVersionsAsyncClient and it works fine.
>>>
>>
>> That sounds cool! Any chance you could submit this as a pull request, or
>> at least share the code diff so that we can fix this?
>>
>> Thanks!
>>
>> ap
>>
>


-- 

Thanks & regards,
Nirmal

Senior Software Engineer- Platform Technologies Team, WSO2 Inc.
Mobile: +94715779733
Blog: http://nirmalfdo.blogspot.com/

Mime
View raw message