create meme

2 views
Skip to first unread message

Shamsh

unread,
Apr 17, 2008, 1:34:52 AM4/17/08
to ASAPI Developers
$postarg = "memeDocument":
{
"name":"test",
"scope":"public",
"source":"",
"text":"Test Test Test",
"description":"",
"categoryID":""
}

$postUrl = http://web.alitora.com/ASAPI_REST/asapi/0001/json/meme/create?sessionID=M_B.12084059802260.7995660212055935

Using the above post argument which was posted to the above post url I
got the following error

"Internal Server Error
The server encountered an unexpected condition which prevented it from
fulfilling the request."

Why the problem arise?
Is there any problem with $post argument?

siaroslaw

unread,
Apr 17, 2008, 5:03:15 AM4/17/08
to ASAPI Developers
Hi,

the posted entity is incorrect. Tthere are no curly braces wrapping
the memeDocument (see ASAPI RESTful Interface documentation).
On the other hand, I will add the proper error handling to avoid
further confusions.

Thanks,
Derek


On Apr 17, 7:34 am, Shamsh <shamsh.tab...@gmail.com> wrote:
> $postarg = "memeDocument":
> {
> "name":"test",
> "scope":"public",
> "source":"",
> "text":"Test Test Test",
> "description":"",
> "categoryID":""
> }
>
> $postUrl =http://web.alitora.com/ASAPI_REST/asapi/0001/json/meme/create?session...

Shamsh

unread,
Apr 17, 2008, 7:56:21 AM4/17/08
to ASAPI Developers
ok i made it correct.Now....
after creating the meme i put it to the following url with memeUMIS
entity.
http://web.alitora.com/ASAPI_REST/asapi/0001/json/memory/Com.Memomics.AlitoraSystems.memomics.1155756/Com.Memomics.AlitoraSystems.memomics.1155843?sessionID=M_B.12084256163980.9820356860603904
It response http_code 200
But nothing in the response body.
So how could i know that it is successfull?

How can i get the meme list of a directory?

Dariusz Kobylarz

unread,
Apr 17, 2008, 8:53:13 AM4/17/08
to ASAPI Developers
Hi,

> after creating the meme i put it to the following url with memeUMIS
> entity.http://web.alitora.com/ASAPI_REST/asapi/0001/json/memory/Com.Memomics...
> It response http_code 200
> But nothing in the response body.
> So how could i know that it is successfull?

are you sure you create PUT (not POST) request with umis of the meme
placed in request entity? I cannot see any PUT requests in the log.

> How can i get the meme list of a directory?

Currently fetching of a single branch was not planned to be
implemented.
Please, use GET "/memory" request.

Thanks,
Derek

Shamsh

unread,
Apr 18, 2008, 12:46:26 AM4/18/08
to ASAPI Developers
I use following curl functions to put data
where ,
$postUrl = http://web.alitora.com/ASAPI_REST/asapi/0001/json/memory/teamUMIS/newMemeUMIS?sessionID=sessionID
and $postargs = newMemeUMIS

$session = curl_init($postUrl);
curl_setopt ($session, CURLOPT_PUT, true);
curl_setopt($session, CURLOPT_HEADER, true);
curl_setopt ($session, CURLOPT_POSTFIELDS, $postargs);
curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($session);

but after 60 seconds it says that
"Fatal error: Maximum execution time of 60 seconds exceeded"
What is the problem?

John DeSanto

unread,
Apr 18, 2008, 12:53:30 AM4/18/08
to asap...@googlegroups.com

I may be misunderstanding what you've written, but your post url needs
to expand the sessionID variable. Posting that literal string won't
work.

John

Shamsh

unread,
Apr 18, 2008, 12:57:47 AM4/18/08
to ASAPI Developers
i was send a shortcut url
the original one is following
http://web.alitora.com/ASAPI_REST/asapi/0001/json/memory/Com.Memomics.AlitoraSystems.memomics.1155941?sessionID=M_B.12084344015540.6978464770673092
is it ok


On Apr 18, 10:53 am, John DeSanto <desa...@mac.com> wrote:
> I may be misunderstanding what you've written, but your post url needs
> to expand the sessionID variable. Posting that literal string won't
> work.
>
> John
>
> On Apr 17, 2008, at 9:46 PM, Shamsh wrote:
>
>
>
> > I use following curl functions to put data
> > where ,
> > $postUrl =http://web.alitora.com/ASAPI_REST/asapi/0001/json/memory/teamUMIS/new...

Shamsh

unread,
Apr 18, 2008, 1:00:45 AM4/18/08
to ASAPI Developers
I also try this
http://web.alitora.com/ASAPI_REST/asapi/0001/json/memory/Com.Memomics.AlitoraSystems.memomics.1155756/Com.Memomics.AlitoraSystems.memomics.1155942?sessionID=M_B.12084344015540.6978464770673092

On Apr 18, 10:53 am, John DeSanto <desa...@mac.com> wrote:
> I may be misunderstanding what you've written, but your post url needs
> to expand the sessionID variable. Posting that literal string won't
> work.
>
> John
>
> On Apr 17, 2008, at 9:46 PM, Shamsh wrote:
>
>
>
> > I use following curl functions to put data
> > where ,
> > $postUrl =http://web.alitora.com/ASAPI_REST/asapi/0001/json/memory/teamUMIS/new...

Dariusz Kobylarz

unread,
Apr 18, 2008, 2:38:31 AM4/18/08
to ASAPI Developers
Hi,

do you still experience any problems? I see you successfully put memes
in memory now.
GET the "/memory" and you will see ~20 memes and topics.

Derek

On Apr 18, 7:00 am, Shamsh <shamsh.tab...@gmail.com> wrote:
> I also try thishttp://web.alitora.com/ASAPI_REST/asapi/0001/json/memory/Com.Memomics...

Shamsh

unread,
Apr 18, 2008, 4:53:38 AM4/18/08
to ASAPI Developers
Still i get the error
"Fatal error: Maximum execution time of 60 seconds exceeded"


On Apr 18, 12:38 pm, Dariusz Kobylarz <darek.kobyl...@gmail.com>

Dariusz Kobylarz

unread,
Apr 18, 2008, 7:03:29 AM4/18/08
to ASAPI Developers
Hi,
I cannot reproduce the error and there's nothing in apache and tomcat
logs. Which particualr request causes the error? Is it random?

Derek

Shamsh

unread,
Apr 18, 2008, 7:42:59 AM4/18/08
to ASAPI Developers
it is sever max_execution_time error.
I extend the default time now is working but quite slow.

Shamsh

unread,
Apr 19, 2008, 6:54:57 AM4/19/08
to ASAPI Developers
Hey I got following curl_error when i put a newly created meme into
memory topic, but i saw yhat the meme was created successfully
curl_error = "Send failure: Connection was aborted "

Dariusz Kobylarz

unread,
Apr 21, 2008, 6:42:09 AM4/21/08
to ASAPI Developers
Hi,
I'd like to know whether the "Send failure: Connection was aborted"
error still exists.
I would see if I could help then.

Thanks,
Derek
Reply all
Reply to author
Forward
0 new messages