Hey all,

I've been using GAE/J and restlet for long enough that this shouldn't
be stumping me, but it is. I've tried a few things and web-searched,
but to no avail.

I'm trying to schedule a task with a payload

    public static void queueStorePaymentTransaction( User user,
AccountPayment ap ) {
        XStream xstream = new XStream();
        String payload = xstream.toXML(ap);
        TaskOptions taskOptions;
        try {
                        taskOptions = TaskOptions.Builder.withUrl("/task/
storePaymentTransaction").payload(payload.getBytes("UTF-8"),"text/
xml");
                        Queue queue = QueueFactory.getDefaultQueue();
                        queue.add( taskOptions );
                } catch (UnsupportedEncodingException e) {
                        throw new RuntimeException();
                }
    }

And I have tried functions like this for "picking up" the transaction:

    @Post("xml:xml|json")
    public GenericData postMethodText() {
        return runTask();
    }

But I always get this response, even when I've tried different
arguments to the "Post" annotation.

Web hook at http://0.0.0.0:8888/task/storePaymentTransaction returned
status code 415.  Rescheduling...

I can work around this using a parameter instead of a payload (I've
got that working just fine), but the payload seems more appropriate
here. Any advice about what I'm missing are super appreciated!

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to