import org.apache.http.conn.scheme.PlainSocketFactory;\r
import org.apache.http.conn.scheme.Scheme;\r
import org.apache.http.conn.scheme.SchemeRegistry;\r
+import org.apache.http.entity.ByteArrayEntity;\r
import org.apache.http.entity.FileEntity;\r
import org.apache.http.impl.client.DefaultHttpClient;\r
import org.apache.http.impl.conn.PoolingClientConnectionManager;\r
return initDocPaths;\r
}\r
\r
+ public byte[] postInitDoc(byte[] initDoc) throws IOException {\r
+ HttpPost post = new HttpPost(serviceUrl+"?command=init&includeDebug=yes");\r
+ post.setEntity(new ByteArrayEntity(initDoc));\r
+ byte[] response = client.execute(post, handler);\r
+ logger.info("Response on POST was: " + new String(response,"UTF-8")); \r
+ return response;\r
+ }\r
+ \r
public void setServiceProxyUrl (String url) {\r
serviceUrl = url;\r
}\r
public void setInitFileName (String fileName); \r
public String getInitFileName();\r
public String postInit() throws UnsupportedEncodingException, IOException;\r
+ public String postInit(byte[] initDoc) throws UnsupportedEncodingException, IOException;\r
public String getInitResponse();\r
public void setServiceProxyUrl(String url);\r
public String getServiceProxyUrl();\r
initDocResponse = new String(response,"UTF-8");\r
return initDocResponse;\r
}\r
+ \r
+ @Override\r
+ public String postInit(byte[] initDoc) throws UnsupportedEncodingException, IOException { \r
+ this.resetDataObjects();\r
+ byte[] response = client().postInitDoc(initDoc);\r
+ initDocResponse = new String(response,"UTF-8");\r
+ return initDocResponse;\r
+ }\r
+\r
\r
@Override\r
public void setServiceProxyUrl(String url) {\r