X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fcom%2Findexdata%2Fmkjsf%2Fpazpar2%2FServiceProxyClient.java;h=e5d7307c08713f33013468f7fc883aec5deae0d1;hb=5211ca6a4525491499ac763373a703e35bdce37f;hp=ace35b1be41591ea02a620d00524994813eb9e74;hpb=86f289cd42ba95846c80d22129ed565e4e9d6dde;p=mkjsf-moved-to-github.git diff --git a/src/main/java/com/indexdata/mkjsf/pazpar2/ServiceProxyClient.java b/src/main/java/com/indexdata/mkjsf/pazpar2/ServiceProxyClient.java index ace35b1..e5d7307 100644 --- a/src/main/java/com/indexdata/mkjsf/pazpar2/ServiceProxyClient.java +++ b/src/main/java/com/indexdata/mkjsf/pazpar2/ServiceProxyClient.java @@ -44,6 +44,20 @@ import com.indexdata.mkjsf.utils.Utils; /** * Search client handling Service Proxy requests. * + *

Configuration

+ * + * Configuration name: proxyclient + * + *

When configuring the client using the Mk2Config scheme, this is the prefix to + * use in the .properties file. When using web.xml context parameters for configuration + * the configuration name has no effect.

+ * + *

ServiceProxyClient will acknowledge following configuration parameters: + * + *

+ * * @author Niels Erik * */ @@ -241,8 +255,10 @@ public class ServiceProxyClient implements SearchClient { return initDocPaths; } - public HttpResponseWrapper postInitDoc(byte[] initDoc, boolean includeDebug) { - HttpPost post = new HttpPost(serviceUrl+"?command=init" + (includeDebug? "&includeDebug=yes" : "")); + public HttpResponseWrapper postInitDoc(byte[] initDoc, Pazpar2Command command) { + String requestParameters = command.getEncodedQueryString(); + logger.info("Initiating session with init doc and [" + requestParameters +"]"); + HttpPost post = new HttpPost(serviceUrl+"?" + requestParameters); post.setEntity(new ByteArrayEntity(initDoc)); ClientCommandResponse commandResponse = null; byte[] response;