Wednesday 15 June 2011

calabash and json

  
<p:unescape-markup content-type="application/json"/>
There seem to be two problems:

  1. Leading white space causes failure.
  2. content type may have charset e.g. content-type="application/json;charset="UTF-8"" 
Fix for first is to use nextClean() in place of next() in com.xmlcalabash.util.JSONtoXML.java
  private static void build(TreeWriter tree, JSONTokener jt) {
        tree.addStartElement(_json);

        try {
            char ch = jt.nextClean();
            jt.back();

Wednesday 1 June 2011

proxy stuff

Goal running fuseki on another server
step 1: set fixed ip for T42= 192.168.1.9
step 2: Set apache config
/etc/frontview/apache/addons/sparqlproxy.conf
LoadModule proxy_module /usr/local/apache2/modules/mod_proxy.so
LoadModule proxy_http_module /usr/local/apache2/modules/mod_proxy_http.so

ProxyRequests Off

 
      Order deny,allow
      Allow from all


ProxyPass /sparql http://192.168.1.9:3030/
ProxyPassReverse /sparql http://192.168.1.9:3030/
More work required, based on this