You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jclouds.apache.org by Joshua Braun <jo...@esentri.com> on 2014/05/30 09:20:08 UTC

Fwd: Delivery Status Notification (Failure)

Hi Andrew,

my problem is, i don't know how to use this class correctly. The error i
got from Google, "bad content: parse error". Do you have a example for me,
how to use it correctly or a documentation? So i can see perhaps my mistake
:-)

Cheers,

Josh

Re: Fwd: Delivery Status Notification (Failure)

Posted by Andrew Phillips <ap...@qrmedia.com>.
> my problem is, i don't know how to use this class correctly. The error i
> got from Google, "bad content: parse error". Do you have a example for me,
> how to use it correctly or a documentation?

Could you enable wire and header logging [1] and put what is actually  
being sent and received (minus passwords etc., obviously ;-)) into a  
Pastie or Gist?

Thanks!

ap

[1] http://jclouds.apache.org/reference/logging/

Re: Delivery Status Notification (Failure)

Posted by Inbar Stolberg <in...@gmail.com>.
thanks andrew I will try to move to jclouds 1.7 and take it from there...
on that note is there a jclouds repo with the openstack labs project merged
into latest (or one of the latest) jclouds 1.7?


On Mon, Jun 2, 2014 at 5:33 PM, Inbar Stolberg <in...@gmail.com> wrote:

> thanks andrew I will try to move to jclouds 1.7 and take it from there...
> on that note is there a jclouds repo with the openstack labs project
> merged into latest (or one of the latest) jclouds 1.7?
>
>
> On Fri, May 30, 2014 at 10:20 AM, Joshua Braun <jo...@esentri.com>
> wrote:
>
>> Hi Andrew,
>>
>> my problem is, i don't know how to use this class correctly. The error i
>> got from Google, "bad content: parse error". Do you have a example for me,
>> how to use it correctly or a documentation? So i can see perhaps my
>> mistake
>> :-)
>>
>> Cheers,
>>
>> Josh
>>
>
>

Fwd: Delivery Status Notification (Failure)

Posted by Joshua Braun <jo...@esentri.com>.
I enabled wire and header logging and put into a Pastie [1]. But all looks
fine ... i think so. But at the moment it didn't work. You can see the
response from Google is "title":"Untitled". I hope u can help me :-) My
assumption is the json content are not correctly or the parts of the
content. In the second Pastie [2], i want to POST a new Folder and same
 thing, it looks fine... but didn't really work.

Second Example:

    @Named("Files:folder")
    @POST
    @OAuthScopes(DriveConstants.DRIVE_SCOPE)
    @Path("upload/drive/v2/files")
    @Consumes
    @Produces(MediaType.APPLICATION_JSON)
    @ResponseParser(ParseObjectFrom.class)
    ListenableFuture<DriveResponseUpload> putContainer
(@BinderParam(BindUploadMetadataToContainer.class) DriveRequest
driveRequest,

         @QueryParam(value = "uploadType") String uploadType);

BindUploadMetadataToContainer.java

@Override
    public <R extends HttpRequest> R bindToRequest(R request, Object input)
{
        checkArgument(checkNotNull(input, "input") instanceof DriveRequest,
"this binder is only valid for DriveObject");
        DriveRequest driveRequest = DriveRequest.class.cast(input);

        Gson gson = new Gson();
        String payLoad = gson.toJson(driveRequest);

        try {
            request.setPayload(payLoad.getBytes("UTF8"));

request.getPayload().getContentMetadata().setContentType(driveRequest.getMimeType());
        } catch (UnsupportedEncodingException ueEx) {
            System.err.println(ueEx.toString());
        }

        return request;
    }

If i change to @Produces("application/vnd.google-apps.folder"), it works
but without the correct title ("Untitled"). It looks sometimes like a
problem from Google but i want to know what you are thinking about :-)

Cheers,

Josh

[1] http://pastie.org/9250551
[2] http://pastie.org/9250579

Re: Delivery Status Notification (Failure)

Posted by Everett Toews <ev...@RACKSPACE.COM>.
On Jun 2, 2014, at 9:57 AM, Andrew Phillips <ap...@qrmedia.com> wrote:

>> thanks andrew I will try to move to jclouds 1.7 and take it from there...
>> on that note is there a jclouds repo with the openstack labs project merged
>> into latest (or one of the latest) jclouds 1.7?
> 
> Labs projects are promoted one-by-one as we feel they are sufficiently mature. I am not aware of any work right now to migrate any of the labs-openstack modules, but I'm sure this will happen as soon as the jclouds team members working on OpenStack feel the time is right.

I read this question a different way..

All of the jclouds-labs-openstack projects in the jclouds-labs-openstack repo [1] are included in every release. e.g. There is a 1.7.3 version of openstack-marconi that you can download from Maven Central [2].

To find out what state they’re in in terms of development maturity, consult the table in the Summary section [3].

Everett

[1] https://github.com/jclouds/jclouds-labs-openstack/
[2] http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.jclouds.labs%22
[3] https://github.com/jclouds/jclouds-labs-openstack/#summary

Re: Delivery Status Notification (Failure)

Posted by Andrew Phillips <ap...@qrmedia.com>.
> thanks andrew I will try to move to jclouds 1.7 and take it from there...
> on that note is there a jclouds repo with the openstack labs project merged
> into latest (or one of the latest) jclouds 1.7?

Labs projects are promoted one-by-one as we feel they are sufficiently  
mature. I am not aware of any work right now to migrate any of the  
labs-openstack modules, but I'm sure this will happen as soon as the  
jclouds team members working on OpenStack feel the time is right.

ap

Re: Delivery Status Notification (Failure)

Posted by Inbar Stolberg <in...@gmail.com>.
thanks andrew I will try to move to jclouds 1.7 and take it from there...
on that note is there a jclouds repo with the openstack labs project merged
into latest (or one of the latest) jclouds 1.7?


On Fri, May 30, 2014 at 10:20 AM, Joshua Braun <jo...@esentri.com>
wrote:

> Hi Andrew,
>
> my problem is, i don't know how to use this class correctly. The error i
> got from Google, "bad content: parse error". Do you have a example for me,
> how to use it correctly or a documentation? So i can see perhaps my mistake
> :-)
>
> Cheers,
>
> Josh
>