[DIG-users] pellet http interface
Brought to you by:
dturi
|
From: <dan...@gm...> - 2007-04-21 16:23:56
|
Hi!
I do a small project for my studies at my university in Hungary, for =
which I would like a little help.
I'm making a searching engine, which uses an ontology to get some extra =
data for the searching. I already made the ontology, and would like to =
access it from the web browser. The page has been made with php. I used =
Protege for building the ontology, and Pellet 1.4 for the reasoning. =
Pellet supports DIG, and DIG has an http interface. So I thought I can =
send "ask" messages for the reasoner, from php.
I did it the following way:
$fp =3D fsockopen("localhost", 8081, $errno, $errstr, 30);
$msg =3D <my xml message>;
fwrite($fp,$msg);
while(!feof($fp))
$res .=3D fgets($fp, 1024);
So I can read out from $res the response. But the only things I get are =
error messages.
I did the following, to get properly formatted messages. Started the =
Protege and the pellet-dig, then checked the consistency of my ontology. =
This way in the pellet-dig terminal windows I saw all the messages that =
were sent and recieved. I copied one, and sent from my php page, but it =
didn't worked.
Has anyone ever accessed pellet-dig from anything but Java? I know this =
can be done from Java, but I thought that if it can by done directly =
from php, than it would be a lot easier for me.
If anyone know how to do this, please contact me. The sooner, the =
better. :)
Thanks,
Daniel
P.S.: Please excuse me for my grammar mistakes. |