I have a problem when using OrientDB and Rexster REST API. When I post complex documents, they will be corrupt and be presented in a really strange way with double equal signs (marked in red below). The first response I got when I post is I've tested to use ThinkerGraph implementation instead and it works without problem. Is this a bug in OrientDB implementation?
OrientDBPOST /graphs/orientgraph-test/vertices/ HTTP/1.1
Host: localhost:8182
Connection: close
Accept-Encoding: gzip, deflate
User-Agent: Zend\Http\Client
Content-Length: 1091
Content-Type: application/json
Accept: application/json
{"weight":20,"width":10,"height":20,"depth":30,"estimatedCost":200,"sum":400,"consigneeAddress":{"name":"Company 4","address":["Lilla Bommen 6"],"zipCode":"41104","city":"G\u00f6teborg","country":{"name":"Sverige","code":"SV"},"contactName":"Contact Person 4","telephone":"0731123456","telefax":null,"mobileTelephone":"072345678","email":"
te...@company4.com","hiflexId":null},"deliveryAddress":{"name":"Company 5","address":["Stora Enens V\u00e4g 38"],"zipCode":"43931","city":"Onsala","country":{"name":"Sverige","code":"SV"},"contactName":"Contact Person 5","telephone":"030060094","telefax":null,"mobileTelephone":null,"email":"
te...@company5.com","hiflexId":null},"pickupAddress":{"name":"Pickup Company 2","address":["Drottninggatan 1"],"zipCode":"41103","city":"G\u00f6teborg","country":{"name":"Sverige","code":"SV"},"contactName":"Contact Person 6","telephone":"071234567","telefax":null,"mobileTelephone":null,"email":"
te...@pickupcompany2.com","hiflexId":null},"shippingMethod":{"name":"Posten MyPack","code":"postenmypack","templateName":"POSTENMYPACK","rates":[]},"type":"shipment"}
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
server: grizzly/2.2.16
Access-Control-Allow-Origin: *
Vary: Accept
Date: Sun, 04 Aug 2013 16:54:32 GMT
Connection: close
Transfer-Encoding: chunked
{"version":"2.3.0","results":{"weight":20,"height":20,"consigneeAddress":{"mobileTelephone":"072345678","telefax":null,"email":"
te...@company4.com","address":["Lilla Bommen 6"],"contactName":"Contact Person 4","zipCode":"41104","name":"Company 4","hiflexId":null,"telephone":"0731123456","country":{"name":"Sverige","code":"SV"},"city":"Göteborg"},"width":10,"sum":400,"estimatedCost":200,"shippingMethod":{"name":"Posten MyPack","rates":[],"code":"postenmypack","templateName":"POSTENMYPACK"},"type":"shipment","depth":30,"deliveryAddress":{"mobileTelephone":null,"telefax":null,"email":"
te...@company5.com","address":["Stora Enens Väg 38"],"contactName":"Contact Person 5","zipCode":"43931","name":"Company 5","hiflexId":null,"telephone":"030060094","country":{"name":"Sverige","code":"SV"},"city":"Onsala"},"pickupAddress":{"mobileTelephone":null,"telefax":null,"email":"
te...@pickupcompany2.com","address":["Drottninggatan 1"],"contactName":"Contact Person 6","zipCode":"41103","name":"Pickup Company 2","hiflexId":null,"telephone":"071234567","country":{"name":"Sverige","code":"SV"},"city":"Göteborg"},"_id":"#8:8","_type":"vertex"},"queryTime":12.386492}
---------------
GET /graphs/orientgraph-test/vertices/8%3A9 HTTP/1.1
Host: localhost:8182
Connection: close
Accept-Encoding: gzip, deflate
User-Agent: Zend\Http\Client
Content-Type: application/json
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
server: grizzly/2.2.16
Access-Control-Allow-Origin: *
Date: Sun, 04 Aug 2013 16:58:10 GMT
Connection: close
Transfer-Encoding: chunked
{"version":"2.3.0","results":{"weight":20,"height":20,"consigneeAddress":{"mobileTelephone":"072345678","telefax":null,"email":"
te...@company1.com","address":["Lilla Bommen 6"],"contactName":"Contact Person 1","zipCode":"41104","name":"Company 1","hiflexId":null,"telephone":"0731123456","country":{"name":"Sverige","code":"SV"},"city":"Göteborg"},"width":10,"sum":400,"estimatedCost":200,"shippingMethod":{"name":"Posten MyPack","rates":[],"code":"postenmypack","templateName":"POSTENMYPACK"},"type":"shipment","depth":30,"deliveryAddress":{"mobileTelephone=null":null," telefax=null":null," email=
te...@company2.com":null," address=[Stora Enens Väg 38]":null," contactName=Contact Person 2":null," zipCode=43931":null," name=Company 2":null," hiflexId=null":null," telephone=030060094":null," country={name=Sverige, code=SV}":null," city=Onsala":null},"pickupAddress"
:{"mobileTelephone=null":null," telefax=null":null," email=te...@pickupcompany1.com":null," address=[Drottninggatan 1]":null," contactName=Contact Person 3":null," zipCode=41103":null," name=Pickup Company":null," hiflexId=null":null," telephone=071234567":null," country={name=Sverige, code=SV}":null," city=Göteborg":null},"_id":"#8:9","_type":"vertex"},"queryTime":0.921025}
Also tested in Gremlin console:gremlin> g.v('8:9').map();
==>weight=20
==>height=20
==>consigneeAddress={mobileTelephone=072345678,
telefax=null, email=
te...@company1.com, address=[Lilla Bommen 6],
contactName=Contact Person 1, zipCode=41104, name=Company 1,
hiflexId=null, telephone=0731123456, country={name=Sverige, code=SV},
city=Göteborg}
==>width=10
==>sum=400
==>estimatedCost=200
==>shippingMethod={name=Posten MyPack, rates=[], code=postenmypack, templateName=POSTENMYPACK}
==>type=shipment
==>depth=30
==>deliveryAddress={mobileTelephone=null=null,
telefax=null=null, email=
te...@company2.com=null, address=[Stora
Enens Väg 38]=null, contactName=Contact Person 2=null,
zipCode=43931=null, name=Company 2=null, hiflexId=null=null,
telephone=030060094=null, country={name=Sverige, code=SV}=null,
city=Onsala=null}
==>pickupAddress={mobileTelephone=null=null,
telefax=null=null, email=
te...@pickupcompany1.com=null,
address=[Drottninggatan 1]=null, contactName=Contact Person 3=null,
zipCode=41103=null, name=Pickup Company=null, hiflexId=null=null,
telephone=071234567=null, country={name=Sverige, code=SV}=null,
city=Göteborg=null}
ThinkerGraphPOST /graphs/tinkergraph-test/vertices/ HTTP/1.1
Host: localhost:8182
Connection: close
Accept-Encoding: gzip, deflate
User-Agent: Zend\Http\Client
Content-Length: 1091
Content-Type: application/json
Accept: application/json
{"weight":20,"width":10,"height":20,"depth":30,"estimatedCost":200,"sum":400,"consigneeAddress":{"name":"Company 4","address":["Lilla Bommen 6"],"zipCode":"41104","city":"G\u00f6teborg","country":{"name":"Sverige","code":"SV"},"contactName":"Contact Person 4","telephone":"0731123456","telefax":null,"mobileTelephone":"072345678","email":"
te...@company4.com","hiflexId":null},"deliveryAddress":{"name":"Company 5","address":["Stora Enens V\u00e4g 38"],"zipCode":"43931","city":"Onsala","country":{"name":"Sverige","code":"SV"},"contactName":"Contact Person 5","telephone":"030060094","telefax":null,"mobileTelephone":null,"email":"
te...@company5.com","hiflexId":null},"pickupAddress":{"name":"Pickup Company 2","address":["Drottninggatan 1"],"zipCode":"41103","city":"G\u00f6teborg","country":{"name":"Sverige","code":"SV"},"contactName":"Contact Person 6","telephone":"071234567","telefax":null,"mobileTelephone":null,"email":"
te...@pickupcompany2.com","hiflexId":null},"shippingMethod":{"name":"Posten MyPack","code":"postenmypack","templateName":"POSTENMYPACK","rates":[]},"type":"shipment"}
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
server: grizzly/2.2.16
Access-Control-Allow-Origin: *
Vary: Accept
Date: Sun, 04 Aug 2013 16:59:47 GMT
Connection: close
Transfer-Encoding: chunked
{"version":"2.3.0","results":{"consigneeAddress":{"mobileTelephone":"072345678","telefax":null,"email":"
te...@company4.com","address":["Lilla Bommen 6"],"contactName":"Contact Person 4","zipCode":"41104","name":"Company 4","hiflexId":null,"telephone":"0731123456","country":{"name":"Sverige","code":"SV"},"city":"Göteborg"},"height":20,"weight":20,"width":10,"sum":400,"shippingMethod":{"name":"Posten MyPack","rates":[],"code":"postenmypack","templateName":"POSTENMYPACK"},"estimatedCost":200,"type":"shipment","pickupAddress":{"mobileTelephone":null,"telefax":null,"email":"
te...@pickupcompany2.com","address":["Drottninggatan 1"],"contactName":"Contact Person 6","zipCode":"41103","name":"Pickup Company 2","hiflexId":null,"telephone":"071234567","country":{"name":"Sverige","code":"SV"},"city":"Göteborg"},"deliveryAddress":{"mobileTelephone":null,"telefax":null,"email":"
te...@company5.com","address":["Stora Enens Väg 38"],"contactName":"Contact Person 5","zipCode":"43931","name":"Company 5","hiflexId":null,"telephone":"030060094","country":{"name":"Sverige","code":"SV"},"city":"Onsala"},"depth":30,"_id":"34","_type":"vertex"},"queryTime":0.621352}
---------------
GET /graphs/tinkergraph-test/vertices/28 HTTP/1.1
Host: localhost:8182
Connection: close
Accept-Encoding: gzip, deflate
User-Agent: Zend\Http\Client
Content-Type: application/json
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
server: grizzly/2.2.16
Access-Control-Allow-Origin: *
Date: Sun, 04 Aug 2013 16:59:47 GMT
Connection: close
Transfer-Encoding: chunked
{"version":"2.3.0","results":{"consigneeAddress":{"mobileTelephone":"072345678","telefax":null,"email":"
te...@company1.com","address":["Lilla Bommen 6"],"contactName":"Contact Person 1","zipCode":"41104","name":"Company 1","hiflexId":null,"telephone":"0731123456","country":{"name":"Sverige","code":"SV"},"city":"Göteborg"},"height":20,"weight":20,"width":10,"sum":400,"shippingMethod":{"name":"Posten MyPack","rates":[],"code":"postenmypack","templateName":"POSTENMYPACK"},"estimatedCost":200,"type":"shipment","pickupAddress":{"mobileTelephone":null,"telefax":null,"email":"
te...@pickupcompany1.com","address":["Drottninggatan 1"],"contactName":"Contact Person 3","zipCode":"41103","name":"Pickup Company","hiflexId":null,"telephone":"071234567","country":{"name":"Sverige","code":"SV"},"city":"Göteborg"},"deliveryAddress":{"mobileTelephone":null,"telefax":null,"email":"
te...@company2.com","address":["Stora Enens Väg 38"],"contactName":"Contact Person 2","zipCode":"43931","name":"Company 2","hiflexId":null,"telephone":"030060094","country":{"name":"Sverige","code":"SV"},"city":"Onsala"},"depth":30,"_id":"28","_type":"vertex"},"queryTime":0.490975}
rexster.xml<rexster>
<http>
<server-port>8182</server-port>
<server-host>0.0.0.0</server-host>
<base-uri>
http://localhost</base-uri>
<web-root>public</web-root>
<character-set>UTF-8</character-set>
<enable-jmx>false</enable-jmx>
<enable-doghouse>true</enable-doghouse>
<max-post-size>2097152</max-post-size>
<max-header-size>8192</max-header-size>
<upload-timeout-millis>30000</upload-timeout-millis>
<thread-pool>
<worker>
<core-size>8</core-size>
<max-size>8</max-size>
</worker>
<kernal>
<core-size>4</core-size>
<max-size>4</max-size>
</kernal>
</thread-pool>
<io-strategy>leader-follower</io-strategy>
</http>
<rexpro>
<server-port>8184</server-port>
<server-host>0.0.0.0</server-host>
<session-max-idle>1790000</session-max-idle>
<session-check-interval>3000000</session-check-interval>
<connection-max-idle>180000</connection-max-idle>
<connection-check-interval>3000000</connection-check-interval>
<enable-jmx>false</enable-jmx>
<thread-pool>
<worker>
<core-size>8</core-size>
<max-size>8</max-size>
</worker>
<kernal>
<core-size>4</core-size>
<max-size>4</max-size>
</kernal>
</thread-pool>
<io-strategy>leader-follower</io-strategy>
</rexpro>
<shutdown-port>8183</shutdown-port>
<shutdown-host>127.0.0.1</shutdown-host>
<script-engine-reset-threshold>-1</script-engine-reset-threshold>
<script-engine-init>data/init.groovy</script-engine-init>
<script-engines>gremlin-groovy</script-engines>
<security>
<authentication>
<type>none</type>
<configuration>
<users>
<user>
<username>rexster</username>
<password>rexster</password>
</user>
</users>
</configuration>
</authentication>
</security>
<graphs>
<graph>
<graph-enabled>true</graph-enabled>
<graph-name>tinkergraph-test</graph-name>
<graph-type>tinkergraph</graph-type>
<graph-mock-tx>true</graph-mock-tx>
<extensions>
<allows>
<allow>tp:gremlin</allow>
</allows>
</extensions>
</graph>
<graph>
<graph-enabled>true</graph-enabled>
<graph-name>orientgraph-test</graph-name>
<graph-type>orientgraph</graph-type>
<graph-location>local:/rexster/orient-test</graph-location>
<properties>
<username>admin</username>
<password>admin</password>
</properties>
<extensions>
<allows>
<allow>tp:gremlin</allow>
</allows>
</extensions>
</graph>
</graphs>
</rexster>