2014-11-25 77 views
1

我有过普通人\ Neo4j的执行暗号询问一些问题。当卷曲请求被编码并被发送到http://localhost:7474/db/data/cypher,一个空的响应被发送回用HTTP 200状态。Neo4j的空响应暗号

我登录到终端,我可以看到neo4j-service是正确的端口上运行,我可以用neo4j-shell连接和运行我试图执行Cypher支架。我也可以通过终端连接到多个端点并获得有效的响应。看来Cypher是唯一的问题。

这里是卷曲配置的转储:

array(8) { 
    [10002]=> 
    string(36) "http://localhost:7474/db/data/cypher" 
    [19913]=> 
    int(1) 
    [42]=> 
    int(1) 
    [10023]=> 
    array(5) { 
    [0]=> 
    string(36) "Accept: application/json;stream=true" 
    [1]=> 
    string(30) "Content-type: application/json" 
    [2]=> 
    string(26) "User-Agent: neo4jphp/0.1.0" 
    [3]=> 
    string(14) "X-Stream: true" 
    [4]=> 
    string(19) "Content-Length: 309" 
    } 
    [10036]=> 
    string(4) "POST" 
    [47]=> 
    int(1) 
    [10015]=> 
    string(309) "{"query":"MATCH ..."}" 

[113] => INT(1) }

我试图重新启动服务和没有成功重新引导服务器。错误日志或HTTP日志中没有任何兴趣。

我运行的Neo4j社区版2.1.5。

回答

0

我这就给我的机器上一试,我至少得到一个回应的,我发送请求:

<?php 
    require('vendor/autoload.php'); 
    use Everyman\Neo4j\Cypher\Query; 

    $client = new Everyman\Neo4j\Client('localhost', 7534); 

    $queryString = "MATCH (p:Person) RETURN p LIMIT 1"; 
    $query = new Everyman\Neo4j\Cypher\Query($client, $queryString); 
    $result = $query->getResultSet(); 

    foreach ($result as $row) { 
     echo $row['p']->getProperty('name') . "\n"; 
    } 

,然后当我运行,这是我的输出中所看到的的ngrep: T 127.0.0.1:55145 -> 127.0.0.1:7534 [AP] POST /db/data/cypher HTTP/1.1..Host: localhost:7534..Accept: application/json;stream=true..Content-type: application/json..User-Agent: neo4jphp/0.1.0..X-Stream: true..Content -Length: 45....{"query":"MATCH (p:Person) RETURN p LIMIT 1"} ## T 127.0.0.1:7534 -> 127.0.0.1:55145 [AP] HTTP/1.1 200 OK..Content-Type: application/json; charset=UTF-8; stream=true..Access-Control-Allow- Origin: *..Transfer-Encoding: chunked..Server: Jetty(9.0.5.v20130815)....486 ..{"columns":["p"],"data":[[{"extensions":{},"outgoing_relationships":"http://localhost:7534/db/data/node/1/relationships/out","labels":"http://localhost:7534/db/data/node/1/ labels","traverse":"http://localhost:7534/db/data/node/1/traverse/{returnType}","all_typed_relationsh ips":"http://localhost:7534/db/data/node/1/relationships/all/{-list|&|typ es}","self":"http://localhost:7534/db/data/node/1","property":"http://localhost:7534/db/data/node/1/properties/{key}","properties":"http://localhost:7534/db/data/node/1/prope rties","outgoing_typed_relationships":"http://localhost:7534/db/data/node/1/relationships/out/{-list|&|types}","incoming_relationships":"http://localhost:7534/db/data/node/1/ relationships/in","create_relationship":"http://localhost:7534/db/data/node/1/relationships","paged_t raverse":"http://localhost:7534/db/data/node/1/paged/traverse/{returnType }{? pageSize,leaseTime}","all_relationships":"http://localhost:7534/db/data/node/1/relationships/all","in coming_typed_relationships":"http://localhost:7534/db/data/node/1/rela tionships/in/{-list|&|types}","metadata":{"id":1,"labels":["Person"]},"data": {"born":1964,"name":"Keanu Reeves"}}]]} #####################

我有什么对你有什么不同?