Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndi Bur2018-12-10 09:39:12 +0000
committerPaolo Bazzi2018-12-13 15:06:54 +0000
commit15ac11f6b08a1332b7b7cbfbca58347b497d7373 (patch)
tree2e23a0e32e957add593ffb65e69cec53787d231f
parentdc7618efec18c650c661cff4eaa83ec449a3b31b (diff)
downloadorg.eclipse.scout.rt-15ac11f6b08a1332b7b7cbfbca58347b497d7373.tar.gz
org.eclipse.scout.rt-15ac11f6b08a1332b7b7cbfbca58347b497d7373.tar.xz
org.eclipse.scout.rt-15ac11f6b08a1332b7b7cbfbca58347b497d7373.zip
Add Cancellation and exception handling support to REST clients
Wrap REST client objects into a proxy that allows to cancel the ongoing request and that transparently transforms unsuccessful responses into appropriate exceptions. Cancellation support is provided by executing synchronous invocations asynchronously and actually by canceling the async execution only. The invoked service however cannot be cancelled in general. Additionally, this commit allows more than 2 concurrent connections and it fixes an exception in Apache HTTP client which has led to resource leaks. Change-Id: Id4f4194d1e3b92e3f6aab10c521701cf00f44ff4 Reviewed-on: https://git.eclipse.org/r/133774 Tested-by: CI Bot Reviewed-by: Paolo Bazzi <paolo.bazzi@bsi-software.com>
-rw-r--r--org.eclipse.scout.rt.rest.jersey.client/pom.xml13
-rw-r--r--org.eclipse.scout.rt.rest.jersey.client/src/main/java/org/eclipse/scout/rt/rest/jersey/client/JerseyClientConfigFactory.java109
-rw-r--r--org.eclipse.scout.rt.rest.jersey.client/src/main/java/org/glassfish/jersey/apache/connector/ClosingApacheConnector.java247
-rw-r--r--org.eclipse.scout.rt.rest.jersey.client/src/main/java/org/glassfish/jersey/apache/connector/ClosingApacheConnectorProvider.java27
-rw-r--r--org.eclipse.scout.rt.rest.jersey.test/.classpath36
-rw-r--r--org.eclipse.scout.rt.rest.jersey.test/.project23
-rw-r--r--org.eclipse.scout.rt.rest.jersey.test/.settings/.jsdtscope8
-rw-r--r--org.eclipse.scout.rt.rest.jersey.test/.settings/com.eclipsesource.jshint.ui.prefs3
-rw-r--r--org.eclipse.scout.rt.rest.jersey.test/.settings/de.loskutov.anyedit.AnyEditTools.prefs18
-rw-r--r--org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.core.resources.prefs18
-rw-r--r--org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.core.runtime.prefs2
-rw-r--r--org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.jdt.core.prefs396
-rw-r--r--org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.jdt.launching.prefs2
-rw-r--r--org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.jdt.ui.prefs127
-rw-r--r--org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.m2e.core.prefs4
-rw-r--r--org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.wst.html.core.prefs42
-rw-r--r--org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.wst.jsdt.core.prefs307
-rw-r--r--org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.wst.jsdt.ui.prefs100
-rw-r--r--org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.wst.jsdt.ui.superType.container1
-rw-r--r--org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.wst.jsdt.ui.superType.name1
-rw-r--r--org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.wst.validation.prefs10
-rw-r--r--org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.wst.xml.core.prefs19
-rw-r--r--org.eclipse.scout.rt.rest.jersey.test/.settings/org.sonarlint.eclipse.core.prefs7
-rw-r--r--org.eclipse.scout.rt.rest.jersey.test/pom.xml67
-rw-r--r--org.eclipse.scout.rt.rest.jersey.test/src/main/java/org/eclipse/scout/rt/rest/jersey/JerseyTestApplication.java135
-rw-r--r--org.eclipse.scout.rt.rest.jersey.test/src/main/java/org/eclipse/scout/rt/rest/jersey/JerseyTestRestClientHelper.java68
-rw-r--r--org.eclipse.scout.rt.rest.jersey.test/src/main/java/org/eclipse/scout/rt/rest/jersey/RestClientTestEchoDo.java85
-rw-r--r--org.eclipse.scout.rt.rest.jersey.test/src/main/java/org/eclipse/scout/rt/rest/jersey/RestClientTestEchoResponse.java40
-rw-r--r--org.eclipse.scout.rt.rest.jersey.test/src/main/java/org/eclipse/scout/rt/rest/jersey/RestClientTestEchoServlet.java135
-rw-r--r--org.eclipse.scout.rt.rest.jersey.test/src/main/resources/META-INF/scout.xml15
-rw-r--r--org.eclipse.scout.rt.rest.jersey.test/src/test/java/org/eclipse/scout/rt/rest/jersey/client/proxy/RestClientProxyInvocationTest.java710
-rw-r--r--org.eclipse.scout.rt.rest.jersey.test/src/test/java/org/eclipse/scout/rt/rest/jersey/client/proxy/RestClientProxyWebAppExceptionMappingTest.java77
-rw-r--r--org.eclipse.scout.rt.rest.jersey.test/src/test/resources/META-INF/scout.xml15
-rw-r--r--org.eclipse.scout.rt.rest.jersey.test/src/test/resources/logback-test.xml18
-rw-r--r--org.eclipse.scout.rt.rest.test/pom.xml10
-rw-r--r--org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/client/proxy/AbstractRestClientProxyFactoryTest.java64
-rw-r--r--org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/client/proxy/RestClientApiFootprintTest.java45
-rw-r--r--org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/client/proxy/RestClientProxyFactoryInvocationBuilderTest.java180
-rw-r--r--org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/client/proxy/RestClientProxyFactoryTest.java125
-rw-r--r--org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/client/proxy/api/ApiSignature.java120
-rw-r--r--org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/client/proxy/api/ApiSignatureDo.java49
-rw-r--r--org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/client/proxy/api/ClassSignatureDo.java116
-rw-r--r--org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/client/proxy/api/MethodSignatureDo.java95
-rw-r--r--org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/fixture/FixtureRuntimeDelegate.java61
-rw-r--r--org.eclipse.scout.rt.rest.test/src/test/resources/META-INF/services/javax.ws.rs.ext.RuntimeDelegate1
-rw-r--r--org.eclipse.scout.rt.rest.test/src/test/resources/logback-test.xml16
-rw-r--r--org.eclipse.scout.rt.rest.test/src/test/resources/org/eclipse/scout/rt/rest/client/proxy/restApiSignature.json2619
-rw-r--r--org.eclipse.scout.rt.rest/pom.xml15
-rw-r--r--org.eclipse.scout.rt.rest/src/main/java/org/eclipse/scout/rt/rest/client/AbstractRestClientHelper.java129
-rw-r--r--org.eclipse.scout.rt.rest/src/main/java/org/eclipse/scout/rt/rest/client/IRestClientConfigFactory.java31
-rw-r--r--org.eclipse.scout.rt.rest/src/main/java/org/eclipse/scout/rt/rest/client/IRestClientHelper.java28
-rw-r--r--org.eclipse.scout.rt.rest/src/main/java/org/eclipse/scout/rt/rest/client/proxy/AbstractEntityRestClientExceptionTransformer.java80
-rw-r--r--org.eclipse.scout.rt.rest/src/main/java/org/eclipse/scout/rt/rest/client/proxy/BasicRestClientExceptionTransformer.java50
-rw-r--r--org.eclipse.scout.rt.rest/src/main/java/org/eclipse/scout/rt/rest/client/proxy/ErrorDoRestClientExceptionTransformer.java38
-rw-r--r--org.eclipse.scout.rt.rest/src/main/java/org/eclipse/scout/rt/rest/client/proxy/IRestClientExceptionTransformer.java41
-rw-r--r--org.eclipse.scout.rt.rest/src/main/java/org/eclipse/scout/rt/rest/client/proxy/RestClientProxyFactory.java456
-rw-r--r--org.eclipse.scout.rt.team-project-set/scoutRT.psf1
-rw-r--r--org.eclipse.scout.rt/pom.xml7
58 files changed, 7174 insertions, 88 deletions
diff --git a/org.eclipse.scout.rt.rest.jersey.client/pom.xml b/org.eclipse.scout.rt.rest.jersey.client/pom.xml
index 93b5ad122e..b116bccf91 100644
--- a/org.eclipse.scout.rt.rest.jersey.client/pom.xml
+++ b/org.eclipse.scout.rt.rest.jersey.client/pom.xml
@@ -35,5 +35,18 @@
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
</dependency>
+
+ <!-- JAX-RS Jersey Client Apache Connector -->
+ <dependency>
+ <groupId>org.glassfish.jersey.connectors</groupId>
+ <artifactId>jersey-apache-connector</artifactId>
+ <optional>true</optional>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
</dependencies>
</project>
diff --git a/org.eclipse.scout.rt.rest.jersey.client/src/main/java/org/eclipse/scout/rt/rest/jersey/client/JerseyClientConfigFactory.java b/org.eclipse.scout.rt.rest.jersey.client/src/main/java/org/eclipse/scout/rt/rest/jersey/client/JerseyClientConfigFactory.java
new file mode 100644
index 0000000000..119c99a8c7
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.jersey.client/src/main/java/org/eclipse/scout/rt/rest/jersey/client/JerseyClientConfigFactory.java
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * Copyright (c) 2018 BSI Business Systems Integration AG.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * BSI Business Systems Integration AG - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.scout.rt.rest.jersey.client;
+
+import java.util.concurrent.TimeUnit;
+
+import javax.net.ssl.SSLSocketFactory;
+import javax.ws.rs.core.Configuration;
+
+import org.apache.http.config.RegistryBuilder;
+import org.apache.http.conn.HttpClientConnectionManager;
+import org.apache.http.conn.socket.ConnectionSocketFactory;
+import org.apache.http.conn.socket.PlainConnectionSocketFactory;
+import org.apache.http.conn.ssl.DefaultHostnameVerifier;
+import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
+import org.apache.http.conn.util.PublicSuffixMatcherLoader;
+import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
+import org.eclipse.scout.rt.platform.util.StringUtility;
+import org.eclipse.scout.rt.rest.client.IRestClientConfigFactory;
+import org.glassfish.jersey.apache.connector.ApacheClientProperties;
+import org.glassfish.jersey.apache.connector.ClosingApacheConnectorProvider;
+import org.glassfish.jersey.client.ClientConfig;
+
+/**
+ * Factory for creating JAX-RS client {@link Configuration} objects using Jersey.
+ */
+public class JerseyClientConfigFactory implements IRestClientConfigFactory {
+
+ @Override
+ public ClientConfig createClientConfig() {
+ ClientConfig clientConfig = new ClientConfig();
+ initConnectionProvider(clientConfig);
+ return clientConfig;
+ }
+
+ /**
+ * This default implementation delegates to {@link IJerseyConnectorProviderFactory#createConnectorProvider()}
+ */
+ protected void initConnectionProvider(ClientConfig clientConfig) {
+ clientConfig.connectorProvider(new ClosingApacheConnectorProvider());
+ clientConfig.property(ApacheClientProperties.CONNECTION_MANAGER, createConnectionManager());
+ }
+
+ /**
+ * Creates a preconfigured Apache HTTP {@link HttpClientConnectionManager}. This default implementation supports up to
+ * 32 concurrent connections to one particular route and 128 in total.
+ */
+ protected HttpClientConnectionManager createConnectionManager() {
+ String[] sslProtocols = StringUtility.split(System.getProperty("https.protocols"), "\\s*,\\s*");
+ String[] sslCipherSuites = StringUtility.split(System.getProperty("https.cipherSuites"), "\\s*,\\s*");
+
+ SSLConnectionSocketFactory sslConnectionSocketFactory = new SSLConnectionSocketFactory(
+ (SSLSocketFactory) SSLSocketFactory.getDefault(),
+ sslProtocols != null && sslProtocols.length > 0 ? sslProtocols : null,
+ sslCipherSuites != null && sslCipherSuites.length > 0 ? sslCipherSuites : null,
+ new DefaultHostnameVerifier(PublicSuffixMatcherLoader.getDefault()));
+
+ final PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(
+ RegistryBuilder.<ConnectionSocketFactory> create()
+ .register("http", PlainConnectionSocketFactory.getSocketFactory())
+ .register("https", sslConnectionSocketFactory)
+ .build(),
+ null, null, null, getKeepAliveTimeoutMillis(), TimeUnit.MILLISECONDS);
+ connectionManager.setValidateAfterInactivity(1);
+
+ final int maxTotal = getMaxConnectionsTotal();
+ if (maxTotal > 0) {
+ connectionManager.setMaxTotal(maxTotal);
+ }
+
+ final int defaultMaxPerRoute = getMaxConnectionsPerRoute();
+ if (defaultMaxPerRoute > 0) {
+ connectionManager.setDefaultMaxPerRoute(defaultMaxPerRoute);
+ }
+
+ return connectionManager;
+ }
+
+ /**
+ * Max timeout in ms connections are kept open when idle (requires keep-alive support). Default is 30 minutes.
+ */
+ protected long getKeepAliveTimeoutMillis() {
+ return TimeUnit.MINUTES.toMillis(30);
+ }
+
+ /**
+ * Max number of total concurrent connections managed by the {@link HttpClientConnectionManager} returned by
+ * {@link #createConnectionManager()}. Default is 128.
+ */
+ protected int getMaxConnectionsTotal() {
+ return 128;
+ }
+
+ /**
+ * Max number of concurrent connections per route managed by the {@link HttpClientConnectionManager} returned by
+ * {@link #createConnectionManager()}. Default is 32.
+ */
+ protected int getMaxConnectionsPerRoute() {
+ return 32;
+ }
+}
diff --git a/org.eclipse.scout.rt.rest.jersey.client/src/main/java/org/glassfish/jersey/apache/connector/ClosingApacheConnector.java b/org.eclipse.scout.rt.rest.jersey.client/src/main/java/org/glassfish/jersey/apache/connector/ClosingApacheConnector.java
new file mode 100644
index 0000000000..a21866b562
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.jersey.client/src/main/java/org/glassfish/jersey/apache/connector/ClosingApacheConnector.java
@@ -0,0 +1,247 @@
+/*******************************************************************************
+ * Copyright (c) 2018 BSI Business Systems Integration AG.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * BSI Business Systems Integration AG - initial API and implementation
+ ******************************************************************************/
+package org.glassfish.jersey.apache.connector;
+
+import java.io.BufferedInputStream;
+import java.io.ByteArrayInputStream;
+import java.io.FilterInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.AccessibleObject;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.net.URI;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.ws.rs.ProcessingException;
+import javax.ws.rs.client.Client;
+import javax.ws.rs.core.Configuration;
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.core.Response;
+
+import org.apache.http.Header;
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpHost;
+import org.apache.http.client.AuthCache;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpUriRequest;
+import org.apache.http.client.protocol.HttpClientContext;
+import org.apache.http.impl.auth.BasicScheme;
+import org.apache.http.impl.client.BasicAuthCache;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.eclipse.scout.rt.platform.exception.PlatformException;
+import org.glassfish.jersey.client.ClientRequest;
+import org.glassfish.jersey.client.ClientResponse;
+import org.glassfish.jersey.message.internal.HeaderUtils;
+import org.glassfish.jersey.message.internal.ReaderWriter;
+import org.glassfish.jersey.message.internal.Statuses;
+
+/**
+ * The original {@link ApacheConnector} does not close connections properly resulting in resource leaks. This class
+ * applies a patch that will be available in version 2.29 which is not yet released.
+ * <p>
+ * <b>Note:</b> This class must be in the original java package because {@link ApacheConnector} is declared
+ * package-private.
+ *
+ * @see <a href="https://github.com/eclipse-ee4j/jersey/issues/3629">Jersey Issue 3629 - ApacheConnector could throw
+ * ConnectionClosedException when using httpclient: 4.5.1+ with chunked transfer encoding</a>
+ * @see <a href="https://github.com/eclipse-ee4j/jersey/pull/3861">GitHub pull request 3861</a>
+ */
+// TODO [9.0] abr: remove this class as soon as jersey-apache-connector has been updated to 2.29+
+class ClosingApacheConnector extends ApacheConnector {
+
+ private static final Logger LOGGER = Logger.getLogger(ClosingApacheConnector.class.getName());
+
+ public ClosingApacheConnector(Client client, Configuration config) {
+ super(client, config);
+ }
+
+ @Override
+ @SuppressWarnings({"resource", "squid:S1141", "squid:RedundantThrowsDeclarationCheck"})
+ public ClientResponse apply(final ClientRequest clientRequest) throws ProcessingException {
+ final HttpUriRequest request = getUriHttpRequest(clientRequest);
+ final Map<String, String> clientHeadersSnapshot = writeOutBoundHeaders(clientRequest.getHeaders(), request);
+
+ try {
+ final CloseableHttpResponse response;
+ final HttpClientContext context = HttpClientContext.create();
+ if (isPreemptiveBasicAuth()) {
+ final AuthCache authCache = new BasicAuthCache();
+ final BasicScheme basicScheme = new BasicScheme();
+ authCache.put(getHost(request), basicScheme);
+ context.setAuthCache(authCache);
+ }
+ response = getClient().execute(getHost(request), request, context);
+ HeaderUtils.checkHeaderChanges(clientHeadersSnapshot, clientRequest.getHeaders(), this.getClass().getName());
+
+ final Response.StatusType status = response.getStatusLine().getReasonPhrase() == null
+ ? Statuses.from(response.getStatusLine().getStatusCode())
+ : Statuses.from(response.getStatusLine().getStatusCode(), response.getStatusLine().getReasonPhrase());
+
+ final ClientResponse responseContext = new ClientResponse(status, clientRequest);
+ final List<URI> redirectLocations = context.getRedirectLocations();
+ if (redirectLocations != null && !redirectLocations.isEmpty()) {
+ responseContext.setResolvedRequestUri(redirectLocations.get(redirectLocations.size() - 1));
+ }
+
+ final Header[] respHeaders = response.getAllHeaders();
+ final MultivaluedMap<String, String> headers = responseContext.getHeaders();
+ for (final Header header : respHeaders) {
+ final String headerName = header.getName();
+ List<String> list = headers.get(headerName);
+ if (list == null) {
+ list = new ArrayList<>();
+ }
+ list.add(header.getValue());
+ headers.put(headerName, list);
+ }
+
+ final HttpEntity entity = response.getEntity();
+
+ if (entity != null) {
+ if (headers.get(HttpHeaders.CONTENT_LENGTH) == null) {
+ headers.add(HttpHeaders.CONTENT_LENGTH, String.valueOf(entity.getContentLength()));
+ }
+
+ final Header contentEncoding = entity.getContentEncoding();
+ if (headers.get(HttpHeaders.CONTENT_ENCODING) == null && contentEncoding != null) {
+ headers.add(HttpHeaders.CONTENT_ENCODING, contentEncoding.getValue());
+ }
+ }
+
+ try {
+ responseContext.setEntityStream(getInputStream(response));
+ }
+ catch (final IOException e) {
+ LOGGER.log(Level.SEVERE, null, e);
+ }
+
+ return responseContext;
+ }
+ catch (final Exception e) {
+ throw new ProcessingException(e);
+ }
+ }
+
+ private static InputStream getInputStream(final CloseableHttpResponse response) throws IOException {
+
+ final InputStream inputStream;
+
+ if (response.getEntity() == null) {
+ inputStream = new ByteArrayInputStream(new byte[0]);
+ }
+ else {
+ @SuppressWarnings("resource")
+ final InputStream i = response.getEntity().getContent();
+ if (i.markSupported()) {
+ inputStream = i;
+ }
+ else {
+ inputStream = new BufferedInputStream(i, ReaderWriter.BUFFER_SIZE);
+ }
+ }
+
+ return new FilterInputStream(inputStream) {
+ @Override
+ public void close() throws IOException {
+ try {
+ super.close();
+ }
+ catch (@SuppressWarnings("squid:S1166") IOException ex) {
+ // Ignore
+ }
+ finally {
+ response.close();
+ }
+ }
+ };
+
+ }
+
+ // --- Helper methods for accessing private methods and fields in super class --------------------
+
+ private HttpUriRequest getUriHttpRequest(final ClientRequest clientRequest) {
+ return invokePrivateMethod(
+ "getUriHttpRequest",
+ new Class[]{ClientRequest.class},
+ HttpUriRequest.class,
+ this,
+ new Object[]{clientRequest});
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map<String, String> writeOutBoundHeaders(final MultivaluedMap<String, Object> headers, final HttpUriRequest request) {
+ return invokePrivateMethod(
+ "writeOutBoundHeaders",
+ new Class[]{MultivaluedMap.class, HttpUriRequest.class},
+ Map.class,
+ null,
+ new Object[]{headers, request});
+ }
+
+ private HttpHost getHost(final HttpUriRequest request) {
+ return invokePrivateMethod(
+ "getHost",
+ new Class[]{HttpUriRequest.class},
+ HttpHost.class,
+ this,
+ new Object[]{request});
+ }
+
+ private CloseableHttpClient getClient() {
+ return readPrivateField("client", CloseableHttpClient.class);
+ }
+
+ private boolean isPreemptiveBasicAuth() {
+ return readPrivateField("preemptiveBasicAuth", Boolean.class).booleanValue();
+ }
+
+ private static <T> T invokePrivateMethod(String methodName, Class[] parameterTypes, Class<T> returnType, Object instance, Object[] args) {
+ try {
+ Method method = ApacheConnector.class.getDeclaredMethod(methodName, parameterTypes);
+ makeAccessible(method);
+ return returnType.cast(method.invoke(instance, args));
+ }
+ catch (Exception e) {
+ throw new PlatformException("Could not invoke super method {}({})", methodName, parameterTypes, e);
+ }
+ }
+
+ private <T> T readPrivateField(String fieldName, Class<T> fieldType) {
+ try {
+ Field field = ApacheConnector.class.getDeclaredField(fieldName);
+ makeAccessible(field);
+ return fieldType.cast(field.get(this));
+ }
+ catch (Exception e) {
+ throw new PlatformException("Could not read field of super class {}", fieldName, e);
+ }
+ }
+
+ private static void makeAccessible(AccessibleObject o) {
+ if (System.getSecurityManager() == null) {
+ o.setAccessible(true);
+ }
+ else {
+ AccessController.doPrivileged((PrivilegedAction<Object>) () -> {
+ o.setAccessible(true);
+ return null;
+ });
+ }
+ }
+}
diff --git a/org.eclipse.scout.rt.rest.jersey.client/src/main/java/org/glassfish/jersey/apache/connector/ClosingApacheConnectorProvider.java b/org.eclipse.scout.rt.rest.jersey.client/src/main/java/org/glassfish/jersey/apache/connector/ClosingApacheConnectorProvider.java
new file mode 100644
index 0000000000..fd1eb7a82e
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.jersey.client/src/main/java/org/glassfish/jersey/apache/connector/ClosingApacheConnectorProvider.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2018 BSI Business Systems Integration AG.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * BSI Business Systems Integration AG - initial API and implementation
+ ******************************************************************************/
+package org.glassfish.jersey.apache.connector;
+
+import javax.ws.rs.client.Client;
+import javax.ws.rs.core.Configuration;
+
+import org.glassfish.jersey.client.spi.Connector;
+
+/**
+ * @see ClosingApacheConnector
+ */
+public class ClosingApacheConnectorProvider extends ApacheConnectorProvider {
+
+ @Override
+ public Connector getConnector(Client client, Configuration runtimeConfig) {
+ return new ClosingApacheConnector(client, runtimeConfig);
+ }
+}
diff --git a/org.eclipse.scout.rt.rest.jersey.test/.classpath b/org.eclipse.scout.rt.rest.jersey.test/.classpath
new file mode 100644
index 0000000000..0f930ed4f1
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.jersey.test/.classpath
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/org.eclipse.scout.rt.rest.jersey.test/.project b/org.eclipse.scout.rt.rest.jersey.test/.project
new file mode 100644
index 0000000000..5c86f866f6
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.jersey.test/.project
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.scout.rt.rest.jersey.test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.scout.rt.rest.jersey.test/.settings/.jsdtscope b/org.eclipse.scout.rt.rest.jersey.test/.settings/.jsdtscope
new file mode 100644
index 0000000000..555a5ca408
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.jersey.test/.settings/.jsdtscope
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="src" path="src/main/js" excluding="*-module.js"/>
+ <classpathentry kind="lib" path="src/main/resources/WebContent/res" excluding="*-macro.js"/>
+ <classpathentry exported="true" kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
diff --git a/org.eclipse.scout.rt.rest.jersey.test/.settings/com.eclipsesource.jshint.ui.prefs b/org.eclipse.scout.rt.rest.jersey.test/.settings/com.eclipsesource.jshint.ui.prefs
new file mode 100644
index 0000000000..00492d9645
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.jersey.test/.settings/com.eclipsesource.jshint.ui.prefs
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+included=src/main/js//*.js\:src/test/js//*.js
+projectSpecificOptions=true
diff --git a/org.eclipse.scout.rt.rest.jersey.test/.settings/de.loskutov.anyedit.AnyEditTools.prefs b/org.eclipse.scout.rt.rest.jersey.test/.settings/de.loskutov.anyedit.AnyEditTools.prefs
new file mode 100644
index 0000000000..9e00de0d04
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.jersey.test/.settings/de.loskutov.anyedit.AnyEditTools.prefs
@@ -0,0 +1,18 @@
+activeContentFilterList=*.makefile,makefile,*.Makefile,Makefile,Makefile.*,*.mk,MANIFEST.MF,.project,*.target
+addNewLine=true
+convertActionOnSaave=AnyEdit.CnvrtTabToSpaces
+eclipse.preferences.version=1
+fixLineDelimiters=true
+ignoreBlankLinesWhenTrimming=false
+inActiveContentFilterList=
+javaTabWidthForJava=true
+org.eclipse.jdt.ui.editor.tab.width=2
+projectPropsEnabled=true
+removeTrailingSpaces=true
+replaceAllSpaces=false
+replaceAllTabs=true
+saveAndAddLine=true
+saveAndConvert=true
+saveAndFixLineDelimiters=true
+saveAndTrim=true
+useModulo4Tabs=true
diff --git a/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.core.resources.prefs b/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000000..13d34f372b
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,18 @@
+eclipse.preferences.version=1
+encoding//src/main/client=UTF-8
+encoding//src/main/fixture=UTF-8
+encoding//src/main/java=UTF-8
+encoding//src/main/java-jcl=UTF-8
+encoding//src/main/java-log4j=UTF-8
+encoding//src/main/java-original=UTF-8
+encoding//src/main/js=UTF-8
+encoding//src/main/resources=UTF-8
+encoding//src/main/shared=UTF-8
+encoding//src/main/webapp=UTF-8
+encoding//src/test/java=UTF-8
+encoding//src/test/js=UTF-8
+encoding//src/test/resources=UTF-8
+encoding//target/generated-sources/annotations=UTF-8
+encoding//target/generated-sources/wsimport=UTF-8
+encoding/<project>=UTF-8
+encoding/files=UTF-8
diff --git a/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.core.runtime.prefs
new file mode 100644
index 0000000000..5a0ad22d2a
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..7602d1cf28
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,396 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.codeComplete.argumentPrefixes=
+org.eclipse.jdt.core.codeComplete.argumentSuffixes=
+org.eclipse.jdt.core.codeComplete.fieldPrefixes=m_
+org.eclipse.jdt.core.codeComplete.fieldSuffixes=
+org.eclipse.jdt.core.codeComplete.localPrefixes=
+org.eclipse.jdt.core.codeComplete.localSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.processAnnotations=disabled
+org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=16
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true
+org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=false
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=false
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=120
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
+org.eclipse.jdt.core.formatter.indentation.size=2
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=true
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=true
+org.eclipse.jdt.core.formatter.lineSplit=240
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=true
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=true
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=2
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.jdt.launching.prefs b/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.jdt.launching.prefs
new file mode 100644
index 0000000000..d211d32633
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.jdt.launching.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning
diff --git a/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000000..ee7e612009
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,127 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=false
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=true
+cleanup.format_source_code=true
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=true
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=false
+cleanup.qualify_static_member_accesses_with_declaring_class=false
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=false
+cleanup.remove_unnecessary_nls_tags=false
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=false
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Eclipse Scout
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_Eclipse Scout
+formatter_settings_version=12
+org.eclipse.jdt.ui.exception.name=e
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.overrideannotation=true
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="false" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment"/><template autoinsert\="false" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment"/><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment"/><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*******************************************************************************&\#13;\r\n * Copyright (c) ${year} BSI Business Systems Integration AG.&\#13;\r\n * All rights reserved. This program and the accompanying materials&\#13;\r\n * are made available under the terms of the Eclipse Public License v1.0&\#13;\r\n * which accompanies this distribution, and is available at&\#13;\r\n * http\://www.eclipse.org/legal/epl-v10.html&\#13;\r\n *&\#13;\r\n * Contributors\:&\#13;\r\n * BSI Business Systems Integration AG - initial API and implementation&\#13;\r\n ******************************************************************************/</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment"/><template autoinsert\="false" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment"/><template autoinsert\="false" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment"/><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment"/><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="false" context\="gettercomment_context" deleted\="false" description\="Comment for getter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment"/><template autoinsert\="false" context\="settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment"/><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment"/><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment"/><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment"/><template autoinsert\="false" context\="fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment"/><template autoinsert\="false" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment"/><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment"/><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=false
+sp_cleanup.add_missing_deprecated_annotations=false
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=false
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.insert_inferred_type_arguments=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_redundant_type_arguments=false
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=false
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_lambda=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+sp_cleanup.use_type_arguments=false
diff --git a/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.m2e.core.prefs b/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000000..f897a7f1cb
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.wst.html.core.prefs b/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.wst.html.core.prefs
new file mode 100644
index 0000000000..559b1191a8
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.wst.html.core.prefs
@@ -0,0 +1,42 @@
+attrDuplicate=2
+attrInvalidName=2
+attrInvalidValue=2
+attrNameMismatch=2
+attrNamesToIgnore=
+attrUndefName=2
+attrUndefValue=2
+attrValueEqualsMissing=2
+attrValueMismatch=1
+attrValueUnclosed=2
+cdataInvalidContent=2
+cdataUnclosed=1
+commentInvalidContent=2
+commentUnclosed=1
+docDoctypeUnclosed=1
+docDuplicateTag=1
+docInvalidChar=2
+docInvalidContent=2
+eclipse.preferences.version=1
+elemCoexistence=2
+elemDuplicate=2
+elemEndInvalidCase=1
+elemInvalidContent=2
+elemInvalidDirective=1
+elemInvalidEmptyTag=2
+elemInvalidName=1
+elemInvalidText=2
+elemMissingEnd=2
+elemMissingStart=2
+elemStartInvalidCase=2
+elemUnclosedEndTag=1
+elemUnclosedStartTag=1
+elemUnknownName=-1
+elemUnnecessaryEnd=2
+ignoreAttrNames=false
+ignoreElementNames=false
+piInvalidContent=2
+piUnclosed=1
+piUndefined=2
+refInvalidContent=2
+resourceNotFound=2
+use-project-settings=true
diff --git a/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.wst.jsdt.core.prefs b/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.wst.jsdt.core.prefs
new file mode 100644
index 0000000000..1b2735d2df
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.wst.jsdt.core.prefs
@@ -0,0 +1,307 @@
+eclipse.preferences.version=1
+org.eclipse.wst.jsdt.core.compiler.codegen.inlineJsrBytecode=disabled
+org.eclipse.wst.jsdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.wst.jsdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.wst.jsdt.core.compiler.compliance=1.4
+org.eclipse.wst.jsdt.core.compiler.debug.lineNumber=generate
+org.eclipse.wst.jsdt.core.compiler.debug.localVariable=generate
+org.eclipse.wst.jsdt.core.compiler.debug.sourceFile=generate
+org.eclipse.wst.jsdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.wst.jsdt.core.compiler.problem.deprecation=warning
+org.eclipse.wst.jsdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.wst.jsdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.wst.jsdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.wst.jsdt.core.compiler.problem.duplicateLocalVariables=warning
+org.eclipse.wst.jsdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.wst.jsdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.wst.jsdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.wst.jsdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.wst.jsdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.wst.jsdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.wst.jsdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.wst.jsdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.wst.jsdt.core.compiler.problem.looseVarDecleration=warning
+org.eclipse.wst.jsdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.wst.jsdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.wst.jsdt.core.compiler.problem.nullReference=ignore
+org.eclipse.wst.jsdt.core.compiler.problem.optionalSemicolon=warning
+org.eclipse.wst.jsdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.wst.jsdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.wst.jsdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.wst.jsdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.wst.jsdt.core.compiler.problem.undefinedField=warning
+org.eclipse.wst.jsdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.wst.jsdt.core.compiler.problem.uninitializedGlobalVariable=ignore
+org.eclipse.wst.jsdt.core.compiler.problem.uninitializedLocalVariable=ignore
+org.eclipse.wst.jsdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.wst.jsdt.core.compiler.problem.unresolvedFieldReference=error
+org.eclipse.wst.jsdt.core.compiler.problem.unresolvedMethodReference=error
+org.eclipse.wst.jsdt.core.compiler.problem.unresolvedTypeReference=error
+org.eclipse.wst.jsdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.wst.jsdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.wst.jsdt.core.compiler.problem.unusedLocal=ignore
+org.eclipse.wst.jsdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.wst.jsdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.wst.jsdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.wst.jsdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.wst.jsdt.core.compiler.source=1.3
+org.eclipse.wst.jsdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.wst.jsdt.core.formatter.alignment_for_assignment=0
+org.eclipse.wst.jsdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.wst.jsdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.wst.jsdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.wst.jsdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.wst.jsdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.wst.jsdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.wst.jsdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.wst.jsdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.wst.jsdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.wst.jsdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.wst.jsdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.wst.jsdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.wst.jsdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.wst.jsdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.wst.jsdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.wst.jsdt.core.formatter.blank_lines_after_package=1
+org.eclipse.wst.jsdt.core.formatter.blank_lines_before_field=0
+org.eclipse.wst.jsdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.wst.jsdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.wst.jsdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.wst.jsdt.core.formatter.blank_lines_before_method=1
+org.eclipse.wst.jsdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.wst.jsdt.core.formatter.blank_lines_before_package=0
+org.eclipse.wst.jsdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.wst.jsdt.core.formatter.blank_lines_between_type_declarations=0
+org.eclipse.wst.jsdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.wst.jsdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.wst.jsdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.wst.jsdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.wst.jsdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.wst.jsdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.wst.jsdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.wst.jsdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.wst.jsdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.wst.jsdt.core.formatter.brace_position_for_objlit_initializer=end_of_line
+org.eclipse.wst.jsdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.wst.jsdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.wst.jsdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.wst.jsdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.wst.jsdt.core.formatter.comment.format_block_comments=true
+org.eclipse.wst.jsdt.core.formatter.comment.format_header=false
+org.eclipse.wst.jsdt.core.formatter.comment.format_html=true
+org.eclipse.wst.jsdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.wst.jsdt.core.formatter.comment.format_line_comments=true
+org.eclipse.wst.jsdt.core.formatter.comment.format_source_code=true
+org.eclipse.wst.jsdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.wst.jsdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.wst.jsdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.wst.jsdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.wst.jsdt.core.formatter.comment.line_length=80
+org.eclipse.wst.jsdt.core.formatter.compact_else_if=true
+org.eclipse.wst.jsdt.core.formatter.continuation_indentation=2
+org.eclipse.wst.jsdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.wst.jsdt.core.formatter.continuation_indentation_for_objlit_initializer=1
+org.eclipse.wst.jsdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.wst.jsdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.wst.jsdt.core.formatter.indent_empty_lines=false
+org.eclipse.wst.jsdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.wst.jsdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.wst.jsdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.wst.jsdt.core.formatter.indent_switchstatements_compare_to_switch=true
+org.eclipse.wst.jsdt.core.formatter.indentation.size=2
+org.eclipse.wst.jsdt.core.formatter.insert_new_line_after_annotation=insert
+org.eclipse.wst.jsdt.core.formatter.insert_new_line_after_comma_in_objlit_initializer=insert
+org.eclipse.wst.jsdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_new_line_after_opening_brace_in_objlit_initializer=insert
+org.eclipse.wst.jsdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert
+org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_closing_brace_in_objlit_initializer=insert
+org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
+org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert
+org.eclipse.wst.jsdt.core.formatter.insert_new_line_before_while_in_do_statement=insert
+org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.wst.jsdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_colon_in_object_initializer=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_function_keyword=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_object_initializer=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.wst.jsdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.wst.jsdt.core.formatter.keep_else_statement_on_same_line=true
+org.eclipse.wst.jsdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.wst.jsdt.core.formatter.keep_empty_objlit_initializer_on_one_line=false
+org.eclipse.wst.jsdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.wst.jsdt.core.formatter.keep_then_statement_on_same_line=true
+org.eclipse.wst.jsdt.core.formatter.lineSplit=9999
+org.eclipse.wst.jsdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.wst.jsdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.wst.jsdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.wst.jsdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.wst.jsdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.wst.jsdt.core.formatter.tabulation.char=space
+org.eclipse.wst.jsdt.core.formatter.tabulation.size=2
+org.eclipse.wst.jsdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.wst.jsdt.core.formatter.wrap_before_binary_operator=true
+semanticValidation=disabled
diff --git a/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.wst.jsdt.ui.prefs b/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.wst.jsdt.ui.prefs
new file mode 100644
index 0000000000..c256e89009
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.wst.jsdt.ui.prefs
@@ -0,0 +1,100 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.format_source_code=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_trailing_whitespaces=false
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_blocks=false
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup_profile=_Eclipse Scout
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.wst.jsdt.ui.postsavelistener.cleanup=true
+formatter_profile=_Eclipse Scout
+formatter_settings_version=11
+org.eclipse.wst.jsdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="false" context\="org.eclipse.jsdt.gettercomment_context" deleted\="false" description\="Comment for getter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment"/><template autoinsert\="false" context\="org.eclipse.jsdt.settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment"/><template autoinsert\="false" context\="org.eclipse.jsdt.constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment"/><template autoinsert\="false" context\="org.eclipse.jsdt.filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment">/*******************************************************************************\r\n * Copyright (c) ${year} BSI Business Systems Integration AG.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors\:\r\n * BSI Business Systems Integration AG - initial API and implementation\r\n ******************************************************************************/</template><template autoinsert\="false" context\="org.eclipse.jsdt.typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment"/><template autoinsert\="false" context\="org.eclipse.jsdt.fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment"/><template autoinsert\="false" context\="org.eclipse.jsdt.methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment"/><template autoinsert\="false" context\="org.eclipse.jsdt.overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="org.eclipse.jsdt.delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment"/><template autoinsert\="true" context\="org.eclipse.jsdt.newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="org.eclipse.jsdt.catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block</template><template autoinsert\="true" context\="org.eclipse.jsdt.methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated function stub\r\n${body_statement}</template><template autoinsert\="true" context\="org.eclipse.jsdt.constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="org.eclipse.jsdt.getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="org.eclipse.jsdt.setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.format_source_code=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_variable_declarations_final=true
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.wst.jsdt.ui.superType.container b/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.wst.jsdt.ui.superType.container
new file mode 100644
index 0000000000..49c8cd4f14
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.wst.jsdt.ui.superType.container
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.JRE_CONTAINER \ No newline at end of file
diff --git a/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.wst.jsdt.ui.superType.name b/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.wst.jsdt.ui.superType.name
new file mode 100644
index 0000000000..11006e2a54
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.wst.jsdt.ui.superType.name
@@ -0,0 +1 @@
+Global \ No newline at end of file
diff --git a/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.wst.validation.prefs b/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.wst.validation.prefs
new file mode 100644
index 0000000000..4364f03ff8
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.wst.validation.prefs
@@ -0,0 +1,10 @@
+DELEGATES_PREFERENCE=delegateValidatorList
+USER_BUILD_PREFERENCE=enabledBuildValidatorListorg.eclipse.wst.wsi.ui.internal.WSIMessageValidator;
+USER_MANUAL_PREFERENCE=enabledManualValidatorListorg.eclipse.wst.wsi.ui.internal.WSIMessageValidator;
+USER_PREFERENCE=overrideGlobalPreferencestruedisableAllValidationfalseversion1.2.700.v201508251749
+eclipse.preferences.version=1
+override=true
+suspend=false
+vals/org.eclipse.wst.html.core.HTMLValidator/global=FF01
+vals/org.eclipse.wst.json.core.json/global=FF03
+vf.version=3
diff --git a/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.wst.xml.core.prefs b/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.wst.xml.core.prefs
new file mode 100644
index 0000000000..583de8125d
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.jersey.test/.settings/org.eclipse.wst.xml.core.prefs
@@ -0,0 +1,19 @@
+attributeHasNoValue=2
+eclipse.preferences.version=1
+endTagWithAttributes=2
+honourAllSchemaLocations=true
+indicateNoGrammar=-1
+indicateReferencedFileContainsErrors=2
+indiciateNoDocumentElement=-1
+markupValidation=false
+missingClosingBracket=2
+missingClosingQuote=2
+missingEndTag=2
+missingQuotes=2
+missingStartTag=2
+missingTagName=2
+namespaceInPITarget=2
+use-project-settings=true
+whitespaceAtStart=2
+whitespaceBeforeTagName=2
+xinclude=false
diff --git a/org.eclipse.scout.rt.rest.jersey.test/.settings/org.sonarlint.eclipse.core.prefs b/org.eclipse.scout.rt.rest.jersey.test/.settings/org.sonarlint.eclipse.core.prefs
new file mode 100644
index 0000000000..4735ed54ae
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.jersey.test/.settings/org.sonarlint.eclipse.core.prefs
@@ -0,0 +1,7 @@
+autoEnabled=true
+eclipse.preferences.version=1
+extraProperties=
+fileExclusions=
+moduleKey=org.eclipse.scout.rt\:org.eclipse.scout.rt\:releases_8.0.x
+projectKey=org.eclipse.scout.rt\:org.eclipse.scout.rt\:releases_8.0.x
+serverId=Scout
diff --git a/org.eclipse.scout.rt.rest.jersey.test/pom.xml b/org.eclipse.scout.rt.rest.jersey.test/pom.xml
new file mode 100644
index 0000000000..6513ac30f9
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.jersey.test/pom.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2010-2018 BSI Business Systems Integration AG.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ BSI Business Systems Integration AG - initial API and implementation
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.eclipse.scout.rt</groupId>
+ <artifactId>org.eclipse.scout.rt</artifactId>
+ <version>8.0.0-SNAPSHOT</version>
+ <relativePath>../org.eclipse.scout.rt/pom.xml</relativePath>
+ </parent>
+
+ <artifactId>org.eclipse.scout.rt.rest.jersey.test</artifactId>
+ <packaging>jar</packaging>
+ <name>${project.groupId}:${project.artifactId}</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.eclipse.scout.rt</groupId>
+ <artifactId>org.eclipse.scout.rt.rest.jersey.client</artifactId>
+ </dependency>
+
+ <!-- Test Dependencies -->
+ <dependency>
+ <groupId>org.eclipse.scout.rt</groupId>
+ <artifactId>org.eclipse.scout.rt.jackson.test</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.scout.rt</groupId>
+ <artifactId>org.eclipse.scout.rt.rest.jackson</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-webapp</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.connectors</groupId>
+ <artifactId>jersey-apache-connector</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.media</groupId>
+ <artifactId>jersey-media-json-jackson</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/org.eclipse.scout.rt.rest.jersey.test/src/main/java/org/eclipse/scout/rt/rest/jersey/JerseyTestApplication.java b/org.eclipse.scout.rt.rest.jersey.test/src/main/java/org/eclipse/scout/rt/rest/jersey/JerseyTestApplication.java
new file mode 100644
index 0000000000..c541246f55
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.jersey.test/src/main/java/org/eclipse/scout/rt/rest/jersey/JerseyTestApplication.java
@@ -0,0 +1,135 @@
+/*******************************************************************************
+ * Copyright (c) 2018 BSI Business Systems Integration AG.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * BSI Business Systems Integration AG - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.scout.rt.rest.jersey;
+
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.ServerSocket;
+
+import org.eclipse.jetty.server.Handler;
+import org.eclipse.jetty.server.HttpConfiguration;
+import org.eclipse.jetty.server.HttpConnectionFactory;
+import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.ServerConnector;
+import org.eclipse.jetty.servlet.ServletContextHandler;
+import org.eclipse.scout.rt.platform.ApplicationScoped;
+import org.eclipse.scout.rt.platform.BEANS;
+import org.eclipse.scout.rt.platform.IPlatform;
+import org.eclipse.scout.rt.platform.Platform;
+import org.eclipse.scout.rt.platform.exception.PlatformException;
+import org.eclipse.scout.rt.platform.util.StringUtility;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@ApplicationScoped
+public class JerseyTestApplication {
+
+ private static final Logger LOG = LoggerFactory.getLogger(JerseyTestApplication.class);
+
+ private volatile Server m_server = null;
+ private int m_port;
+
+ public static void main(String[] args) {
+ IPlatform platform = Platform.get();
+ platform.awaitPlatformStarted();
+ BEANS.get(JerseyTestApplication.class).ensureStarted();
+ }
+
+ public synchronized void ensureStarted() {
+ if (m_server == null) {
+ try {
+ startInternal();
+ }
+ catch (Exception e) {
+ LOG.error("Fatal: Unable to start application", e);
+ }
+ }
+ }
+
+ public int getPort() {
+ return m_port;
+ }
+
+ protected void startInternal() throws Exception {
+ m_port = getListenPort();
+
+ final Server server = createServer(m_port);
+ server.start();
+ m_server = server;
+
+ if (LOG.isInfoEnabled()) {
+ StringBuilder sb = new StringBuilder();
+ sb.append("Server ready. The application is available on the following addresses:\n");
+ sb.append("---------------------------------------------------------------------\n");
+ sb.append(" http://localhost:").append(m_port).append('\n');
+ String hostname = InetAddress.getLocalHost().getHostName().toLowerCase();
+ String ip = InetAddress.getLocalHost().getHostAddress();
+ sb.append(" http://").append(hostname).append(":").append(m_port).append('\n');
+ if (StringUtility.notEqualsIgnoreCase(hostname, ip)) {
+ sb.append(" http://").append(ip).append(":").append(m_port).append('\n');
+ }
+ sb.append("---------------------------------------------------------------------\n");
+ LOG.info(sb.toString());
+ }
+ }
+
+ @SuppressWarnings("resource")
+ protected Server createServer(final int port) {
+ final Server server = new Server();
+
+ // Do not emit the server version (-> security)
+ final HttpConfiguration httpConfig = new HttpConfiguration();
+ httpConfig.setSendServerVersion(false);
+ final ServerConnector connector = new ServerConnector(server, new HttpConnectionFactory(httpConfig));
+ connector.setPort(port);
+ server.addConnector(connector);
+
+ final Handler handler = createHandler();
+ server.setHandler(handler);
+
+ return server;
+ }
+
+ public void shutdown() {
+ try {
+ shutdownInternal();
+ }
+ catch (Exception e) {
+ LOG.error("Error while shutting down application", e);
+ }
+ }
+
+ protected void shutdownInternal() throws Exception {
+ if (m_server != null) {
+ m_server.stop();
+ }
+ }
+
+ protected int getListenPort() {
+ try (ServerSocket socket = new ServerSocket(0)) {
+ return socket.getLocalPort();
+ }
+ catch (IOException e) {
+ throw new PlatformException("Could not allocate an unused network port", e);
+ }
+ }
+
+ protected Handler createHandler() {
+ final ServletContextHandler handler = new ServletContextHandler(ServletContextHandler.NO_SESSIONS);
+ handler.setResourceBase(System.getProperty("java.io.tmpdir"));
+ handler.setContextPath("/");
+
+ handler.setDisplayName("Scout REST Integration Test");
+ handler.addServlet(RestClientTestEchoServlet.class, "/echo");
+
+ return handler;
+ }
+}
diff --git a/org.eclipse.scout.rt.rest.jersey.test/src/main/java/org/eclipse/scout/rt/rest/jersey/JerseyTestRestClientHelper.java b/org.eclipse.scout.rt.rest.jersey.test/src/main/java/org/eclipse/scout/rt/rest/jersey/JerseyTestRestClientHelper.java
new file mode 100644
index 0000000000..fd10ab3a80
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.jersey.test/src/main/java/org/eclipse/scout/rt/rest/jersey/JerseyTestRestClientHelper.java
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2018 BSI Business Systems Integration AG.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * BSI Business Systems Integration AG - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.scout.rt.rest.jersey;
+
+import javax.ws.rs.client.Client;
+import javax.ws.rs.client.ClientBuilder;
+import javax.ws.rs.core.Response;
+
+import org.apache.http.config.RegistryBuilder;
+import org.apache.http.conn.HttpClientConnectionManager;
+import org.apache.http.conn.socket.ConnectionSocketFactory;
+import org.apache.http.conn.socket.PlainConnectionSocketFactory;
+import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
+import org.eclipse.scout.rt.platform.ApplicationScoped;
+import org.eclipse.scout.rt.platform.BEANS;
+import org.eclipse.scout.rt.rest.client.AbstractRestClientHelper;
+import org.eclipse.scout.rt.rest.client.proxy.ErrorDoRestClientExceptionTransformer;
+import org.glassfish.jersey.apache.connector.ApacheClientProperties;
+
+@ApplicationScoped
+public class JerseyTestRestClientHelper extends AbstractRestClientHelper {
+
+ @Override
+ public String getBaseUri() {
+ return "http://localhost:" + BEANS.get(JerseyTestApplication.class).getPort();
+ }
+
+ /**
+ * Returns the raw, un-proxied {@link Client}.
+ */
+ public Client rawClient() {
+ return internalClient();
+ }
+
+ @Override
+ protected RuntimeException transformException(RuntimeException e, Response response) {
+ return BEANS.get(ErrorDoRestClientExceptionTransformer.class).transform(e, response);
+ }
+
+ @Override
+ protected void configureClientBuilder(ClientBuilder clientBuilder) {
+ super.configureClientBuilder(clientBuilder);
+ clientBuilder.property(ApacheClientProperties.CONNECTION_MANAGER, createTestingConnectionManager());
+ }
+
+ /**
+ * Creates a {@link PoolingHttpClientConnectionManager} that manages exactly one connection. This limitation helps
+ * finding resource leaks (i.e. leased connections that are never put back to the pool).
+ */
+ protected HttpClientConnectionManager createTestingConnectionManager() {
+ final PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(
+ RegistryBuilder.<ConnectionSocketFactory> create()
+ .register("http", PlainConnectionSocketFactory.getSocketFactory())
+ .build());
+ connectionManager.setValidateAfterInactivity(1);
+ connectionManager.setMaxTotal(1);
+ connectionManager.setDefaultMaxPerRoute(1);
+ return connectionManager;
+ }
+}
diff --git a/org.eclipse.scout.rt.rest.jersey.test/src/main/java/org/eclipse/scout/rt/rest/jersey/RestClientTestEchoDo.java b/org.eclipse.scout.rt.rest.jersey.test/src/main/java/org/eclipse/scout/rt/rest/jersey/RestClientTestEchoDo.java
new file mode 100644
index 0000000000..f7b8099d47
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.jersey.test/src/main/java/org/eclipse/scout/rt/rest/jersey/RestClientTestEchoDo.java
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2018 BSI Business Systems Integration AG.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * BSI Business Systems Integration AG - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.scout.rt.rest.jersey;
+
+import javax.annotation.Generated;
+
+import org.eclipse.scout.rt.platform.dataobject.DoEntity;
+import org.eclipse.scout.rt.platform.dataobject.DoValue;
+import org.eclipse.scout.rt.platform.dataobject.TypeName;
+
+@TypeName("scout.RestClientTestEcho")
+public class RestClientTestEchoDo extends DoEntity {
+
+ public DoValue<String> info() {
+ return doValue("info");
+ }
+
+ public DoValue<Integer> code() {
+ return doValue("code");
+ }
+
+ public DoValue<String> httpMethod() {
+ return doValue("httpMethod");
+ }
+
+ public DoValue<String> data() {
+ return doValue("data");
+ }
+
+ /* **************************************************************************
+ * GENERATED CONVENIENCE METHODS
+ * *************************************************************************/
+
+ @Generated("DoConvenienceMethodsGenerator")
+ public RestClientTestEchoDo withInfo(String info) {
+ info().set(info);
+ return this;
+ }
+
+ @Generated("DoConvenienceMethodsGenerator")
+ public String getInfo() {
+ return info().get();
+ }
+
+ @Generated("DoConvenienceMethodsGenerator")
+ public RestClientTestEchoDo withCode(Integer code) {
+ code().set(code);
+ return this;
+ }
+
+ @Generated("DoConvenienceMethodsGenerator")
+ public Integer getCode() {
+ return code().get();
+ }
+
+ @Generated("DoConvenienceMethodsGenerator")
+ public RestClientTestEchoDo withHttpMethod(String httpMethod) {
+ httpMethod().set(httpMethod);
+ return this;
+ }
+
+ @Generated("DoConvenienceMethodsGenerator")
+ public String getHttpMethod() {
+ return httpMethod().get();
+ }
+
+ @Generated("DoConvenienceMethodsGenerator")
+ public RestClientTestEchoDo withData(String data) {
+ data().set(data);
+ return this;
+ }
+
+ @Generated("DoConvenienceMethodsGenerator")
+ public String getData() {
+ return data().get();
+ }
+}
diff --git a/org.eclipse.scout.rt.rest.jersey.test/src/main/java/org/eclipse/scout/rt/rest/jersey/RestClientTestEchoResponse.java b/org.eclipse.scout.rt.rest.jersey.test/src/main/java/org/eclipse/scout/rt/rest/jersey/RestClientTestEchoResponse.java
new file mode 100644
index 0000000000..daedf1d690
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.jersey.test/src/main/java/org/eclipse/scout/rt/rest/jersey/RestClientTestEchoResponse.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2018 BSI Business Systems Integration AG.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * BSI Business Systems Integration AG - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.scout.rt.rest.jersey;
+
+import javax.annotation.Generated;
+
+import org.eclipse.scout.rt.platform.dataobject.DoEntity;
+import org.eclipse.scout.rt.platform.dataobject.DoValue;
+import org.eclipse.scout.rt.platform.dataobject.TypeName;
+
+@TypeName("scout.RestClientTestEchoResponse")
+public class RestClientTestEchoResponse extends DoEntity {
+
+ public DoValue<RestClientTestEchoDo> echo() {
+ return doValue("echo");
+ }
+
+ /* **************************************************************************
+ * GENERATED CONVENIENCE METHODS
+ * *************************************************************************/
+
+ @Generated("DoConvenienceMethodsGenerator")
+ public RestClientTestEchoResponse withEcho(RestClientTestEchoDo echo) {
+ echo().set(echo);
+ return this;
+ }
+
+ @Generated("DoConvenienceMethodsGenerator")
+ public RestClientTestEchoDo getEcho() {
+ return echo().get();
+ }
+}
diff --git a/org.eclipse.scout.rt.rest.jersey.test/src/main/java/org/eclipse/scout/rt/rest/jersey/RestClientTestEchoServlet.java b/org.eclipse.scout.rt.rest.jersey.test/src/main/java/org/eclipse/scout/rt/rest/jersey/RestClientTestEchoServlet.java
new file mode 100644
index 0000000000..53d0f2fd50
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.jersey.test/src/main/java/org/eclipse/scout/rt/rest/jersey/RestClientTestEchoServlet.java
@@ -0,0 +1,135 @@
+/*******************************************************************************
+ * Copyright (c) 2018 BSI Business Systems Integration AG.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * BSI Business Systems Integration AG - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.scout.rt.rest.jersey;
+
+import java.io.IOException;
+import java.util.concurrent.TimeUnit;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response.Status;
+
+import org.eclipse.scout.rt.platform.BEANS;
+import org.eclipse.scout.rt.platform.dataobject.IDataObjectMapper;
+import org.eclipse.scout.rt.platform.html.HTML;
+import org.eclipse.scout.rt.platform.util.SleepUtil;
+import org.eclipse.scout.rt.platform.util.StringUtility;
+import org.eclipse.scout.rt.rest.error.ErrorDo;
+import org.eclipse.scout.rt.rest.error.ErrorResponse;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class RestClientTestEchoServlet extends HttpServlet {
+ private static final long serialVersionUID = 1L;
+
+ private static final Logger LOG = LoggerFactory.getLogger(RestClientTestEchoServlet.class);
+
+ @Override
+ protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
+ final int statusCode = parseStatusCode(req.getParameter("status"));
+
+ String sleep = req.getParameter("sleepSec");
+ if (sleep != null) {
+ int sleepSeconds = Integer.parseInt(sleep);
+ SleepUtil.sleepSafe(sleepSeconds, TimeUnit.SECONDS);
+ }
+
+ Status status = Status.fromStatusCode(statusCode);
+ if (status != null && status.getFamily() == Status.Family.SUCCESSFUL) {
+ sendEchoResponse(req, resp, statusCode, status);
+ }
+ else {
+ sendErrorResponse(req, resp, statusCode, status);
+ }
+ }
+
+ public void sendEchoResponse(HttpServletRequest req, HttpServletResponse resp, int statusCode, Status status) throws IOException {
+ resp.setStatus(statusCode);
+ resp.setContentType(MediaType.APPLICATION_JSON);
+
+ if (req.getParameter("emptyBody") != null) {
+ return;
+ }
+
+ RestClientTestEchoResponse echoResponse = BEANS.get(RestClientTestEchoResponse.class)
+ .withEcho(BEANS.get(RestClientTestEchoDo.class)
+ .withHttpMethod(req.getMethod())
+ .withCode(statusCode)
+ .withInfo(status == null ? "unknown" : status.getReasonPhrase()));
+
+ if (req.getParameter("largeMessage") != null) {
+ StringBuilder sb = new StringBuilder();
+ for (char c = 'a'; c <= 'z'; c++) {
+ sb.append(c);
+ }
+ String alphabet = sb.toString();
+ for (int i = 0; i < 1000; i++) {
+ sb.append(alphabet);
+ }
+ echoResponse.getEcho().withData(sb.toString());
+ }
+
+ BEANS.get(IDataObjectMapper.class).writeValue(resp.getOutputStream(), echoResponse);
+ }
+
+ protected void sendErrorResponse(HttpServletRequest req, HttpServletResponse resp, int statusCode, Status status) throws IOException {
+ resp.setStatus(statusCode);
+
+ if (req.getParameter("emptyBody") != null) {
+ return;
+ }
+
+ if (acceptsJson(req)) {
+ resp.setContentType(MediaType.APPLICATION_JSON);
+
+ ErrorResponse errorResponse = BEANS.get(ErrorResponse.class)
+ .withError(BEANS.get(ErrorDo.class)
+ .withStatus(statusCode)
+ .withMessage(status == null ? "unknown" : status.getReasonPhrase())
+ .withTitle("REST Client Test"));
+ BEANS.get(IDataObjectMapper.class).writeValue(resp.getOutputStream(), errorResponse);
+ }
+ else {
+ String content = HTML.html5(
+ HTML.head(
+ HTML.tag("meta").addAttribute("charset", "utf-8"),
+ HTML.tag("title", "REST Client Test")),
+ HTML.body(
+ HTML.h1("REST Client Test"),
+ HTML.div(status == null ? "unknown" : status.getReasonPhrase())))
+ .toHtml();
+ resp.getOutputStream().print(content);
+ resp.setContentType(MediaType.TEXT_HTML);
+ }
+ }
+
+ protected int parseStatusCode(String statusCode) {
+ int sc = 0;
+ try {
+ sc = Integer.parseInt(statusCode);
+ }
+ catch (NumberFormatException e) {
+ LOG.warn("invalid status code '{}'", statusCode, e);
+ }
+ return sc != 0 ? sc : Status.BAD_REQUEST.getStatusCode();
+ }
+
+ protected boolean acceptsJson(HttpServletRequest req) {
+ String format = req.getParameter("format");
+ if (StringUtility.isNullOrEmpty(format)) {
+ format = req.getHeader("Accept");
+ }
+ return MediaType.APPLICATION_JSON.equals(format);
+ }
+}
diff --git a/org.eclipse.scout.rt.rest.jersey.test/src/main/resources/META-INF/scout.xml b/org.eclipse.scout.rt.rest.jersey.test/src/main/resources/META-INF/scout.xml
new file mode 100644
index 0000000000..a683b09e97
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.jersey.test/src/main/resources/META-INF/scout.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2010-2018 BSI Business Systems Integration AG.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ BSI Business Systems Integration AG - initial API and implementation
+
+-->
+<scout>
+</scout>
diff --git a/org.eclipse.scout.rt.rest.jersey.test/src/test/java/org/eclipse/scout/rt/rest/jersey/client/proxy/RestClientProxyInvocationTest.java b/org.eclipse.scout.rt.rest.jersey.test/src/test/java/org/eclipse/scout/rt/rest/jersey/client/proxy/RestClientProxyInvocationTest.java
new file mode 100644
index 0000000000..10854ccf13
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.jersey.test/src/test/java/org/eclipse/scout/rt/rest/jersey/client/proxy/RestClientProxyInvocationTest.java
@@ -0,0 +1,710 @@
+/*******************************************************************************
+ * Copyright (c) 2018 BSI Business Systems Integration AG.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * BSI Business Systems Integration AG - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.scout.rt.rest.jersey.client.proxy;
+
+import static org.eclipse.scout.rt.platform.util.Assertions.assertInstance;
+import static org.eclipse.scout.rt.testing.platform.util.ScoutAssert.assertThrows;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.fail;
+
+import java.net.URI;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+import javax.ws.rs.ForbiddenException;
+import javax.ws.rs.NotFoundException;
+import javax.ws.rs.client.Invocation;
+import javax.ws.rs.client.Invocation.Builder;
+import javax.ws.rs.client.InvocationCallback;
+import javax.ws.rs.client.ResponseProcessingException;
+import javax.ws.rs.client.WebTarget;
+import javax.ws.rs.core.Link;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.Status;
+
+import org.apache.http.HttpHost;
+import org.apache.http.conn.routing.HttpRoute;
+import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
+import org.eclipse.scout.rt.platform.BEANS;
+import org.eclipse.scout.rt.platform.exception.ProcessingException;
+import org.eclipse.scout.rt.platform.exception.VetoException;
+import org.eclipse.scout.rt.platform.job.IFuture;
+import org.eclipse.scout.rt.platform.job.Jobs;
+import org.eclipse.scout.rt.platform.util.UriBuilder;
+import org.eclipse.scout.rt.platform.util.concurrent.IRunnable;
+import org.eclipse.scout.rt.platform.util.concurrent.ThreadInterruptedError;
+import org.eclipse.scout.rt.platform.util.concurrent.TimedOutError;
+import org.eclipse.scout.rt.rest.jersey.JerseyTestApplication;
+import org.eclipse.scout.rt.rest.jersey.JerseyTestRestClientHelper;
+import org.eclipse.scout.rt.rest.jersey.RestClientTestEchoResponse;
+import org.eclipse.scout.rt.testing.platform.runner.PlatformTestRunner;
+import org.glassfish.jersey.apache.connector.ApacheClientProperties;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(PlatformTestRunner.class)
+public class RestClientProxyInvocationTest {
+
+ private WebTarget m_target;
+ private JerseyTestRestClientHelper m_helper;
+
+ @BeforeClass
+ public static void beforeClass() {
+ BEANS.get(JerseyTestApplication.class).ensureStarted();
+ }
+
+ @Before
+ public void before() {
+ m_helper = BEANS.get(JerseyTestRestClientHelper.class);
+ m_target = m_helper.target("echo");
+ }
+
+ // --- GET -> Response -------------------------------------------------------
+
+ @Test
+ public void testSyncGetOk() throws Exception {
+ Response response = webTargetGet(Response.Status.OK, Content.DEFAULT, Execution.SYNC);
+ assertNotNull(response);
+ RestClientTestEchoResponse entity = response.readEntity(RestClientTestEchoResponse.class);
+ assertEquals(Integer.valueOf(Response.Status.OK.getStatusCode()), entity.getEcho().getCode());
+ }
+
+ @Test
+ public void testSyncGetForbidden() {
+ VetoException ve = assertThrows(VetoException.class, () -> webTargetGet(Response.Status.FORBIDDEN, Content.DEFAULT, Execution.SYNC));
+ assertEquals("REST Client Test: Forbidden", ve.getDisplayMessage());
+ }
+
+ @Test
+ public void testSyncGetForbiddenEmptyBody() {
+ VetoException ve = assertThrows(VetoException.class, () -> webTargetGet(Response.Status.FORBIDDEN, Content.EMPTY_BODY, Execution.SYNC));
+ assertEquals("Forbidden", ve.getDisplayMessage());
+ }
+
+ @Test
+ public void testSyncGetNotFound() {
+ ProcessingException pe = assertThrows(ProcessingException.class, () -> webTargetGet(Response.Status.NOT_FOUND, Content.DEFAULT, Execution.SYNC));
+ assertEquals("REST Client Test: Not Found", pe.getDisplayMessage());
+ }
+
+ @Test
+ public void testSyncGetNotFoundEmptyBody() {
+ ProcessingException pe = assertThrows(ProcessingException.class, () -> webTargetGet(Response.Status.NOT_FOUND, Content.EMPTY_BODY, Execution.SYNC));
+ assertEquals("REST call failed: 404 Not Found", pe.getDisplayMessage());
+ }
+
+ @Test
+ public void testAsyncGetOk() throws Exception {
+ Response response = webTargetGet(Response.Status.OK, Content.DEFAULT, Execution.ASYNC);
+ assertNotNull(response);
+ RestClientTestEchoResponse entity = response.readEntity(RestClientTestEchoResponse.class);
+ assertEquals(Integer.valueOf(Response.Status.OK.getStatusCode()), entity.getEcho().getCode());
+ }
+
+ @Test
+ public void testAsyncGetForbidden() throws Exception {
+ VetoException ve = assertThrows(VetoException.class, () -> webTargetGet(Response.Status.FORBIDDEN, Content.DEFAULT, Execution.ASYNC));
+ assertEquals("REST Client Test: Forbidden", ve.getDisplayMessage());
+ }
+
+ @Test
+ public void testAsyncGetForbiddenEmptyBody() throws Exception {
+ VetoException ve = assertThrows(VetoException.class, () -> webTargetGet(Response.Status.FORBIDDEN, Content.EMPTY_BODY, Execution.ASYNC));
+ assertEquals("Forbidden", ve.getDisplayMessage());
+ }
+
+ @Test
+ public void testAsyncGetNotFound() throws Exception {
+ ProcessingException pe = assertThrows(ProcessingException.class, () -> webTargetGet(Response.Status.NOT_FOUND, Content.DEFAULT, Execution.ASYNC));
+ assertEquals("REST Client Test: Not Found", pe.getDisplayMessage());
+ }
+
+ @Test
+ public void testAsyncGetNotFoundEmptyBody() throws Exception {
+ ProcessingException pe = assertThrows(ProcessingException.class, () -> webTargetGet(Response.Status.NOT_FOUND, Content.EMPTY_BODY, Execution.ASYNC));
+ assertEquals("REST call failed: 404 Not Found", pe.getDisplayMessage());
+ }
+
+ @Test
+ public void testSyncGetOkWithoutReadingEntityDefaultData() throws Exception {
+ assertConnectionReleased(() -> {
+ Response response = webTargetGet(Response.Status.OK, Content.DEFAULT, Execution.SYNC);
+ response.close();
+ });
+ }
+
+ @Test
+ public void testSyncGetOkWithoutReadingEntityEmptyData() throws Exception {
+ assertConnectionReleased(() -> {
+ Response response = webTargetGet(Response.Status.OK, Content.EMPTY_BODY, Execution.SYNC);
+ assertFalse(response.hasEntity());
+ response.close();
+ });
+ }
+
+ @Test
+ public void testSyncGetOkWithoutReadingEntityLargeMessage() throws Exception {
+ assertConnectionReleased(() -> {
+ Response response = webTargetGet(Response.Status.OK, Content.LARGE_MESSAGE, Execution.SYNC);
+ response.close();
+ });
+ }
+
+ /**
+ * Invoking a REST service starting with a {@link WebTarget}.
+ */
+ protected Response webTargetGet(Status status, Content content, Execution execution) throws Exception {
+ WebTarget target = m_target.queryParam("status", status.getStatusCode());
+ if (content == Content.EMPTY_BODY) {
+ target = target.queryParam("emptyBody", "true");
+ }
+ else if (status.getFamily() == Response.Status.Family.SUCCESSFUL && content == Content.LARGE_MESSAGE) {
+ target = target.queryParam("largeMessage", "true");
+ }
+
+ Builder builder = target
+ .request()
+ .accept(MediaType.APPLICATION_JSON);
+
+ if (execution == Execution.SYNC) {
+ return builder.get();
+ }
+ return builder.async().get().get();
+ }
+
+ @Test
+ public void testAsyncGetCancel() throws Exception {
+ assertConnectionReleased(() -> {
+ Future<Response> future = m_target
+ .queryParam("status", Response.Status.OK.getStatusCode())
+ .queryParam("sleepSec", 2)
+ .request()
+ .accept(MediaType.APPLICATION_JSON)
+ .async()
+ .get();
+ assertThrows(TimeoutException.class, () -> future.get(300, TimeUnit.MILLISECONDS));
+ future.cancel(true);
+ });
+ }
+
+ @Test
+ public void testSyncGetCancel() throws Exception {
+ assertConnectionReleased(() -> {
+ CountDownLatch jobRunningLatch = new CountDownLatch(1);
+ IFuture<Response> future = Jobs.schedule(() -> {
+ jobRunningLatch.countDown();
+ try {
+ return m_target
+ .queryParam("status", Response.Status.OK.getStatusCode())
+ .queryParam("sleepSec", 2)
+ .request()
+ .accept(MediaType.APPLICATION_JSON)
+ .get();
+ }
+ catch (ThreadInterruptedError e) {
+ // expected
+ }
+ return null;
+ }, Jobs.newInput());
+ jobRunningLatch.await();
+ assertThrows(TimedOutError.class, () -> future.awaitDone(300, TimeUnit.MILLISECONDS));
+ future.cancel(true);
+ });
+ }
+
+ /**
+ * Connection pooling provided by connectors require to completely consume the returned data of a REST service in
+ * order to put leased connections back into the pool. Otherwise, resource leaks may occur and processes may even be
+ * blocked.
+ */
+ protected void assertConnectionReleased(IRunnable runnable) throws Exception {
+ Object manager = m_helper.client().getConfiguration().getProperty(ApacheClientProperties.CONNECTION_MANAGER);
+ @SuppressWarnings("resource")
+ PoolingHttpClientConnectionManager poolingConnectionManager = assertInstance(manager, PoolingHttpClientConnectionManager.class, "This test works with Apache HTTP client only. Adapt it for other libraries.");
+ URI uri = URI.create(m_helper.getBaseUri());
+ HttpHost target = new HttpHost(uri.getHost(), uri.getPort(), uri.getScheme());
+ assertEquals(1, poolingConnectionManager.getMaxPerRoute(new HttpRoute(target)));
+
+ // invoke actual service
+ runnable.run();
+
+ // verify that other REST services can be invoked (i.e. that the HTTP client was released to the pool)
+ try {
+ int statusCode = m_helper
+ .rawClient()
+ .target(m_helper.getBaseUri())
+ .path("echo")
+ .queryParam("status", Response.Status.OK.getStatusCode())
+ .request(MediaType.APPLICATION_JSON)
+ .async()
+ .get(RestClientTestEchoResponse.class)
+ .get(5, TimeUnit.SECONDS)
+ .getEcho()
+ .getCode()
+ .intValue();
+ assertEquals(Response.Status.OK.getStatusCode(), statusCode);
+ }
+ catch (TimeoutException e) {
+ fail("Subsequent REST service invocation failed. Most likely, the HTTP connection was not put back to the pool.");
+ }
+ }
+
+ //--- GET -> Entity ----------------------------------------------------------
+
+ @Test
+ public void testSyncGetEntityOk() {
+ int scOk = Response.Status.OK.getStatusCode();
+ RestClientTestEchoResponse response = m_target
+ .queryParam("status", scOk)
+ .request()
+ .accept(MediaType.APPLICATION_JSON)
+ .get(RestClientTestEchoResponse.class);
+ assertNotNull(response);
+ assertEquals(Integer.valueOf(scOk), response.getEcho().getCode());
+ }
+
+ @Test
+ public void testSyncGetEntityForbidden() {
+ VetoException ve = assertThrows(VetoException.class, () -> m_target
+ .queryParam("status", Response.Status.FORBIDDEN.getStatusCode())
+ .request()
+ .accept(MediaType.APPLICATION_JSON)
+ .get(RestClientTestEchoResponse.class));
+ assertEquals("REST Client Test: Forbidden", ve.getDisplayMessage());
+ }
+
+ @Test
+ public void testSyncGetEntityForbiddenEmptyBody() {
+ VetoException ve = assertThrows(VetoException.class, () -> m_target
+ .queryParam("status", Response.Status.FORBIDDEN.getStatusCode())
+ .queryParam("emptyBody", "true")
+ .request()
+ .accept(MediaType.APPLICATION_JSON)
+ .get(RestClientTestEchoResponse.class));
+ assertEquals("Forbidden", ve.getDisplayMessage());
+ }
+
+ @Test
+ public void testSyncGetEntityNotFound() {
+ ProcessingException pe = assertThrows(ProcessingException.class, () -> m_target
+ .queryParam("status", Response.Status.NOT_FOUND.getStatusCode())
+ .request()
+ .accept(MediaType.APPLICATION_JSON)
+ .get(RestClientTestEchoResponse.class));
+ assertEquals("REST Client Test: Not Found", pe.getDisplayMessage());
+ }
+
+ @Test
+ public void testSyncGetEntityNotFoundEmptyBody() {
+ ProcessingException pe = assertThrows(ProcessingException.class, () -> m_target
+ .queryParam("status", Response.Status.NOT_FOUND.getStatusCode())
+ .queryParam("emptyBody", "true")
+ .request()
+ .accept(MediaType.APPLICATION_JSON)
+ .get(RestClientTestEchoResponse.class));
+ assertEquals("REST call failed: 404 Not Found", pe.getDisplayMessage());
+ }
+
+ @Test
+ public void testAsyncGetEntityOk() throws Exception {
+ int scOk = Response.Status.OK.getStatusCode();
+ RestClientTestEchoResponse response = m_target
+ .queryParam("status", scOk)
+ .request()
+ .accept(MediaType.APPLICATION_JSON)
+ .async()
+ .get(RestClientTestEchoResponse.class)
+ .get();
+ assertNotNull(response);
+ assertEquals(Integer.valueOf(scOk), response.getEcho().getCode());
+ }
+
+ @Test
+ public void testAsyncGetEntityForbidden() throws Exception {
+ ExecutionException ee = assertThrows(ExecutionException.class, () -> m_target
+ .queryParam("status", Response.Status.FORBIDDEN.getStatusCode())
+ .request()
+ .accept(MediaType.APPLICATION_JSON)
+ .async()
+ .get(RestClientTestEchoResponse.class)
+ .get());
+ assertEquals(VetoException.class, ee.getCause().getClass());
+ assertEquals("REST Client Test: Forbidden", ((VetoException) ee.getCause()).getDisplayMessage());
+ }
+
+ @Test
+ public void testAsyncGetEntityForbiddenEmptyBody() {
+ ExecutionException ee = assertThrows(ExecutionException.class, () -> m_target
+ .queryParam("status", Response.Status.FORBIDDEN.getStatusCode())
+ .queryParam("emptyBody", "true")
+ .request()
+ .accept(MediaType.APPLICATION_JSON)
+ .async()
+ .get(RestClientTestEchoResponse.class)
+ .get());
+ assertEquals(VetoException.class, ee.getCause().getClass());
+ assertEquals("Forbidden", ((VetoException) ee.getCause()).getDisplayMessage());
+ }
+
+ @Test
+ public void testAsyncGetEntityNotFound() throws Exception {
+ ExecutionException ee = assertThrows(ExecutionException.class, () -> m_target
+ .queryParam("status", Response.Status.NOT_FOUND.getStatusCode())
+ .request()
+ .accept(MediaType.APPLICATION_JSON)
+ .async()
+ .get(RestClientTestEchoResponse.class)
+ .get());
+ assertEquals(ProcessingException.class, ee.getCause().getClass());
+ assertEquals("REST Client Test: Not Found", ((ProcessingException) ee.getCause()).getDisplayMessage());
+ }
+
+ @Test
+ public void testAsyncGetEntityNotFoundEmptyBody() {
+ ExecutionException ee = assertThrows(ExecutionException.class, () -> m_target
+ .queryParam("status", Response.Status.NOT_FOUND.getStatusCode())
+ .queryParam("emptyBody", "true")
+ .request()
+ .accept(MediaType.APPLICATION_JSON)
+ .async()
+ .get(RestClientTestEchoResponse.class)
+ .get());
+ assertEquals(ProcessingException.class, ee.getCause().getClass());
+ assertEquals("REST call failed: 404 Not Found", ((ProcessingException) ee.getCause()).getDisplayMessage());
+ }
+
+ @Test
+ public void testAsyncGetCallbackOk() throws Exception {
+ RecordingInvocationCallback callback = webTargetAsyncGetCallback(Response.Status.OK, Content.DEFAULT);
+ assertNull(callback.getThrowable());
+ assertNotNull(callback.getResponse());
+ assertEquals(Integer.valueOf(Response.Status.OK.getStatusCode()), callback.getResponse().getEcho().getCode());
+ }
+
+ @Test
+ public void testAsyncGetCallbackForbidden() throws Exception {
+ RecordingInvocationCallback callback = webTargetAsyncGetCallback(Response.Status.FORBIDDEN, Content.DEFAULT);
+ assertNull(callback.getResponse());
+ ResponseProcessingException rpe = assertException(ResponseProcessingException.class, callback.getThrowable());
+ assertException(ForbiddenException.class, rpe.getCause());
+ }
+
+ @Test
+ public void testAsyncGetCallbackForbiddenEmptyBody() throws Exception {
+ RecordingInvocationCallback callback = webTargetAsyncGetCallback(Response.Status.FORBIDDEN, Content.EMPTY_BODY);
+ assertNull(callback.getResponse());
+ ResponseProcessingException rpe = assertException(ResponseProcessingException.class, callback.getThrowable());
+ assertException(ForbiddenException.class, rpe.getCause());
+ }
+
+ @Test
+ public void testAsyncGetCallbackNotFound() throws Exception {
+ RecordingInvocationCallback callback = webTargetAsyncGetCallback(Response.Status.NOT_FOUND, Content.DEFAULT);
+ assertNull(callback.getResponse());
+ ResponseProcessingException rpe = assertException(ResponseProcessingException.class, callback.getThrowable());
+ assertException(NotFoundException.class, rpe.getCause());
+ }
+
+ @Test
+ public void testAsyncGetCallbackNotFoundEmptyBody() throws Exception {
+ RecordingInvocationCallback callback = webTargetAsyncGetCallback(Response.Status.NOT_FOUND, Content.EMPTY_BODY);
+ assertNull(callback.getResponse());
+ ResponseProcessingException rpe = assertException(ResponseProcessingException.class, callback.getThrowable());
+ assertException(NotFoundException.class, rpe.getCause());
+ }
+
+ protected RecordingInvocationCallback webTargetAsyncGetCallback(Response.Status status, Content content) throws Exception {
+ RecordingInvocationCallback callback = new RecordingInvocationCallback();
+ WebTarget target = m_target.queryParam("status", status.getStatusCode());
+ if (content == Content.EMPTY_BODY) {
+ target.queryParam("emptyBody", "true");
+ }
+ target
+ .request()
+ .accept(MediaType.APPLICATION_JSON)
+ .async()
+ .get(callback);
+ callback.await();
+ return callback;
+ }
+
+ // --- client.invocation -> GET -> Entity ------------------------------------
+
+ @Test
+ public void testClientInvocationSyncGetEntityOk() throws Exception {
+ RestClientTestEchoResponse response = clientInvocationGetEntity(Response.Status.OK, Content.DEFAULT, Execution.SYNC);
+ assertNotNull(response);
+ assertEquals(Integer.valueOf(Response.Status.OK.getStatusCode()), response.getEcho().getCode());
+ }
+
+ @Test
+ public void testClientInvocationSyncGetEntityForbidden() {
+ VetoException ve = assertThrows(VetoException.class, () -> clientInvocationGetEntity(Response.Status.FORBIDDEN, Content.DEFAULT, Execution.SYNC));
+ assertEquals("REST Client Test: Forbidden", ve.getDisplayMessage());
+ }
+
+ @Test
+ public void testClientInvocationSyncGetEntityForbiddenEmptyBody() {
+ VetoException ve = assertThrows(VetoException.class, () -> clientInvocationGetEntity(Response.Status.FORBIDDEN, Content.EMPTY_BODY, Execution.SYNC));
+ assertEquals("Forbidden", ve.getDisplayMessage());
+ }
+
+ @Test
+ public void testClientInvocationSyncGetEntityNotFound() {
+ ProcessingException pe = assertThrows(ProcessingException.class, () -> clientInvocationGetEntity(Response.Status.NOT_FOUND, Content.DEFAULT, Execution.SYNC));
+ assertEquals("REST Client Test: Not Found", pe.getDisplayMessage());
+ }
+
+ @Test
+ public void testClientInvocationSyncGetEntityNotFoundEmptyBody() {
+ ProcessingException pe = assertThrows(ProcessingException.class, () -> clientInvocationGetEntity(Response.Status.NOT_FOUND, Content.EMPTY_BODY, Execution.SYNC));
+ assertEquals("REST call failed: 404 Not Found", pe.getDisplayMessage());
+ }
+
+ @Test
+ public void testClientInvocationAsyncGetEntityOk() throws Exception {
+ RestClientTestEchoResponse response = clientInvocationGetEntity(Response.Status.OK, Content.DEFAULT, Execution.ASYNC);
+ assertNotNull(response);
+ assertEquals(Integer.valueOf(Response.Status.OK.getStatusCode()), response.getEcho().getCode());
+ }
+
+ @Test
+ public void testClientInvocationAsyncGetEntityForbidden() {
+ ExecutionException ee = assertThrows(ExecutionException.class, () -> clientInvocationGetEntity(Response.Status.FORBIDDEN, Content.DEFAULT, Execution.ASYNC));
+ assertEquals(VetoException.class, ee.getCause().getClass());
+ assertEquals("REST Client Test: Forbidden", ((VetoException) ee.getCause()).getDisplayMessage());
+ }
+
+ @Test
+ public void testClientInvocationAsyncGetEntityForbiddenEmptyBody() throws Exception {
+ ExecutionException ee = assertThrows(ExecutionException.class, () -> clientInvocationGetEntity(Response.Status.FORBIDDEN, Content.EMPTY_BODY, Execution.ASYNC));
+ assertEquals(VetoException.class, ee.getCause().getClass());
+ assertEquals("Forbidden", ((VetoException) ee.getCause()).getDisplayMessage());
+ }
+
+ @Test
+ public void testClientInvocationAsyncGetEntityNotFound() {
+ ExecutionException ee = assertThrows(ExecutionException.class, () -> clientInvocationGetEntity(Response.Status.NOT_FOUND, Content.DEFAULT, Execution.ASYNC));
+ assertEquals(ProcessingException.class, ee.getCause().getClass());
+ assertEquals("REST Client Test: Not Found", ((ProcessingException) ee.getCause()).getDisplayMessage());
+ }
+
+ @Test
+ public void testClientInvocationAsyncGetEntityNotFoundEmptyBody() throws Exception {
+ ExecutionException ee = assertThrows(ExecutionException.class, () -> clientInvocationGetEntity(Response.Status.NOT_FOUND, Content.EMPTY_BODY, Execution.ASYNC));
+ assertEquals(ProcessingException.class, ee.getCause().getClass());
+ assertEquals("REST call failed: 404 Not Found", ((ProcessingException) ee.getCause()).getDisplayMessage());
+ }
+
+ protected RestClientTestEchoResponse clientInvocationGetEntity(Status status, Content content, Execution execution) throws Exception {
+ UriBuilder uriBuilder = new UriBuilder(m_helper.getBaseUri())
+ .addPath("echo")
+ .parameter("status", String.valueOf(status.getStatusCode()));
+
+ if (content == Content.EMPTY_BODY) {
+ uriBuilder.parameter("emptyBody", String.valueOf(true));
+ }
+
+ Builder invocationBuilder = m_helper.client()
+ .invocation(Link.fromUri(uriBuilder.createURI()).build())
+ .accept(MediaType.APPLICATION_JSON);
+
+ if (execution == Execution.SYNC) {
+ return invocationBuilder.get(RestClientTestEchoResponse.class);
+ }
+ return invocationBuilder.async().get(RestClientTestEchoResponse.class).get();
+ }
+
+ // --- invocation -> invoke -> Entity ----------------------------------------
+
+ @Test
+ public void testInvocationSyncGetEntityOk() {
+ int scOk = Response.Status.OK.getStatusCode();
+ Invocation invocation = m_target
+ .queryParam("status", scOk)
+ .request()
+ .accept(MediaType.APPLICATION_JSON)
+ .buildGet();
+
+ RestClientTestEchoResponse response = invocation.invoke(RestClientTestEchoResponse.class);
+ assertNotNull(response);
+ assertEquals(Integer.valueOf(scOk), response.getEcho().getCode());
+ }
+
+ @Test
+ public void testInvocationSyncGetEntityForbidden() {
+ Invocation invocation = m_target
+ .queryParam("status", Response.Status.FORBIDDEN.getStatusCode())
+ .request()
+ .accept(MediaType.APPLICATION_JSON)
+ .buildGet();
+
+ VetoException ve = assertThrows(VetoException.class, () -> invocation.invoke(RestClientTestEchoResponse.class));
+ assertEquals("REST Client Test: Forbidden", ve.getDisplayMessage());
+ }
+
+ @Test
+ public void testInvocationSyncGetEntityForbiddenEmptyBody() {
+ Invocation invocation = m_target
+ .queryParam("status", Response.Status.FORBIDDEN.getStatusCode())
+ .queryParam("emptyBody", "true")
+ .request()
+ .accept(MediaType.APPLICATION_JSON)
+ .buildGet();
+
+ VetoException ve = assertThrows(VetoException.class, () -> invocation.invoke(RestClientTestEchoResponse.class));
+ assertEquals("Forbidden", ve.getDisplayMessage());
+ }
+
+ @Test
+ public void testInvocationAsyncGetEntityOk() throws Exception {
+ int scOk = Response.Status.OK.getStatusCode();
+ Invocation invocation = m_target
+ .queryParam("status", scOk)
+ .request()
+ .accept(MediaType.APPLICATION_JSON)
+ .buildGet();
+
+ RestClientTestEchoResponse response = invocation.submit(RestClientTestEchoResponse.class).get();
+ assertNotNull(response);
+ assertEquals(Integer.valueOf(scOk), response.getEcho().getCode());
+ }
+
+ @Test
+ public void testInvocationAsyncGetEntityForbidden() {
+ Invocation invocation = m_target
+ .queryParam("status", Response.Status.FORBIDDEN.getStatusCode())
+ .request()
+ .accept(MediaType.APPLICATION_JSON)
+ .buildGet();
+
+ ExecutionException ee = assertThrows(ExecutionException.class, () -> invocation.submit(RestClientTestEchoResponse.class).get());
+ assertEquals(VetoException.class, ee.getCause().getClass());
+ assertEquals("REST Client Test: Forbidden", ((VetoException) ee.getCause()).getDisplayMessage());
+ }
+
+ @Test
+ public void testInvocationAsyncGetEntityForbiddenEmptyBody() throws Exception {
+ Invocation invocation = m_target
+ .queryParam("status", Response.Status.FORBIDDEN.getStatusCode())
+ .queryParam("emptyBody", "true")
+ .request()
+ .accept(MediaType.APPLICATION_JSON)
+ .buildGet();
+
+ ExecutionException ee = assertThrows(ExecutionException.class, () -> invocation.submit(RestClientTestEchoResponse.class).get());
+ assertEquals(VetoException.class, ee.getCause().getClass());
+ assertEquals("Forbidden", ((VetoException) ee.getCause()).getDisplayMessage());
+ }
+
+ @Test
+ public void testInvocationAsyncGetCallbackOk() throws Exception {
+ RecordingInvocationCallback callback = invocationAsyncGetCallback(Response.Status.OK, Content.DEFAULT);
+ assertNotNull(callback.getResponse());
+ assertEquals(Integer.valueOf(Response.Status.OK.getStatusCode()), callback.getResponse().getEcho().getCode());
+ assertNull(callback.getThrowable());
+ }
+
+ @Test
+ public void testInvocationAsyncGetCallbackForbidden() throws Exception {
+ RecordingInvocationCallback callback = invocationAsyncGetCallback(Response.Status.FORBIDDEN, Content.DEFAULT);
+ assertNull(callback.getResponse());
+ ResponseProcessingException rpe = assertException(ResponseProcessingException.class, callback.getThrowable());
+ assertException(ForbiddenException.class, rpe.getCause());
+ }
+
+ @Test
+ public void testInvocationAsyncGetCallbackEmptyBody() throws Exception {
+ RecordingInvocationCallback callback = invocationAsyncGetCallback(Response.Status.FORBIDDEN, Content.EMPTY_BODY);
+ assertNull(callback.getResponse());
+ ResponseProcessingException rpe = assertException(ResponseProcessingException.class, callback.getThrowable());
+ assertException(ForbiddenException.class, rpe.getCause());
+ }
+
+ protected RecordingInvocationCallback invocationAsyncGetCallback(Response.Status status, Content content) throws Exception {
+ WebTarget target = m_target.queryParam("status", status.getStatusCode());
+ if (content == Content.EMPTY_BODY) {
+ target.queryParam("emptyBody", "true");
+ }
+
+ Invocation invocation = target
+ .request()
+ .accept(MediaType.APPLICATION_JSON)
+ .buildGet();
+
+ RecordingInvocationCallback callback = new RecordingInvocationCallback();
+ invocation.submit(callback);
+ callback.await();
+ return callback;
+ }
+
+ protected static enum Execution {
+ SYNC, ASYNC;
+ }
+
+ protected static enum Content {
+ DEFAULT, EMPTY_BODY, LARGE_MESSAGE;
+ }
+
+ /**
+ * {@link InvocationCallback} that just records the completed {@link Response} or the {@link Throwable}, if
+ * unsuccessful.
+ */
+ protected static class RecordingInvocationCallback implements InvocationCallback<RestClientTestEchoResponse> {
+
+ private final CountDownLatch m_latch = new CountDownLatch(1);
+ private RestClientTestEchoResponse m_response;
+ private Throwable m_throwable;
+
+ @Override
+ public void completed(RestClientTestEchoResponse response) {
+ m_response = response;
+ m_latch.countDown();
+ }
+
+ @Override
+ public void failed(Throwable throwable) {
+ m_throwable = throwable;
+ m_latch.countDown();
+ }
+
+ public void await() throws InterruptedException {
+ m_latch.await();
+ }
+
+ public RestClientTestEchoResponse getResponse() {
+ return m_response;
+ }
+
+ public Throwable getThrowable() {
+ return m_throwable;
+ }
+ }
+
+ protected <T extends Throwable> T assertException(Class<T> expectedType, Throwable actualException) {
+ if (actualException == null) {
+ throw new AssertionError("Expecting [" + expectedType.getName() + "] but nothing was thrown");
+ }
+ if (expectedType.isInstance(actualException)) {
+ return expectedType.cast(actualException);
+ }
+ throw new AssertionError("Expecting [" + expectedType.getName() + "] but a [" + actualException.getClass().getName() + "] was thrown", actualException);
+ }
+}
diff --git a/org.eclipse.scout.rt.rest.jersey.test/src/test/java/org/eclipse/scout/rt/rest/jersey/client/proxy/RestClientProxyWebAppExceptionMappingTest.java b/org.eclipse.scout.rt.rest.jersey.test/src/test/java/org/eclipse/scout/rt/rest/jersey/client/proxy/RestClientProxyWebAppExceptionMappingTest.java
new file mode 100644
index 0000000000..7e549a6bb0
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.jersey.test/src/test/java/org/eclipse/scout/rt/rest/jersey/client/proxy/RestClientProxyWebAppExceptionMappingTest.java
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2018 BSI Business Systems Integration AG.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * BSI Business Systems Integration AG - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.scout.rt.rest.jersey.client.proxy;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertSame;
+
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.client.WebTarget;
+import javax.ws.rs.core.Response;
+
+import org.eclipse.scout.rt.platform.BEANS;
+import org.eclipse.scout.rt.rest.client.proxy.RestClientProxyFactory;
+import org.eclipse.scout.rt.rest.jersey.JerseyTestApplication;
+import org.eclipse.scout.rt.rest.jersey.JerseyTestRestClientHelper;
+import org.eclipse.scout.rt.testing.platform.util.ScoutAssert;
+import org.glassfish.jersey.client.ClientProperties;
+import org.glassfish.jersey.client.JerseyInvocation;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class RestClientProxyWebAppExceptionMappingTest {
+
+ @BeforeClass
+ public static void beforeClass() {
+ BEANS.get(JerseyTestApplication.class).ensureStarted();
+ }
+
+ /**
+ * Verify that {@link RestClientProxyFactory#convertToWebAppException} behaves the same as {@link JerseyInvocation}.
+ */
+ @Test
+ public void testExceptionMapping() {
+ TestingRestClientProxyFactory proxyFactory = new TestingRestClientProxyFactory();
+ JerseyTestRestClientHelper helper = BEANS.get(JerseyTestRestClientHelper.class);
+ WebTarget target = helper
+ .target("echo", null) // use identity exception transformer
+ .property(ClientProperties.FOLLOW_REDIRECTS, false); // do not follow redirects (otherwise 301 check will not work)
+
+ // status 1xx and 2xx are not checked because some of them change the behavior of HTTP clients
+ for (int status = 300; status < 1000; status++) {
+ // invoke REST service and let jersey transform the status code into an exception
+ final int finalStatus = status;
+ final WebApplicationException remoteException = ScoutAssert.assertThrows(WebApplicationException.class, () -> target
+ .queryParam("status", finalStatus)
+ .request()
+ .get());
+
+ // mock response and convert it into an exception using duplicated converter method
+ Response mockResponse = Response.status(status).build();
+ WebApplicationException convertedException = proxyFactory.convertToWebAppException(mockResponse);
+ assertSame(mockResponse, convertedException.getResponse());
+ assertEquals(status, convertedException.getResponse().getStatus());
+
+ // converted exception must have same type as the one thrown by jersey
+ assertSame("status: " + status, remoteException.getClass(), convertedException.getClass());
+ }
+ }
+
+ /**
+ * Testing class required because of method visibility restrictions.
+ */
+ private static class TestingRestClientProxyFactory extends RestClientProxyFactory {
+ @Override
+ protected WebApplicationException convertToWebAppException(Response response) {
+ return super.convertToWebAppException(response);
+ }
+ }
+}
diff --git a/org.eclipse.scout.rt.rest.jersey.test/src/test/resources/META-INF/scout.xml b/org.eclipse.scout.rt.rest.jersey.test/src/test/resources/META-INF/scout.xml
new file mode 100644
index 0000000000..a683b09e97
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.jersey.test/src/test/resources/META-INF/scout.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2010-2018 BSI Business Systems Integration AG.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ BSI Business Systems Integration AG - initial API and implementation
+
+-->
+<scout>
+</scout>
diff --git a/org.eclipse.scout.rt.rest.jersey.test/src/test/resources/logback-test.xml b/org.eclipse.scout.rt.rest.jersey.test/src/test/resources/logback-test.xml
new file mode 100644
index 0000000000..cbed71dca2
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.jersey.test/src/test/resources/logback-test.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2010-2018 BSI Business Systems Integration AG.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ BSI Business Systems Integration AG - initial API and implementation
+
+-->
+<configuration>
+ <include resource="logback-test-scout.xml" />
+
+ <logger name="org.apache.http.impl.conn" level="DEBUG" />
+</configuration>
diff --git a/org.eclipse.scout.rt.rest.test/pom.xml b/org.eclipse.scout.rt.rest.test/pom.xml
index c6ead3133a..67809cdeff 100644
--- a/org.eclipse.scout.rt.rest.test/pom.xml
+++ b/org.eclipse.scout.rt.rest.test/pom.xml
@@ -37,5 +37,15 @@
<artifactId>org.eclipse.scout.rt.shared.test</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.eclipse.scout.rt</groupId>
+ <artifactId>org.eclipse.scout.rt.jackson.test</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
diff --git a/org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/client/proxy/AbstractRestClientProxyFactoryTest.java b/org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/client/proxy/AbstractRestClientProxyFactoryTest.java
new file mode 100644
index 0000000000..f4bcd5d560
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/client/proxy/AbstractRestClientProxyFactoryTest.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * Copyright (c) 2018 BSI Business Systems Integration AG.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * BSI Business Systems Integration AG - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.scout.rt.rest.client.proxy;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import javax.ws.rs.client.AsyncInvoker;
+import javax.ws.rs.client.Client;
+import javax.ws.rs.client.Invocation.Builder;
+import javax.ws.rs.core.Response;
+
+import org.junit.Before;
+import org.mockito.Mockito;
+
+public abstract class AbstractRestClientProxyFactoryTest {
+
+ public static final String URI = "http:://localhost:80/test";
+
+ protected RestClientProxyFactory m_factory;
+
+ @Before
+ public void before() {
+ m_factory = new RestClientProxyFactory();
+ }
+
+ public RestClientProxyFactory getFactory() {
+ return m_factory;
+ }
+
+ /**
+ * Creates a new mock of {@link Client} that creates mocks for return values of invoked methods.
+ */
+ protected Client mockClient() {
+ return Mockito.mock(Client.class, Mockito.RETURNS_MOCKS);
+ }
+
+ protected AsyncInvoker mockAsyncInvoker(Builder builder) {
+ AsyncInvoker asyncInvoker = mock(AsyncInvoker.class);
+ when(getFactory().unwrap(builder).async()).thenReturn(asyncInvoker);
+ return asyncInvoker;
+ }
+
+ protected static Response mockResponse() {
+ Response response = Mockito.spy(Response.class);
+ when(response.getStatusInfo()).thenReturn(Response.Status.OK);
+ return response;
+ }
+
+ protected void assertRestProxy(Object proxy) {
+ assertNotNull(proxy);
+ assertTrue(getFactory().isProxy(proxy));
+ }
+}
diff --git a/org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/client/proxy/RestClientApiFootprintTest.java b/org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/client/proxy/RestClientApiFootprintTest.java
new file mode 100644
index 0000000000..d4e1631f0b
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/client/proxy/RestClientApiFootprintTest.java
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * Copyright (c) 2018 BSI Business Systems Integration AG.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * BSI Business Systems Integration AG - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.scout.rt.rest.client.proxy;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.ws.rs.client.Client;
+
+import org.eclipse.scout.rt.jackson.testing.DataObjectSerializationTestHelper;
+import org.eclipse.scout.rt.platform.BEANS;
+import org.eclipse.scout.rt.platform.dataobject.IDataObjectMapper;
+import org.eclipse.scout.rt.rest.client.proxy.api.ApiSignature;
+import org.eclipse.scout.rt.rest.client.proxy.api.ApiSignatureDo;
+import org.eclipse.scout.rt.testing.platform.runner.PlatformTestRunner;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(PlatformTestRunner.class)
+public class RestClientApiFootprintTest {
+
+ @Test
+ public void collectApiSignatures() throws IOException {
+ ApiSignatureDo api = BEANS.get(ApiSignature.class)
+ .classFilter(c -> c.getPackage() != null && c.getPackage().getName().startsWith("javax.ws.rs."))
+ .methodFilter(m -> !"$jacocoInit".equals(m.getName())) // ignore methods created by code coverage
+ .collect(Client.class)
+ .build();
+
+ ApiSignatureDo referenceApi;
+ try (InputStream in = RestClientApiFootprintTest.class.getResourceAsStream("restApiSignature.json")) {
+ referenceApi = BEANS.get(IDataObjectMapper.class).readValue(in, ApiSignatureDo.class);
+ }
+
+ BEANS.get(DataObjectSerializationTestHelper.class).assertJsonEquals(referenceApi, api);
+ }
+}
diff --git a/org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/client/proxy/RestClientProxyFactoryInvocationBuilderTest.java b/org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/client/proxy/RestClientProxyFactoryInvocationBuilderTest.java
new file mode 100644
index 0000000000..dc9aab5a01
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/client/proxy/RestClientProxyFactoryInvocationBuilderTest.java
@@ -0,0 +1,180 @@
+/*******************************************************************************
+ * Copyright (c) 2018 BSI Business Systems Integration AG.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * BSI Business Systems Integration AG - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.scout.rt.rest.client.proxy;
+
+import static org.junit.Assert.assertSame;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyNoMoreInteractions;
+import static org.mockito.Mockito.when;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.Future;
+import java.util.function.Function;
+
+import javax.ws.rs.client.AsyncInvoker;
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.client.Invocation.Builder;
+import javax.ws.rs.client.SyncInvoker;
+import javax.ws.rs.core.GenericType;
+import javax.ws.rs.core.Link;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+
+@RunWith(Parameterized.class)
+public class RestClientProxyFactoryInvocationBuilderTest<T> extends AbstractRestClientProxyFactoryTest {
+
+ private InvocationSpec<T> m_spec;
+
+ @Parameters(name = "{0}")
+ public static List<InvocationSpec<?>> values() {
+ final GenericType<List<String>> genericType = new GenericType<List<String>>() {
+ };
+ final Entity<String> entity = Entity.json("{'key': 'value'}");
+ final String customHttpMethod = "custom";
+
+ return Arrays.asList(
+ // GET
+ InvocationSpec.of("GET -> Response", sync -> sync.get(), async -> async.get(), mockResponse()),
+ InvocationSpec.of("GET -> Entity", sync -> sync.get(String.class), async -> async.get(String.class), "test"),
+ InvocationSpec.of("GET -> GenericType", sync -> sync.get(genericType), async -> async.get(genericType), Arrays.asList("a", "b")),
+
+ // PUT
+ InvocationSpec.of("PUT -> Response", sync -> sync.put(entity), async -> async.put(entity), mockResponse()),
+ InvocationSpec.of("PUT -> Entity", sync -> sync.put(entity, String.class), async -> async.put(entity, String.class), "test"),
+ InvocationSpec.of("PUT -> GenericType", sync -> sync.put(entity, genericType), async -> async.put(entity, genericType), Arrays.asList("a", "b")),
+
+ // POST
+ InvocationSpec.of("POST -> Response", sync -> sync.post(entity), async -> async.post(entity), mockResponse()),
+ InvocationSpec.of("POST -> Entity", sync -> sync.post(entity, String.class), async -> async.post(entity, String.class), "test"),
+ InvocationSpec.of("POST -> GenericType", sync -> sync.post(entity, genericType), async -> async.post(entity, genericType), Arrays.asList("a", "b")),
+
+ // DELETE
+ InvocationSpec.of("DELETE -> Response", sync -> sync.delete(), async -> async.delete(), mockResponse()),
+ InvocationSpec.of("DELETE -> Entity", sync -> sync.delete(String.class), async -> async.delete(String.class), "test"),
+ InvocationSpec.of("DELETE -> GenericType", sync -> sync.delete(genericType), async -> async.delete(genericType), Arrays.asList("a", "b")),
+
+ // HEAD
+ InvocationSpec.of("HEAD -> Response", sync -> sync.head(), async -> async.head(), mockResponse()),
+
+ // OPTIONS
+ InvocationSpec.of("OPTIONS -> Response", sync -> sync.options(), async -> async.options(), mockResponse()),
+ InvocationSpec.of("OPTIONS -> Entity", sync -> sync.options(String.class), async -> async.options(String.class), "test"),
+ InvocationSpec.of("OPTIONS -> GenericType", sync -> sync.options(genericType), async -> async.options(genericType), Arrays.asList("a", "b")),
+
+ // TRACE
+ InvocationSpec.of("TRACE -> Response", sync -> sync.trace(), async -> async.trace(), mockResponse()),
+ InvocationSpec.of("TRACE -> Entity", sync -> sync.trace(String.class), async -> async.trace(String.class), "test"),
+ InvocationSpec.of("TRACE -> GenericType", sync -> sync.trace(genericType), async -> async.trace(genericType), Arrays.asList("a", "b")),
+
+ // ARBITRARY METHOD
+ InvocationSpec.of("CUSTOM() -> Response", sync -> sync.method(customHttpMethod), async -> async.method(customHttpMethod), mockResponse()),
+ InvocationSpec.of("CUSTOM() -> Entity", sync -> sync.method(customHttpMethod, String.class), async -> async.method(customHttpMethod, String.class), "test"),
+ InvocationSpec.of("CUSTOM() -> GenericType", sync -> sync.method(customHttpMethod, genericType), async -> async.method(customHttpMethod, genericType), Arrays.asList("a", "b")),
+ InvocationSpec.of("CUSTOM(Entity) -> Response", sync -> sync.method(customHttpMethod, entity), async -> async.method(customHttpMethod, entity), mockResponse()),
+ InvocationSpec.of("CUSTOM(Entity) -> Entity", sync -> sync.method(customHttpMethod, entity, String.class), async -> async.method(customHttpMethod, entity, String.class), "test"),
+ InvocationSpec.of("CUSTOM(Entity) -> GenericType", sync -> sync.method(customHttpMethod, entity, genericType), async -> async.method(customHttpMethod, entity, genericType), Arrays.asList("a", "b")));
+ }
+
+ public RestClientProxyFactoryInvocationBuilderTest(InvocationSpec<T> spec) {
+ m_spec = spec;
+ }
+
+ @Test
+ public void testInvocationBuilderUpgradeSyncInvocationToAsync() {
+ // create new request
+ Builder builder = getFactory().createClientProxy(mockClient(), null).target(URI).request();
+ assertSyncInvocationIsUpgradedToAsync(builder);
+ }
+
+ @Test
+ public void testInvocationBuilderPreserveAsyncInvocation() throws Exception {
+ // create new request
+ Builder builder = getFactory().createClientProxy(mockClient(), null).target(URI).request();
+
+ // create async invoker and record expected behavior
+ AsyncInvoker asyncInvoker = mockAsyncInvoker(builder);
+ when(m_spec.getAsyncCall().apply(asyncInvoker)).thenReturn(CompletableFuture.completedFuture(m_spec.getExpectedResult()));
+
+ // invoke service using sync method
+ Future<T> future = m_spec.getAsyncCall().apply(asyncInvoker);
+ assertSame(m_spec.getExpectedResult(), future.get());
+
+ // verify async method has been invoked
+ m_spec.getAsyncCall().apply(verify(asyncInvoker));
+ Builder proxiedBuilder = getFactory().unwrap(builder);
+ verifyNoMoreInteractions(asyncInvoker, proxiedBuilder);
+ }
+
+ @Test
+ public void testClientInvocationUpgradeSyncInvocationToAsync() {
+ // create new request
+ Link link = mock(Link.class);
+ Builder builder = getFactory().createClientProxy(mockClient(), null).invocation(link);
+ assertSyncInvocationIsUpgradedToAsync(builder);
+ }
+
+ private void assertSyncInvocationIsUpgradedToAsync(Builder builder) {
+ // create async invoker and record expected behavior
+ AsyncInvoker asyncInvoker = mockAsyncInvoker(builder);
+ when(m_spec.getAsyncCall().apply(asyncInvoker)).thenReturn(CompletableFuture.completedFuture(m_spec.getExpectedResult()));
+
+ // invoke service using sync method
+ T response = m_spec.getSyncCall().apply(builder);
+ assertSame(m_spec.getExpectedResult(), response);
+
+ // verify async method has been invoked
+ m_spec.getAsyncCall().apply(verify(asyncInvoker));
+ Builder proxiedBuilder = getFactory().unwrap(builder);
+ verify(proxiedBuilder).async();
+ verifyNoMoreInteractions(asyncInvoker, proxiedBuilder);
+ }
+
+ protected static class InvocationSpec<T> {
+ private final String m_name;
+ private final Function<SyncInvoker, T> m_syncCall;
+ private final Function<AsyncInvoker, Future<T>> m_asyncCall;
+ private final T m_expectedResult;
+
+ public static <T> InvocationSpec of(String name, Function<SyncInvoker, T> syncCall, Function<AsyncInvoker, Future<T>> asyncCall, T expectedResult) {
+ return new InvocationSpec<T>(name, syncCall, asyncCall, expectedResult);
+ }
+
+ private InvocationSpec(String name, Function<SyncInvoker, T> syncCall, Function<AsyncInvoker, Future<T>> asyncCall, T expectedResult) {
+ m_name = name;
+ m_syncCall = syncCall;
+ m_asyncCall = asyncCall;
+ m_expectedResult = expectedResult;
+ }
+
+ public Function<SyncInvoker, T> getSyncCall() {
+ return m_syncCall;
+ }
+
+ public Function<AsyncInvoker, Future<T>> getAsyncCall() {
+ return m_asyncCall;
+ }
+
+ public T getExpectedResult() {
+ return m_expectedResult;
+ }
+
+ @Override
+ public String toString() {
+ return m_name;
+ }
+ }
+}
diff --git a/org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/client/proxy/RestClientProxyFactoryTest.java b/org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/client/proxy/RestClientProxyFactoryTest.java
new file mode 100644
index 0000000000..6ffe2e3b3d
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/client/proxy/RestClientProxyFactoryTest.java
@@ -0,0 +1,125 @@
+/*******************************************************************************
+ * Copyright (c) 2018 BSI Business Systems Integration AG.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * BSI Business Systems Integration AG - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.scout.rt.rest.client.proxy;
+
+import static org.eclipse.scout.rt.testing.platform.util.ScoutAssert.assertThrows;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+
+import java.lang.reflect.Method;
+
+import javax.ws.rs.client.AsyncInvoker;
+import javax.ws.rs.client.Client;
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.client.Invocation;
+import javax.ws.rs.client.Invocation.Builder;
+import javax.ws.rs.client.InvocationCallback;
+import javax.ws.rs.client.SyncInvoker;
+import javax.ws.rs.client.WebTarget;
+import javax.ws.rs.core.GenericType;
+import javax.ws.rs.core.MediaType;
+
+import org.eclipse.scout.rt.platform.util.Assertions.AssertionException;
+import org.hamcrest.CoreMatchers;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ErrorCollector;
+
+public class RestClientProxyFactoryTest extends AbstractRestClientProxyFactoryTest {
+
+ @Rule
+ public ErrorCollector m_errorCollector = new ErrorCollector();
+
+ @Test
+ public void testResolveAsyncMethods() throws Exception {
+ for (Method m : SyncInvoker.class.getMethods()) {
+ m_errorCollector.checkThat("Expecting mapping for " + m, getFactory().resolveAsyncMethod(m), CoreMatchers.notNullValue());
+ }
+
+ for (Method m : Invocation.class.getMethods()) {
+ if (!RestClientProxyFactory.INVOCATION_INVOKE_METHOD_NAME.equals(m.getName())) {
+ continue;
+ }
+ m_errorCollector.checkThat("Expecting mapping for " + m, getFactory().resolveAsyncMethod(m), CoreMatchers.notNullValue());
+ }
+
+ assertNull(getFactory().resolveAsyncMethod(null));
+ assertNull(getFactory().resolveAsyncMethod(Object.class.getMethod("toString")));
+
+ // test method of Invocation.Builder, which is a sub-type of SyncInvoker
+ assertNull(getFactory().resolveAsyncMethod(Invocation.Builder.class.getMethod("buildGet")));
+ }
+
+ @Test
+ public void testIsUsingInvocationCallback() throws Exception {
+ assertFalse(getFactory().isUsingInvocationCallback(null));
+ assertFalse(getFactory().isUsingInvocationCallback(Object.class.getDeclaredMethod("equals", Object.class)));
+ assertFalse(getFactory().isUsingInvocationCallback(AsyncInvoker.class.getDeclaredMethod("post", Entity.class, GenericType.class)));
+
+ assertTrue(getFactory().isUsingInvocationCallback(AsyncInvoker.class.getDeclaredMethod("post", Entity.class, InvocationCallback.class)));
+ }
+
+ @Test
+ public void testIsProxy() {
+ assertFalse(getFactory().isProxy(null));
+ assertFalse(getFactory().isProxy("test"));
+ assertFalse(getFactory().isProxy(new Object()));
+
+ Client client = mockClient();
+ assertFalse(getFactory().isProxy(client));
+ Client proxy = getFactory().createClientProxy(client, null);
+ assertRestProxy(proxy);
+ }
+
+ @Test
+ public void testUnwrap() {
+ assertNull(getFactory().unwrap(null));
+
+ Object o = new Object();
+ assertSame(o, getFactory().unwrap(o));
+
+ Client client = mockClient();
+ Client proxy = getFactory().createClientProxy(client, null);
+ assertSame(client, getFactory().unwrap(proxy));
+ }
+
+ @Test
+ public void testCreateAndConfigureProxiedClient() throws Exception {
+ assertThrows(AssertionException.class, () -> getFactory().createClientProxy(null, null));
+
+ Client client = mockClient();
+ // ensure client is not mistakenly considered as async proxy
+ assertFalse(getFactory().isProxy(client));
+
+ Client proxyClient = getFactory().createClientProxy(client, null);
+ assertRestProxy(proxyClient);
+
+ // create target
+ WebTarget target = proxyClient.target(URI);
+ assertRestProxy(target);
+
+ // add param to target
+ WebTarget targetWithParam = target.queryParam("param", "value");
+ assertRestProxy(targetWithParam);
+
+ // create request
+ Builder invocationBuilder = targetWithParam.request();
+ assertRestProxy(invocationBuilder);
+
+ // accept
+ Builder invocationBuilderWithAccept = invocationBuilder.accept(MediaType.APPLICATION_JSON);
+ assertRestProxy(invocationBuilderWithAccept);
+
+ invocationBuilderWithAccept.property("", null);
+ }
+}
diff --git a/org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/client/proxy/api/ApiSignature.java b/org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/client/proxy/api/ApiSignature.java
new file mode 100644
index 0000000000..a41f1870e6
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/client/proxy/api/ApiSignature.java
@@ -0,0 +1,120 @@
+/*******************************************************************************
+ * Copyright (c) 2018 BSI Business Systems Integration AG.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * BSI Business Systems Integration AG - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.scout.rt.rest.client.proxy.api;
+
+import java.lang.reflect.Method;
+import java.lang.reflect.Parameter;
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Objects;
+import java.util.Set;
+import java.util.function.Predicate;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import org.eclipse.scout.rt.platform.BEANS;
+import org.eclipse.scout.rt.platform.Bean;
+
+@Bean
+public class ApiSignature {
+
+ private final Set<Class<?>> m_pendingClasses = new HashSet<>();
+ private final Set<Class<?>> m_processedClasses = new HashSet<>();
+ private final List<Predicate<Class<?>>> m_classFilters = new ArrayList<>();
+ private final List<Predicate<Method>> m_methodFilters = new ArrayList<>();
+
+ public ApiSignature classFilter(Predicate<Class<?>> filter) {
+ m_classFilters.add(filter);
+ return this;
+ }
+
+ public ApiSignature methodFilter(Predicate<Method> filter) {
+ m_methodFilters.add(filter);
+ return this;
+ }
+
+ public ApiSignature collect(Class<?>... classes) {
+ if (classes != null) {
+ Stream.of(classes)
+ .filter(Objects::nonNull)
+ .filter(c -> !m_processedClasses.contains(c))
+ .filter(c -> accept(m_classFilters, c))
+ .forEach(m_pendingClasses::add);
+ }
+ return this;
+ }
+
+ private <T> boolean accept(List<Predicate<T>> filters, T obj) {
+ for (Predicate<T> filter : filters) {
+ if (!filter.test(obj)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ public ApiSignatureDo build() {
+ List<ClassSignatureDo> signatures = new ArrayList<>();
+
+ while (!m_pendingClasses.isEmpty()) {
+ for (Class<?> c : resetPendingClasses()) {
+ signatures.add(signature(c));
+ m_processedClasses.add(c);
+ }
+ }
+
+ Collections.sort(signatures, Comparator.comparing(ClassSignatureDo::getName));
+ return BEANS.get(ApiSignatureDo.class).withClasses(signatures);
+ }
+
+ private Set<Class<?>> resetPendingClasses() {
+ HashSet<Class<?>> classes = new HashSet<>(m_pendingClasses);
+ m_pendingClasses.clear();
+ classes.removeAll(m_processedClasses);
+ return classes;
+ }
+
+ protected ClassSignatureDo signature(Class<?> c) {
+ collect(c.getSuperclass());
+ collect(c.getInterfaces());
+
+ return BEANS.get(ClassSignatureDo.class)
+ .withName(c.getName())
+ .withModifiers(c.getModifiers())
+ .withSuperclass(c.getSuperclass() == null ? null : c.getSuperclass().getName())
+ .withInterfaces(Stream.of(c.getInterfaces())
+ .map(Class::getName)
+ .collect(Collectors.toList()))
+ .withMethods(Stream.of(c.getDeclaredMethods())
+ .sorted(Comparator.comparing(Method::toString))
+ .filter(m -> accept(m_methodFilters, m))
+ .map(this::signature)
+ .collect(Collectors.toList()));
+ }
+
+ protected MethodSignatureDo signature(Method m) {
+ collect(m.getReturnType());
+ collect(m.getParameterTypes());
+
+ return BEANS.get(MethodSignatureDo.class)
+ .withName(m.getName())
+ .withModifiers(m.getModifiers())
+ .withReturnType(m.getGenericReturnType().getTypeName())
+ .withParameterTypes(Stream.of(m.getParameters())
+ .map(Parameter::getParameterizedType)
+ .map(Type::getTypeName)
+ .collect(Collectors.toList()));
+ }
+}
diff --git a/org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/client/proxy/api/ApiSignatureDo.java b/org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/client/proxy/api/ApiSignatureDo.java
new file mode 100644
index 0000000000..f16899e6c2
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/client/proxy/api/ApiSignatureDo.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2018 BSI Business Systems Integration AG.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * BSI Business Systems Integration AG - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.scout.rt.rest.client.proxy.api;
+
+import java.util.Collection;
+import java.util.List;
+
+import javax.annotation.Generated;
+
+import org.eclipse.scout.rt.platform.dataobject.DoEntity;
+import org.eclipse.scout.rt.platform.dataobject.DoList;
+import org.eclipse.scout.rt.platform.dataobject.TypeName;
+
+@TypeName("scout.ApiSignature")
+public class ApiSignatureDo extends DoEntity {
+
+ public DoList<ClassSignatureDo> classes() {
+ return doList("classes");
+ }
+
+ /* **************************************************************************
+ * GENERATED CONVENIENCE METHODS
+ * *************************************************************************/
+
+ @Generated("DoConvenienceMethodsGenerator")
+ public ApiSignatureDo withClasses(Collection<? extends ClassSignatureDo> classes) {
+ classes().updateAll(classes);
+ return this;
+ }
+
+ @Generated("DoConvenienceMethodsGenerator")
+ public ApiSignatureDo withClasses(ClassSignatureDo... classes) {
+ classes().updateAll(classes);
+ return this;
+ }
+
+ @Generated("DoConvenienceMethodsGenerator")
+ public List<ClassSignatureDo> getClasses() {
+ return classes().get();
+ }
+}
diff --git a/org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/client/proxy/api/ClassSignatureDo.java b/org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/client/proxy/api/ClassSignatureDo.java
new file mode 100644
index 0000000000..5e4e535ec4
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/client/proxy/api/ClassSignatureDo.java
@@ -0,0 +1,116 @@
+/*******************************************************************************
+ * Copyright (c) 2018 BSI Business Systems Integration AG.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * BSI Business Systems Integration AG - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.scout.rt.rest.client.proxy.api;
+
+import java.util.Collection;
+import java.util.List;
+
+import javax.annotation.Generated;
+
+import org.eclipse.scout.rt.platform.dataobject.DoEntity;
+import org.eclipse.scout.rt.platform.dataobject.DoList;
+import org.eclipse.scout.rt.platform.dataobject.DoValue;
+import org.eclipse.scout.rt.platform.dataobject.TypeName;
+
+@TypeName("scout.ClassSignature")
+public class ClassSignatureDo extends DoEntity {
+
+ public DoValue<String> name() {
+ return doValue("name");
+ }
+
+ public DoValue<Integer> modifiers() {
+ return doValue("modifier");
+ }
+
+ public DoValue<String> superclass() {
+ return doValue("superclass");
+ }
+
+ public DoList<String> interfaces() {
+ return doList("interfaces");
+ }
+
+ public DoList<MethodSignatureDo> methods() {
+ return doList("methods");
+ }
+
+ /* **************************************************************************
+ * GENERATED CONVENIENCE METHODS
+ * *************************************************************************/
+
+ @Generated("DoConvenienceMethodsGenerator")
+ public ClassSignatureDo withName(String name) {
+ name().set(name);
+ return this;
+ }
+
+ @Generated("DoConvenienceMethodsGenerator")
+ public String getName() {
+ return name().get();
+ }
+
+ @Generated("DoConvenienceMethodsGenerator")
+ public ClassSignatureDo withModifiers(Integer modifiers) {
+ modifiers().set(modifiers);
+ return this;
+ }
+
+ @Generated("DoConvenienceMethodsGenerator")
+ public Integer getModifiers() {
+ return modifiers().get();
+ }
+
+ @Generated("DoConvenienceMethodsGenerator")
+ public ClassSignatureDo withSuperclass(String superclass) {
+ superclass().set(superclass);
+ return this;
+ }
+
+ @Generated("DoConvenienceMethodsGenerator")
+ public String getSuperclass() {
+ return superclass().get();
+ }
+
+ @Generated("DoConvenienceMethodsGenerator")
+ public ClassSignatureDo withInterfaces(Collection<? extends String> interfaces) {
+ interfaces().updateAll(interfaces);
+ return this;
+ }
+
+ @Generated("DoConvenienceMethodsGenerator")
+ public ClassSignatureDo withInterfaces(String... interfaces) {
+ interfaces().updateAll(interfaces);
+ return this;
+ }
+
+ @Generated("DoConvenienceMethodsGenerator")
+ public List<String> getInterfaces() {
+ return interfaces().get();
+ }
+
+ @Generated("DoConvenienceMethodsGenerator")
+ public ClassSignatureDo withMethods(Collection<? extends MethodSignatureDo> methods) {
+ methods().updateAll(methods);
+ return this;
+ }
+
+ @Generated("DoConvenienceMethodsGenerator")
+ public ClassSignatureDo withMethods(MethodSignatureDo... methods) {
+ methods().updateAll(methods);
+ return this;
+ }
+
+ @Generated("DoConvenienceMethodsGenerator")
+ public List<MethodSignatureDo> getMethods() {
+ return methods().get();
+ }
+}
diff --git a/org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/client/proxy/api/MethodSignatureDo.java b/org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/client/proxy/api/MethodSignatureDo.java
new file mode 100644
index 0000000000..f0f0e5380e
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/client/proxy/api/MethodSignatureDo.java
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2018 BSI Business Systems Integration AG.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * BSI Business Systems Integration AG - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.scout.rt.rest.client.proxy.api;
+
+import java.util.Collection;
+import java.util.List;
+
+import javax.annotation.Generated;
+
+import org.eclipse.scout.rt.platform.dataobject.DoEntity;
+import org.eclipse.scout.rt.platform.dataobject.DoList;
+import org.eclipse.scout.rt.platform.dataobject.DoValue;
+import org.eclipse.scout.rt.platform.dataobject.TypeName;
+
+@TypeName("scout.MethodSignature")
+public class MethodSignatureDo extends DoEntity {
+
+ public DoValue<String> name() {
+ return doValue("name");
+ }
+
+ public DoValue<Integer> modifiers() {
+ return doValue("modifiers");
+ }
+
+ public DoValue<String> returnType() {
+ return doValue("returnType");
+ }
+
+ public DoList<String> parameterTypes() {
+ return doList("parameterTypes");
+ }
+
+ /* **************************************************************************
+ * GENERATED CONVENIENCE METHODS
+ * *************************************************************************/
+
+ @Generated("DoConvenienceMethodsGenerator")
+ public MethodSignatureDo withName(String name) {
+ name().set(name);
+ return this;
+ }
+
+ @Generated("DoConvenienceMethodsGenerator")
+ public String getName() {
+ return name().get();
+ }
+
+ @Generated("DoConvenienceMethodsGenerator")
+ public MethodSignatureDo withModifiers(Integer modifiers) {
+ modifiers().set(modifiers);
+ return this;
+ }
+
+ @Generated("DoConvenienceMethodsGenerator")
+ public Integer getModifiers() {
+ return modifiers().get();
+ }
+
+ @Generated("DoConvenienceMethodsGenerator")
+ public MethodSignatureDo withReturnType(String returnType) {
+ returnType().set(returnType);
+ return this;
+ }
+
+ @Generated("DoConvenienceMethodsGenerator")
+ public String getReturnType() {
+ return returnType().get();
+ }
+
+ @Generated("DoConvenienceMethodsGenerator")
+ public MethodSignatureDo withParameterTypes(Collection<? extends String> parameterTypes) {
+ parameterTypes().updateAll(parameterTypes);
+ return this;
+ }
+
+ @Generated("DoConvenienceMethodsGenerator")
+ public MethodSignatureDo withParameterTypes(String... parameterTypes) {
+ parameterTypes().updateAll(parameterTypes);
+ return this;
+ }
+
+ @Generated("DoConvenienceMethodsGenerator")
+ public List<String> getParameterTypes() {
+ return parameterTypes().get();
+ }
+}
diff --git a/org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/fixture/FixtureRuntimeDelegate.java b/org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/fixture/FixtureRuntimeDelegate.java
new file mode 100644
index 0000000000..b7b990487c
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.test/src/test/java/org/eclipse/scout/rt/rest/fixture/FixtureRuntimeDelegate.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2018 BSI Business Systems Integration AG.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * BSI Business Systems Integration AG - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.scout.rt.rest.fixture;
+
+import static org.mockito.Mockito.mock;
+
+import javax.ws.rs.core.Application;
+import javax.ws.rs.core.CacheControl;
+import javax.ws.rs.core.Link.Builder;
+import javax.ws.rs.core.Response.ResponseBuilder;
+import javax.ws.rs.core.UriBuilder;
+import javax.ws.rs.core.Variant.VariantListBuilder;
+import javax.ws.rs.ext.RuntimeDelegate;
+
+import org.mockito.Mockito;
+
+/**
+ * Test fixture for JAX-RS {@link RuntimeDelegate} that is completely backed by {@link Mockito} mocks. Its only purpose
+ * is that other JAX-RS API classes can be instantiated (e.g. {@code HEADER_DELEGATE} in {@link CacheControl}).
+ */
+public class FixtureRuntimeDelegate extends RuntimeDelegate {
+
+ @Override
+ public UriBuilder createUriBuilder() {
+ return mock(UriBuilder.class);
+ }
+
+ @Override
+ public ResponseBuilder createResponseBuilder() {
+ return mock(ResponseBuilder.class);
+ }
+
+ @Override
+ public VariantListBuilder createVariantListBuilder() {
+ return mock(VariantListBuilder.class);
+ }
+
+ @Override
+ public <T> T createEndpoint(Application application, Class<T> endpointType) throws IllegalArgumentException, UnsupportedOperationException {
+ return mock(endpointType);
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public <T> HeaderDelegate<T> createHeaderDelegate(Class<T> type) throws IllegalArgumentException {
+ return mock(HeaderDelegate.class);
+ }
+
+ @Override
+ public Builder createLinkBuilder() {
+ return mock(Builder.class);
+ }
+}
diff --git a/org.eclipse.scout.rt.rest.test/src/test/resources/META-INF/services/javax.ws.rs.ext.RuntimeDelegate b/org.eclipse.scout.rt.rest.test/src/test/resources/META-INF/services/javax.ws.rs.ext.RuntimeDelegate
new file mode 100644
index 0000000000..23bf79ff28
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.test/src/test/resources/META-INF/services/javax.ws.rs.ext.RuntimeDelegate
@@ -0,0 +1 @@
+org.eclipse.scout.rt.rest.fixture.FixtureRuntimeDelegate
diff --git a/org.eclipse.scout.rt.rest.test/src/test/resources/logback-test.xml b/org.eclipse.scout.rt.rest.test/src/test/resources/logback-test.xml
new file mode 100644
index 0000000000..6a6df4efcf
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.test/src/test/resources/logback-test.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (c) 2010-2018 BSI Business Systems Integration AG.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ BSI Business Systems Integration AG - initial API and implementation
+
+-->
+<configuration>
+ <include resource="logback-test-scout.xml" />
+</configuration>
diff --git a/org.eclipse.scout.rt.rest.test/src/test/resources/org/eclipse/scout/rt/rest/client/proxy/restApiSignature.json b/org.eclipse.scout.rt.rest.test/src/test/resources/org/eclipse/scout/rt/rest/client/proxy/restApiSignature.json
new file mode 100644
index 0000000000..f86c0d9d12
--- /dev/null
+++ b/org.eclipse.scout.rt.rest.test/src/test/resources/org/eclipse/scout/rt/rest/client/proxy/restApiSignature.json
@@ -0,0 +1,2619 @@
+{
+ "_type" : "scout.ApiSignature",
+ "classes" : [ {
+ "_type" : "scout.ClassSignature",
+ "interfaces" : [ ],
+ "methods" : [ {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "delete",
+ "parameterTypes" : [ ],
+ "returnType" : "java.util.concurrent.Future<javax.ws.rs.core.Response>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "delete",
+ "parameterTypes" : [ "java.lang.Class<T>" ],
+ "returnType" : "java.util.concurrent.Future<T>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "delete",
+ "parameterTypes" : [ "javax.ws.rs.client.InvocationCallback<T>" ],
+ "returnType" : "java.util.concurrent.Future<T>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "delete",
+ "parameterTypes" : [ "javax.ws.rs.core.GenericType<T>" ],
+ "returnType" : "java.util.concurrent.Future<T>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "get",
+ "parameterTypes" : [ ],
+ "returnType" : "java.util.concurrent.Future<javax.ws.rs.core.Response>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "get",
+ "parameterTypes" : [ "java.lang.Class<T>" ],
+ "returnType" : "java.util.concurrent.Future<T>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "get",
+ "parameterTypes" : [ "javax.ws.rs.client.InvocationCallback<T>" ],
+ "returnType" : "java.util.concurrent.Future<T>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "get",
+ "parameterTypes" : [ "javax.ws.rs.core.GenericType<T>" ],
+ "returnType" : "java.util.concurrent.Future<T>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "head",
+ "parameterTypes" : [ ],
+ "returnType" : "java.util.concurrent.Future<javax.ws.rs.core.Response>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "head",
+ "parameterTypes" : [ "javax.ws.rs.client.InvocationCallback<javax.ws.rs.core.Response>" ],
+ "returnType" : "java.util.concurrent.Future<javax.ws.rs.core.Response>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "method",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "java.util.concurrent.Future<javax.ws.rs.core.Response>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "method",
+ "parameterTypes" : [ "java.lang.String", "java.lang.Class<T>" ],
+ "returnType" : "java.util.concurrent.Future<T>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "method",
+ "parameterTypes" : [ "java.lang.String", "javax.ws.rs.client.Entity<?>" ],
+ "returnType" : "java.util.concurrent.Future<javax.ws.rs.core.Response>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "method",
+ "parameterTypes" : [ "java.lang.String", "javax.ws.rs.client.Entity<?>", "java.lang.Class<T>" ],
+ "returnType" : "java.util.concurrent.Future<T>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "method",
+ "parameterTypes" : [ "java.lang.String", "javax.ws.rs.client.Entity<?>", "javax.ws.rs.client.InvocationCallback<T>" ],
+ "returnType" : "java.util.concurrent.Future<T>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "method",
+ "parameterTypes" : [ "java.lang.String", "javax.ws.rs.client.Entity<?>", "javax.ws.rs.core.GenericType<T>" ],
+ "returnType" : "java.util.concurrent.Future<T>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "method",
+ "parameterTypes" : [ "java.lang.String", "javax.ws.rs.client.InvocationCallback<T>" ],
+ "returnType" : "java.util.concurrent.Future<T>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "method",
+ "parameterTypes" : [ "java.lang.String", "javax.ws.rs.core.GenericType<T>" ],
+ "returnType" : "java.util.concurrent.Future<T>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "options",
+ "parameterTypes" : [ ],
+ "returnType" : "java.util.concurrent.Future<javax.ws.rs.core.Response>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "options",
+ "parameterTypes" : [ "java.lang.Class<T>" ],
+ "returnType" : "java.util.concurrent.Future<T>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "options",
+ "parameterTypes" : [ "javax.ws.rs.client.InvocationCallback<T>" ],
+ "returnType" : "java.util.concurrent.Future<T>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "options",
+ "parameterTypes" : [ "javax.ws.rs.core.GenericType<T>" ],
+ "returnType" : "java.util.concurrent.Future<T>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "post",
+ "parameterTypes" : [ "javax.ws.rs.client.Entity<?>" ],
+ "returnType" : "java.util.concurrent.Future<javax.ws.rs.core.Response>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "post",
+ "parameterTypes" : [ "javax.ws.rs.client.Entity<?>", "java.lang.Class<T>" ],
+ "returnType" : "java.util.concurrent.Future<T>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "post",
+ "parameterTypes" : [ "javax.ws.rs.client.Entity<?>", "javax.ws.rs.client.InvocationCallback<T>" ],
+ "returnType" : "java.util.concurrent.Future<T>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "post",
+ "parameterTypes" : [ "javax.ws.rs.client.Entity<?>", "javax.ws.rs.core.GenericType<T>" ],
+ "returnType" : "java.util.concurrent.Future<T>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "put",
+ "parameterTypes" : [ "javax.ws.rs.client.Entity<?>" ],
+ "returnType" : "java.util.concurrent.Future<javax.ws.rs.core.Response>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "put",
+ "parameterTypes" : [ "javax.ws.rs.client.Entity<?>", "java.lang.Class<T>" ],
+ "returnType" : "java.util.concurrent.Future<T>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "put",
+ "parameterTypes" : [ "javax.ws.rs.client.Entity<?>", "javax.ws.rs.client.InvocationCallback<T>" ],
+ "returnType" : "java.util.concurrent.Future<T>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "put",
+ "parameterTypes" : [ "javax.ws.rs.client.Entity<?>", "javax.ws.rs.core.GenericType<T>" ],
+ "returnType" : "java.util.concurrent.Future<T>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "trace",
+ "parameterTypes" : [ ],
+ "returnType" : "java.util.concurrent.Future<javax.ws.rs.core.Response>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "trace",
+ "parameterTypes" : [ "java.lang.Class<T>" ],
+ "returnType" : "java.util.concurrent.Future<T>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "trace",
+ "parameterTypes" : [ "javax.ws.rs.client.InvocationCallback<T>" ],
+ "returnType" : "java.util.concurrent.Future<T>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "trace",
+ "parameterTypes" : [ "javax.ws.rs.core.GenericType<T>" ],
+ "returnType" : "java.util.concurrent.Future<T>"
+ } ],
+ "modifier" : 1537,
+ "name" : "javax.ws.rs.client.AsyncInvoker",
+ "superclass" : null
+ }, {
+ "_type" : "scout.ClassSignature",
+ "interfaces" : [ "javax.ws.rs.core.Configurable" ],
+ "methods" : [ {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getHostnameVerifier",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.net.ssl.HostnameVerifier"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getSslContext",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.net.ssl.SSLContext"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "invocation",
+ "parameterTypes" : [ "javax.ws.rs.core.Link" ],
+ "returnType" : "javax.ws.rs.client.Invocation$Builder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "target",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.client.WebTarget"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "target",
+ "parameterTypes" : [ "java.net.URI" ],
+ "returnType" : "javax.ws.rs.client.WebTarget"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "target",
+ "parameterTypes" : [ "javax.ws.rs.core.Link" ],
+ "returnType" : "javax.ws.rs.client.WebTarget"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "target",
+ "parameterTypes" : [ "javax.ws.rs.core.UriBuilder" ],
+ "returnType" : "javax.ws.rs.client.WebTarget"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "close",
+ "parameterTypes" : [ ],
+ "returnType" : "void"
+ } ],
+ "modifier" : 1537,
+ "name" : "javax.ws.rs.client.Client",
+ "superclass" : null
+ }, {
+ "_type" : "scout.ClassSignature",
+ "interfaces" : [ ],
+ "methods" : [ {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "equals",
+ "parameterTypes" : [ "java.lang.Object" ],
+ "returnType" : "boolean"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "hashCode",
+ "parameterTypes" : [ ],
+ "returnType" : "int"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "getEntity",
+ "parameterTypes" : [ ],
+ "returnType" : "T"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "getEncoding",
+ "parameterTypes" : [ ],
+ "returnType" : "java.lang.String"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "toString",
+ "parameterTypes" : [ ],
+ "returnType" : "java.lang.String"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "getAnnotations",
+ "parameterTypes" : [ ],
+ "returnType" : "java.lang.annotation.Annotation[]"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "getLanguage",
+ "parameterTypes" : [ ],
+ "returnType" : "java.util.Locale"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "getMediaType",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.core.MediaType"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "getVariant",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.core.Variant"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "entity",
+ "parameterTypes" : [ "T", "java.lang.String" ],
+ "returnType" : "javax.ws.rs.client.Entity<T>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "entity",
+ "parameterTypes" : [ "T", "javax.ws.rs.core.MediaType" ],
+ "returnType" : "javax.ws.rs.client.Entity<T>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "entity",
+ "parameterTypes" : [ "T", "javax.ws.rs.core.MediaType", "java.lang.annotation.Annotation[]" ],
+ "returnType" : "javax.ws.rs.client.Entity<T>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "entity",
+ "parameterTypes" : [ "T", "javax.ws.rs.core.Variant" ],
+ "returnType" : "javax.ws.rs.client.Entity<T>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "entity",
+ "parameterTypes" : [ "T", "javax.ws.rs.core.Variant", "java.lang.annotation.Annotation[]" ],
+ "returnType" : "javax.ws.rs.client.Entity<T>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "form",
+ "parameterTypes" : [ "javax.ws.rs.core.Form" ],
+ "returnType" : "javax.ws.rs.client.Entity<javax.ws.rs.core.Form>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "form",
+ "parameterTypes" : [ "javax.ws.rs.core.MultivaluedMap<java.lang.String, java.lang.String>" ],
+ "returnType" : "javax.ws.rs.client.Entity<javax.ws.rs.core.Form>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "html",
+ "parameterTypes" : [ "T" ],
+ "returnType" : "javax.ws.rs.client.Entity<T>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "json",
+ "parameterTypes" : [ "T" ],
+ "returnType" : "javax.ws.rs.client.Entity<T>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "text",
+ "parameterTypes" : [ "T" ],
+ "returnType" : "javax.ws.rs.client.Entity<T>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "xhtml",
+ "parameterTypes" : [ "T" ],
+ "returnType" : "javax.ws.rs.client.Entity<T>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "xml",
+ "parameterTypes" : [ "T" ],
+ "returnType" : "javax.ws.rs.client.Entity<T>"
+ } ],
+ "modifier" : 17,
+ "name" : "javax.ws.rs.client.Entity",
+ "superclass" : "java.lang.Object"
+ }, {
+ "_type" : "scout.ClassSignature",
+ "interfaces" : [ ],
+ "methods" : [ {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "invoke",
+ "parameterTypes" : [ "java.lang.Class<T>" ],
+ "returnType" : "T"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "invoke",
+ "parameterTypes" : [ "javax.ws.rs.core.GenericType<T>" ],
+ "returnType" : "T"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "submit",
+ "parameterTypes" : [ ],
+ "returnType" : "java.util.concurrent.Future<javax.ws.rs.core.Response>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "submit",
+ "parameterTypes" : [ "java.lang.Class<T>" ],
+ "returnType" : "java.util.concurrent.Future<T>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "submit",
+ "parameterTypes" : [ "javax.ws.rs.client.InvocationCallback<T>" ],
+ "returnType" : "java.util.concurrent.Future<T>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "submit",
+ "parameterTypes" : [ "javax.ws.rs.core.GenericType<T>" ],
+ "returnType" : "java.util.concurrent.Future<T>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "property",
+ "parameterTypes" : [ "java.lang.String", "java.lang.Object" ],
+ "returnType" : "javax.ws.rs.client.Invocation"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "invoke",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.core.Response"
+ } ],
+ "modifier" : 1537,
+ "name" : "javax.ws.rs.client.Invocation",
+ "superclass" : null
+ }, {
+ "_type" : "scout.ClassSignature",
+ "interfaces" : [ "javax.ws.rs.client.SyncInvoker" ],
+ "methods" : [ {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "async",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.client.AsyncInvoker"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "build",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.client.Invocation"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "build",
+ "parameterTypes" : [ "java.lang.String", "javax.ws.rs.client.Entity<?>" ],
+ "returnType" : "javax.ws.rs.client.Invocation"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "buildDelete",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.client.Invocation"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "buildGet",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.client.Invocation"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "buildPost",
+ "parameterTypes" : [ "javax.ws.rs.client.Entity<?>" ],
+ "returnType" : "javax.ws.rs.client.Invocation"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "buildPut",
+ "parameterTypes" : [ "javax.ws.rs.client.Entity<?>" ],
+ "returnType" : "javax.ws.rs.client.Invocation"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1153,
+ "name" : "accept",
+ "parameterTypes" : [ "java.lang.String[]" ],
+ "returnType" : "javax.ws.rs.client.Invocation$Builder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1153,
+ "name" : "accept",
+ "parameterTypes" : [ "javax.ws.rs.core.MediaType[]" ],
+ "returnType" : "javax.ws.rs.client.Invocation$Builder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1153,
+ "name" : "acceptEncoding",
+ "parameterTypes" : [ "java.lang.String[]" ],
+ "returnType" : "javax.ws.rs.client.Invocation$Builder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1153,
+ "name" : "acceptLanguage",
+ "parameterTypes" : [ "java.lang.String[]" ],
+ "returnType" : "javax.ws.rs.client.Invocation$Builder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1153,
+ "name" : "acceptLanguage",
+ "parameterTypes" : [ "java.util.Locale[]" ],
+ "returnType" : "javax.ws.rs.client.Invocation$Builder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "cacheControl",
+ "parameterTypes" : [ "javax.ws.rs.core.CacheControl" ],
+ "returnType" : "javax.ws.rs.client.Invocation$Builder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "cookie",
+ "parameterTypes" : [ "java.lang.String", "java.lang.String" ],
+ "returnType" : "javax.ws.rs.client.Invocation$Builder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "cookie",
+ "parameterTypes" : [ "javax.ws.rs.core.Cookie" ],
+ "returnType" : "javax.ws.rs.client.Invocation$Builder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "header",
+ "parameterTypes" : [ "java.lang.String", "java.lang.Object" ],
+ "returnType" : "javax.ws.rs.client.Invocation$Builder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "headers",
+ "parameterTypes" : [ "javax.ws.rs.core.MultivaluedMap<java.lang.String, java.lang.Object>" ],
+ "returnType" : "javax.ws.rs.client.Invocation$Builder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "property",
+ "parameterTypes" : [ "java.lang.String", "java.lang.Object" ],
+ "returnType" : "javax.ws.rs.client.Invocation$Builder"
+ } ],
+ "modifier" : 1545,
+ "name" : "javax.ws.rs.client.Invocation$Builder",
+ "superclass" : null
+ }, {
+ "_type" : "scout.ClassSignature",
+ "interfaces" : [ ],
+ "methods" : [ {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "completed",
+ "parameterTypes" : [ "RESPONSE" ],
+ "returnType" : "void"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "failed",
+ "parameterTypes" : [ "java.lang.Throwable" ],
+ "returnType" : "void"
+ } ],
+ "modifier" : 1537,
+ "name" : "javax.ws.rs.client.InvocationCallback",
+ "superclass" : null
+ }, {
+ "_type" : "scout.ClassSignature",
+ "interfaces" : [ ],
+ "methods" : [ {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "delete",
+ "parameterTypes" : [ "java.lang.Class<T>" ],
+ "returnType" : "T"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "delete",
+ "parameterTypes" : [ "javax.ws.rs.core.GenericType<T>" ],
+ "returnType" : "T"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "get",
+ "parameterTypes" : [ "java.lang.Class<T>" ],
+ "returnType" : "T"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "get",
+ "parameterTypes" : [ "javax.ws.rs.core.GenericType<T>" ],
+ "returnType" : "T"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "method",
+ "parameterTypes" : [ "java.lang.String", "java.lang.Class<T>" ],
+ "returnType" : "T"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "method",
+ "parameterTypes" : [ "java.lang.String", "javax.ws.rs.client.Entity<?>", "java.lang.Class<T>" ],
+ "returnType" : "T"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "method",
+ "parameterTypes" : [ "java.lang.String", "javax.ws.rs.client.Entity<?>", "javax.ws.rs.core.GenericType<T>" ],
+ "returnType" : "T"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "method",
+ "parameterTypes" : [ "java.lang.String", "javax.ws.rs.core.GenericType<T>" ],
+ "returnType" : "T"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "options",
+ "parameterTypes" : [ "java.lang.Class<T>" ],
+ "returnType" : "T"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "options",
+ "parameterTypes" : [ "javax.ws.rs.core.GenericType<T>" ],
+ "returnType" : "T"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "post",
+ "parameterTypes" : [ "javax.ws.rs.client.Entity<?>", "java.lang.Class<T>" ],
+ "returnType" : "T"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "post",
+ "parameterTypes" : [ "javax.ws.rs.client.Entity<?>", "javax.ws.rs.core.GenericType<T>" ],
+ "returnType" : "T"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "put",
+ "parameterTypes" : [ "javax.ws.rs.client.Entity<?>", "java.lang.Class<T>" ],
+ "returnType" : "T"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "put",
+ "parameterTypes" : [ "javax.ws.rs.client.Entity<?>", "javax.ws.rs.core.GenericType<T>" ],
+ "returnType" : "T"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "trace",
+ "parameterTypes" : [ "java.lang.Class<T>" ],
+ "returnType" : "T"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "trace",
+ "parameterTypes" : [ "javax.ws.rs.core.GenericType<T>" ],
+ "returnType" : "T"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "delete",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.core.Response"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "get",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.core.Response"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "head",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.core.Response"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "method",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.Response"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "method",
+ "parameterTypes" : [ "java.lang.String", "javax.ws.rs.client.Entity<?>" ],
+ "returnType" : "javax.ws.rs.core.Response"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "options",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.core.Response"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "post",
+ "parameterTypes" : [ "javax.ws.rs.client.Entity<?>" ],
+ "returnType" : "javax.ws.rs.core.Response"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "put",
+ "parameterTypes" : [ "javax.ws.rs.client.Entity<?>" ],
+ "returnType" : "javax.ws.rs.core.Response"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "trace",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.core.Response"
+ } ],
+ "modifier" : 1537,
+ "name" : "javax.ws.rs.client.SyncInvoker",
+ "superclass" : null
+ }, {
+ "_type" : "scout.ClassSignature",
+ "interfaces" : [ "javax.ws.rs.core.Configurable" ],
+ "methods" : [ {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getUri",
+ "parameterTypes" : [ ],
+ "returnType" : "java.net.URI"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "request",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.client.Invocation$Builder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1153,
+ "name" : "request",
+ "parameterTypes" : [ "java.lang.String[]" ],
+ "returnType" : "javax.ws.rs.client.Invocation$Builder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1153,
+ "name" : "request",
+ "parameterTypes" : [ "javax.ws.rs.core.MediaType[]" ],
+ "returnType" : "javax.ws.rs.client.Invocation$Builder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1153,
+ "name" : "matrixParam",
+ "parameterTypes" : [ "java.lang.String", "java.lang.Object[]" ],
+ "returnType" : "javax.ws.rs.client.WebTarget"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "path",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.client.WebTarget"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1153,
+ "name" : "queryParam",
+ "parameterTypes" : [ "java.lang.String", "java.lang.Object[]" ],
+ "returnType" : "javax.ws.rs.client.WebTarget"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "resolveTemplate",
+ "parameterTypes" : [ "java.lang.String", "java.lang.Object" ],
+ "returnType" : "javax.ws.rs.client.WebTarget"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "resolveTemplate",
+ "parameterTypes" : [ "java.lang.String", "java.lang.Object", "boolean" ],
+ "returnType" : "javax.ws.rs.client.WebTarget"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "resolveTemplateFromEncoded",
+ "parameterTypes" : [ "java.lang.String", "java.lang.Object" ],
+ "returnType" : "javax.ws.rs.client.WebTarget"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "resolveTemplates",
+ "parameterTypes" : [ "java.util.Map<java.lang.String, java.lang.Object>" ],
+ "returnType" : "javax.ws.rs.client.WebTarget"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "resolveTemplates",
+ "parameterTypes" : [ "java.util.Map<java.lang.String, java.lang.Object>", "boolean" ],
+ "returnType" : "javax.ws.rs.client.WebTarget"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "resolveTemplatesFromEncoded",
+ "parameterTypes" : [ "java.util.Map<java.lang.String, java.lang.Object>" ],
+ "returnType" : "javax.ws.rs.client.WebTarget"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getUriBuilder",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ } ],
+ "modifier" : 1537,
+ "name" : "javax.ws.rs.client.WebTarget",
+ "superclass" : null
+ }, {
+ "_type" : "scout.ClassSignature",
+ "interfaces" : [ ],
+ "methods" : [ {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 10,
+ "name" : "notEqual",
+ "parameterTypes" : [ "java.util.Collection<?>", "java.util.Collection<?>" ],
+ "returnType" : "boolean"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 10,
+ "name" : "notEqual",
+ "parameterTypes" : [ "java.util.Map<?, ?>", "java.util.Map<?, ?>" ],
+ "returnType" : "boolean"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 10,
+ "name" : "hashCodeOf",
+ "parameterTypes" : [ "java.util.Collection<?>" ],
+ "returnType" : "int"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 10,
+ "name" : "hashCodeOf",
+ "parameterTypes" : [ "java.util.Map<?, ?>" ],
+ "returnType" : "int"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "equals",
+ "parameterTypes" : [ "java.lang.Object" ],
+ "returnType" : "boolean"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "isMustRevalidate",
+ "parameterTypes" : [ ],
+ "returnType" : "boolean"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "isNoCache",
+ "parameterTypes" : [ ],
+ "returnType" : "boolean"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "isNoStore",
+ "parameterTypes" : [ ],
+ "returnType" : "boolean"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "isNoTransform",
+ "parameterTypes" : [ ],
+ "returnType" : "boolean"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "isPrivate",
+ "parameterTypes" : [ ],
+ "returnType" : "boolean"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "isProxyRevalidate",
+ "parameterTypes" : [ ],
+ "returnType" : "boolean"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "getMaxAge",
+ "parameterTypes" : [ ],
+ "returnType" : "int"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "getSMaxAge",
+ "parameterTypes" : [ ],
+ "returnType" : "int"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "hashCode",
+ "parameterTypes" : [ ],
+ "returnType" : "int"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "toString",
+ "parameterTypes" : [ ],
+ "returnType" : "java.lang.String"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "getNoCacheFields",
+ "parameterTypes" : [ ],
+ "returnType" : "java.util.List<java.lang.String>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "getPrivateFields",
+ "parameterTypes" : [ ],
+ "returnType" : "java.util.List<java.lang.String>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "getCacheExtension",
+ "parameterTypes" : [ ],
+ "returnType" : "java.util.Map<java.lang.String, java.lang.String>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "valueOf",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.CacheControl"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "setMaxAge",
+ "parameterTypes" : [ "int" ],
+ "returnType" : "void"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "setMustRevalidate",
+ "parameterTypes" : [ "boolean" ],
+ "returnType" : "void"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "setNoCache",
+ "parameterTypes" : [ "boolean" ],
+ "returnType" : "void"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "setNoStore",
+ "parameterTypes" : [ "boolean" ],
+ "returnType" : "void"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "setNoTransform",
+ "parameterTypes" : [ "boolean" ],
+ "returnType" : "void"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "setPrivate",
+ "parameterTypes" : [ "boolean" ],
+ "returnType" : "void"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "setProxyRevalidate",
+ "parameterTypes" : [ "boolean" ],
+ "returnType" : "void"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "setSMaxAge",
+ "parameterTypes" : [ "int" ],
+ "returnType" : "void"
+ } ],
+ "modifier" : 1,
+ "name" : "javax.ws.rs.core.CacheControl",
+ "superclass" : "java.lang.Object"
+ }, {
+ "_type" : "scout.ClassSignature",
+ "interfaces" : [ ],
+ "methods" : [ {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "property",
+ "parameterTypes" : [ "java.lang.String", "java.lang.Object" ],
+ "returnType" : "C"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "register",
+ "parameterTypes" : [ "java.lang.Class<?>" ],
+ "returnType" : "C"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "register",
+ "parameterTypes" : [ "java.lang.Class<?>", "int" ],
+ "returnType" : "C"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1153,
+ "name" : "register",
+ "parameterTypes" : [ "java.lang.Class<?>", "java.lang.Class<?>[]" ],
+ "returnType" : "C"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "register",
+ "parameterTypes" : [ "java.lang.Class<?>", "java.util.Map<java.lang.Class<?>, java.lang.Integer>" ],
+ "returnType" : "C"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "register",
+ "parameterTypes" : [ "java.lang.Object" ],
+ "returnType" : "C"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "register",
+ "parameterTypes" : [ "java.lang.Object", "int" ],
+ "returnType" : "C"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1153,
+ "name" : "register",
+ "parameterTypes" : [ "java.lang.Object", "java.lang.Class<?>[]" ],
+ "returnType" : "C"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "register",
+ "parameterTypes" : [ "java.lang.Object", "java.util.Map<java.lang.Class<?>, java.lang.Integer>" ],
+ "returnType" : "C"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getConfiguration",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.core.Configuration"
+ } ],
+ "modifier" : 1537,
+ "name" : "javax.ws.rs.core.Configurable",
+ "superclass" : null
+ }, {
+ "_type" : "scout.ClassSignature",
+ "interfaces" : [ ],
+ "methods" : [ {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "isEnabled",
+ "parameterTypes" : [ "java.lang.Class<? extends javax.ws.rs.core.Feature>" ],
+ "returnType" : "boolean"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "isEnabled",
+ "parameterTypes" : [ "javax.ws.rs.core.Feature" ],
+ "returnType" : "boolean"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "isRegistered",
+ "parameterTypes" : [ "java.lang.Class<?>" ],
+ "returnType" : "boolean"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "isRegistered",
+ "parameterTypes" : [ "java.lang.Object" ],
+ "returnType" : "boolean"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getProperty",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "java.lang.Object"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getPropertyNames",
+ "parameterTypes" : [ ],
+ "returnType" : "java.util.Collection<java.lang.String>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getContracts",
+ "parameterTypes" : [ "java.lang.Class<?>" ],
+ "returnType" : "java.util.Map<java.lang.Class<?>, java.lang.Integer>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getProperties",
+ "parameterTypes" : [ ],
+ "returnType" : "java.util.Map<java.lang.String, java.lang.Object>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getClasses",
+ "parameterTypes" : [ ],
+ "returnType" : "java.util.Set<java.lang.Class<?>>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getInstances",
+ "parameterTypes" : [ ],
+ "returnType" : "java.util.Set<java.lang.Object>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getRuntimeType",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.RuntimeType"
+ } ],
+ "modifier" : 1537,
+ "name" : "javax.ws.rs.core.Configuration",
+ "superclass" : null
+ }, {
+ "_type" : "scout.ClassSignature",
+ "interfaces" : [ ],
+ "methods" : [ {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "equals",
+ "parameterTypes" : [ "java.lang.Object" ],
+ "returnType" : "boolean"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "getVersion",
+ "parameterTypes" : [ ],
+ "returnType" : "int"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "hashCode",
+ "parameterTypes" : [ ],
+ "returnType" : "int"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "getDomain",
+ "parameterTypes" : [ ],
+ "returnType" : "java.lang.String"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "getName",
+ "parameterTypes" : [ ],
+ "returnType" : "java.lang.String"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "getPath",
+ "parameterTypes" : [ ],
+ "returnType" : "java.lang.String"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "getValue",
+ "parameterTypes" : [ ],
+ "returnType" : "java.lang.String"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "toString",
+ "parameterTypes" : [ ],
+ "returnType" : "java.lang.String"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "valueOf",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.Cookie"
+ } ],
+ "modifier" : 1,
+ "name" : "javax.ws.rs.core.Cookie",
+ "superclass" : "java.lang.Object"
+ }, {
+ "_type" : "scout.ClassSignature",
+ "interfaces" : [ ],
+ "methods" : [ {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "equals",
+ "parameterTypes" : [ "java.lang.Object" ],
+ "returnType" : "boolean"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "isWeak",
+ "parameterTypes" : [ ],
+ "returnType" : "boolean"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "hashCode",
+ "parameterTypes" : [ ],
+ "returnType" : "int"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "getValue",
+ "parameterTypes" : [ ],
+ "returnType" : "java.lang.String"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "toString",
+ "parameterTypes" : [ ],
+ "returnType" : "java.lang.String"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "valueOf",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.EntityTag"
+ } ],
+ "modifier" : 1,
+ "name" : "javax.ws.rs.core.EntityTag",
+ "superclass" : "java.lang.Object"
+ }, {
+ "_type" : "scout.ClassSignature",
+ "interfaces" : [ ],
+ "methods" : [ {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "configure",
+ "parameterTypes" : [ "javax.ws.rs.core.FeatureContext" ],
+ "returnType" : "boolean"
+ } ],
+ "modifier" : 1537,
+ "name" : "javax.ws.rs.core.Feature",
+ "superclass" : null
+ }, {
+ "_type" : "scout.ClassSignature",
+ "interfaces" : [ "javax.ws.rs.core.Configurable" ],
+ "methods" : [ ],
+ "modifier" : 1537,
+ "name" : "javax.ws.rs.core.FeatureContext",
+ "superclass" : null
+ }, {
+ "_type" : "scout.ClassSignature",
+ "interfaces" : [ ],
+ "methods" : [ {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "param",
+ "parameterTypes" : [ "java.lang.String", "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.Form"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "asMap",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.core.MultivaluedMap<java.lang.String, java.lang.String>"
+ } ],
+ "modifier" : 1,
+ "name" : "javax.ws.rs.core.Form",
+ "superclass" : "java.lang.Object"
+ }, {
+ "_type" : "scout.ClassSignature",
+ "interfaces" : [ ],
+ "methods" : [ {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 10,
+ "name" : "getArrayClass",
+ "parameterTypes" : [ "java.lang.Class" ],
+ "returnType" : "java.lang.Class"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 10,
+ "name" : "getClass",
+ "parameterTypes" : [ "java.lang.reflect.Type" ],
+ "returnType" : "java.lang.Class"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "equals",
+ "parameterTypes" : [ "java.lang.Object" ],
+ "returnType" : "boolean"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 17,
+ "name" : "getRawType",
+ "parameterTypes" : [ ],
+ "returnType" : "java.lang.Class<?>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 17,
+ "name" : "getType",
+ "parameterTypes" : [ ],
+ "returnType" : "java.lang.reflect.Type"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "hashCode",
+ "parameterTypes" : [ ],
+ "returnType" : "int"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "toString",
+ "parameterTypes" : [ ],
+ "returnType" : "java.lang.String"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 8,
+ "name" : "getTypeArgument",
+ "parameterTypes" : [ "java.lang.Class<?>", "java.lang.Class<?>" ],
+ "returnType" : "java.lang.reflect.Type"
+ } ],
+ "modifier" : 1,
+ "name" : "javax.ws.rs.core.GenericType",
+ "superclass" : "java.lang.Object"
+ }, {
+ "_type" : "scout.ClassSignature",
+ "interfaces" : [ ],
+ "methods" : [ {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getRel",
+ "parameterTypes" : [ ],
+ "returnType" : "java.lang.String"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getTitle",
+ "parameterTypes" : [ ],
+ "returnType" : "java.lang.String"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getType",
+ "parameterTypes" : [ ],
+ "returnType" : "java.lang.String"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "toString",
+ "parameterTypes" : [ ],
+ "returnType" : "java.lang.String"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getUri",
+ "parameterTypes" : [ ],
+ "returnType" : "java.net.URI"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getRels",
+ "parameterTypes" : [ ],
+ "returnType" : "java.util.List<java.lang.String>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getParams",
+ "parameterTypes" : [ ],
+ "returnType" : "java.util.Map<java.lang.String, java.lang.String>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getUriBuilder",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "valueOf",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.Link"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "fromLink",
+ "parameterTypes" : [ "javax.ws.rs.core.Link" ],
+ "returnType" : "javax.ws.rs.core.Link$Builder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "fromMethod",
+ "parameterTypes" : [ "java.lang.Class<?>", "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.Link$Builder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "fromPath",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.Link$Builder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "fromResource",
+ "parameterTypes" : [ "java.lang.Class<?>" ],
+ "returnType" : "javax.ws.rs.core.Link$Builder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "fromUri",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.Link$Builder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "fromUri",
+ "parameterTypes" : [ "java.net.URI" ],
+ "returnType" : "javax.ws.rs.core.Link$Builder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "fromUriBuilder",
+ "parameterTypes" : [ "javax.ws.rs.core.UriBuilder" ],
+ "returnType" : "javax.ws.rs.core.Link$Builder"
+ } ],
+ "modifier" : 1025,
+ "name" : "javax.ws.rs.core.Link",
+ "superclass" : "java.lang.Object"
+ }, {
+ "_type" : "scout.ClassSignature",
+ "interfaces" : [ ],
+ "methods" : [ {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1153,
+ "name" : "build",
+ "parameterTypes" : [ "java.lang.Object[]" ],
+ "returnType" : "javax.ws.rs.core.Link"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1153,
+ "name" : "buildRelativized",
+ "parameterTypes" : [ "java.net.URI", "java.lang.Object[]" ],
+ "returnType" : "javax.ws.rs.core.Link"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "baseUri",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.Link$Builder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "baseUri",
+ "parameterTypes" : [ "java.net.URI" ],
+ "returnType" : "javax.ws.rs.core.Link$Builder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "link",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.Link$Builder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "link",
+ "parameterTypes" : [ "javax.ws.rs.core.Link" ],
+ "returnType" : "javax.ws.rs.core.Link$Builder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "param",
+ "parameterTypes" : [ "java.lang.String", "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.Link$Builder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "rel",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.Link$Builder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "title",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.Link$Builder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "type",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.Link$Builder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "uri",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.Link$Builder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "uri",
+ "parameterTypes" : [ "java.net.URI" ],
+ "returnType" : "javax.ws.rs.core.Link$Builder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "uriBuilder",
+ "parameterTypes" : [ "javax.ws.rs.core.UriBuilder" ],
+ "returnType" : "javax.ws.rs.core.Link$Builder"
+ } ],
+ "modifier" : 1545,
+ "name" : "javax.ws.rs.core.Link$Builder",
+ "superclass" : null
+ }, {
+ "_type" : "scout.ClassSignature",
+ "interfaces" : [ ],
+ "methods" : [ {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 10,
+ "name" : "createParametersMap",
+ "parameterTypes" : [ "java.util.Map<java.lang.String, java.lang.String>" ],
+ "returnType" : "java.util.TreeMap<java.lang.String, java.lang.String>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "equals",
+ "parameterTypes" : [ "java.lang.Object" ],
+ "returnType" : "boolean"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "isCompatible",
+ "parameterTypes" : [ "javax.ws.rs.core.MediaType" ],
+ "returnType" : "boolean"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "isWildcardSubtype",
+ "parameterTypes" : [ ],
+ "returnType" : "boolean"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "isWildcardType",
+ "parameterTypes" : [ ],
+ "returnType" : "boolean"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "hashCode",
+ "parameterTypes" : [ ],
+ "returnType" : "int"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "getSubtype",
+ "parameterTypes" : [ ],
+ "returnType" : "java.lang.String"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "getType",
+ "parameterTypes" : [ ],
+ "returnType" : "java.lang.String"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "toString",
+ "parameterTypes" : [ ],
+ "returnType" : "java.lang.String"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "getParameters",
+ "parameterTypes" : [ ],
+ "returnType" : "java.util.Map<java.lang.String, java.lang.String>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "withCharset",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.MediaType"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "valueOf",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.MediaType"
+ } ],
+ "modifier" : 1,
+ "name" : "javax.ws.rs.core.MediaType",
+ "superclass" : "java.lang.Object"
+ }, {
+ "_type" : "scout.ClassSignature",
+ "interfaces" : [ "java.util.Map" ],
+ "methods" : [ {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "equalsIgnoreValueOrder",
+ "parameterTypes" : [ "javax.ws.rs.core.MultivaluedMap<K, V>" ],
+ "returnType" : "boolean"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getFirst",
+ "parameterTypes" : [ "K" ],
+ "returnType" : "V"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "add",
+ "parameterTypes" : [ "K", "V" ],
+ "returnType" : "void"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1153,
+ "name" : "addAll",
+ "parameterTypes" : [ "K", "V[]" ],
+ "returnType" : "void"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "addAll",
+ "parameterTypes" : [ "K", "java.util.List<V>" ],
+ "returnType" : "void"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "addFirst",
+ "parameterTypes" : [ "K", "V" ],
+ "returnType" : "void"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "putSingle",
+ "parameterTypes" : [ "K", "V" ],
+ "returnType" : "void"
+ } ],
+ "modifier" : 1537,
+ "name" : "javax.ws.rs.core.MultivaluedMap",
+ "superclass" : null
+ }, {
+ "_type" : "scout.ClassSignature",
+ "interfaces" : [ ],
+ "methods" : [ {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "bufferEntity",
+ "parameterTypes" : [ ],
+ "returnType" : "boolean"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "hasEntity",
+ "parameterTypes" : [ ],
+ "returnType" : "boolean"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "hasLink",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "boolean"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getLength",
+ "parameterTypes" : [ ],
+ "returnType" : "int"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getStatus",
+ "parameterTypes" : [ ],
+ "returnType" : "int"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getEntity",
+ "parameterTypes" : [ ],
+ "returnType" : "java.lang.Object"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "readEntity",
+ "parameterTypes" : [ "java.lang.Class<T>" ],
+ "returnType" : "T"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "readEntity",
+ "parameterTypes" : [ "java.lang.Class<T>", "java.lang.annotation.Annotation[]" ],
+ "returnType" : "T"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "readEntity",
+ "parameterTypes" : [ "javax.ws.rs.core.GenericType<T>" ],
+ "returnType" : "T"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "readEntity",
+ "parameterTypes" : [ "javax.ws.rs.core.GenericType<T>", "java.lang.annotation.Annotation[]" ],
+ "returnType" : "T"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getHeaderString",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "java.lang.String"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getLocation",
+ "parameterTypes" : [ ],
+ "returnType" : "java.net.URI"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getDate",
+ "parameterTypes" : [ ],
+ "returnType" : "java.util.Date"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getLastModified",
+ "parameterTypes" : [ ],
+ "returnType" : "java.util.Date"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getLanguage",
+ "parameterTypes" : [ ],
+ "returnType" : "java.util.Locale"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getCookies",
+ "parameterTypes" : [ ],
+ "returnType" : "java.util.Map<java.lang.String, javax.ws.rs.core.NewCookie>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getAllowedMethods",
+ "parameterTypes" : [ ],
+ "returnType" : "java.util.Set<java.lang.String>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getLinks",
+ "parameterTypes" : [ ],
+ "returnType" : "java.util.Set<javax.ws.rs.core.Link>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getEntityTag",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.core.EntityTag"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getLink",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.Link"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getLinkBuilder",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.Link$Builder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getMediaType",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.core.MediaType"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getMetadata",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.core.MultivaluedMap<java.lang.String, java.lang.Object>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getStringHeaders",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.core.MultivaluedMap<java.lang.String, java.lang.String>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getStatusInfo",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.core.Response$StatusType"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "close",
+ "parameterTypes" : [ ],
+ "returnType" : "void"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "getHeaders",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.core.MultivaluedMap<java.lang.String, java.lang.Object>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "accepted",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "accepted",
+ "parameterTypes" : [ "java.lang.Object" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "created",
+ "parameterTypes" : [ "java.net.URI" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "fromResponse",
+ "parameterTypes" : [ "javax.ws.rs.core.Response" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "noContent",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "notAcceptable",
+ "parameterTypes" : [ "java.util.List<javax.ws.rs.core.Variant>" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "notModified",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "notModified",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "notModified",
+ "parameterTypes" : [ "javax.ws.rs.core.EntityTag" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "ok",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "ok",
+ "parameterTypes" : [ "java.lang.Object" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "ok",
+ "parameterTypes" : [ "java.lang.Object", "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "ok",
+ "parameterTypes" : [ "java.lang.Object", "javax.ws.rs.core.MediaType" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "ok",
+ "parameterTypes" : [ "java.lang.Object", "javax.ws.rs.core.Variant" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "seeOther",
+ "parameterTypes" : [ "java.net.URI" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "serverError",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "status",
+ "parameterTypes" : [ "int" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "status",
+ "parameterTypes" : [ "javax.ws.rs.core.Response$Status" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "status",
+ "parameterTypes" : [ "javax.ws.rs.core.Response$StatusType" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "temporaryRedirect",
+ "parameterTypes" : [ "java.net.URI" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ } ],
+ "modifier" : 1025,
+ "name" : "javax.ws.rs.core.Response",
+ "superclass" : "java.lang.Object"
+ }, {
+ "_type" : "scout.ClassSignature",
+ "interfaces" : [ ],
+ "methods" : [ {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 12,
+ "name" : "newInstance",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "build",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.core.Response"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1153,
+ "name" : "allow",
+ "parameterTypes" : [ "java.lang.String[]" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "allow",
+ "parameterTypes" : [ "java.util.Set<java.lang.String>" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "cacheControl",
+ "parameterTypes" : [ "javax.ws.rs.core.CacheControl" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "clone",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "contentLocation",
+ "parameterTypes" : [ "java.net.URI" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1153,
+ "name" : "cookie",
+ "parameterTypes" : [ "javax.ws.rs.core.NewCookie[]" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "encoding",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "entity",
+ "parameterTypes" : [ "java.lang.Object" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "entity",
+ "parameterTypes" : [ "java.lang.Object", "java.lang.annotation.Annotation[]" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "expires",
+ "parameterTypes" : [ "java.util.Date" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "header",
+ "parameterTypes" : [ "java.lang.String", "java.lang.Object" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "language",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "language",
+ "parameterTypes" : [ "java.util.Locale" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "lastModified",
+ "parameterTypes" : [ "java.util.Date" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "link",
+ "parameterTypes" : [ "java.lang.String", "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "link",
+ "parameterTypes" : [ "java.net.URI", "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1153,
+ "name" : "links",
+ "parameterTypes" : [ "javax.ws.rs.core.Link[]" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "location",
+ "parameterTypes" : [ "java.net.URI" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "replaceAll",
+ "parameterTypes" : [ "javax.ws.rs.core.MultivaluedMap<java.lang.String, java.lang.Object>" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "status",
+ "parameterTypes" : [ "int" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "tag",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "tag",
+ "parameterTypes" : [ "javax.ws.rs.core.EntityTag" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "type",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "type",
+ "parameterTypes" : [ "javax.ws.rs.core.MediaType" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "variant",
+ "parameterTypes" : [ "javax.ws.rs.core.Variant" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "variants",
+ "parameterTypes" : [ "java.util.List<javax.ws.rs.core.Variant>" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1153,
+ "name" : "variants",
+ "parameterTypes" : [ "javax.ws.rs.core.Variant[]" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 4161,
+ "name" : "clone",
+ "parameterTypes" : [ ],
+ "returnType" : "java.lang.Object"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "status",
+ "parameterTypes" : [ "javax.ws.rs.core.Response$Status" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "status",
+ "parameterTypes" : [ "javax.ws.rs.core.Response$StatusType" ],
+ "returnType" : "javax.ws.rs.core.Response$ResponseBuilder"
+ } ],
+ "modifier" : 1033,
+ "name" : "javax.ws.rs.core.Response$ResponseBuilder",
+ "superclass" : "java.lang.Object"
+ }, {
+ "_type" : "scout.ClassSignature",
+ "interfaces" : [ "javax.ws.rs.core.Response$StatusType" ],
+ "methods" : [ {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "getStatusCode",
+ "parameterTypes" : [ ],
+ "returnType" : "int"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "getReasonPhrase",
+ "parameterTypes" : [ ],
+ "returnType" : "java.lang.String"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "toString",
+ "parameterTypes" : [ ],
+ "returnType" : "java.lang.String"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "getFamily",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.core.Response$Status$Family"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "fromStatusCode",
+ "parameterTypes" : [ "int" ],
+ "returnType" : "javax.ws.rs.core.Response$Status"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "valueOf",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.Response$Status"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "values",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.core.Response$Status[]"
+ } ],
+ "modifier" : 16409,
+ "name" : "javax.ws.rs.core.Response$Status",
+ "superclass" : "java.lang.Enum"
+ }, {
+ "_type" : "scout.ClassSignature",
+ "interfaces" : [ ],
+ "methods" : [ {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "familyOf",
+ "parameterTypes" : [ "int" ],
+ "returnType" : "javax.ws.rs.core.Response$Status$Family"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "valueOf",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.Response$Status$Family"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "values",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.core.Response$Status$Family[]"
+ } ],
+ "modifier" : 16409,
+ "name" : "javax.ws.rs.core.Response$Status$Family",
+ "superclass" : "java.lang.Enum"
+ }, {
+ "_type" : "scout.ClassSignature",
+ "interfaces" : [ ],
+ "methods" : [ {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getStatusCode",
+ "parameterTypes" : [ ],
+ "returnType" : "int"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getReasonPhrase",
+ "parameterTypes" : [ ],
+ "returnType" : "java.lang.String"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "getFamily",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.core.Response$Status$Family"
+ } ],
+ "modifier" : 1545,
+ "name" : "javax.ws.rs.core.Response$StatusType",
+ "superclass" : null
+ }, {
+ "_type" : "scout.ClassSignature",
+ "interfaces" : [ ],
+ "methods" : [ {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 12,
+ "name" : "newInstance",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "toTemplate",
+ "parameterTypes" : [ ],
+ "returnType" : "java.lang.String"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1153,
+ "name" : "build",
+ "parameterTypes" : [ "java.lang.Object[]" ],
+ "returnType" : "java.net.URI"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "build",
+ "parameterTypes" : [ "java.lang.Object[]", "boolean" ],
+ "returnType" : "java.net.URI"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1153,
+ "name" : "buildFromEncoded",
+ "parameterTypes" : [ "java.lang.Object[]" ],
+ "returnType" : "java.net.URI"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "buildFromEncodedMap",
+ "parameterTypes" : [ "java.util.Map<java.lang.String, ?>" ],
+ "returnType" : "java.net.URI"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "buildFromMap",
+ "parameterTypes" : [ "java.util.Map<java.lang.String, ?>" ],
+ "returnType" : "java.net.URI"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "buildFromMap",
+ "parameterTypes" : [ "java.util.Map<java.lang.String, ?>", "boolean" ],
+ "returnType" : "java.net.URI"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "clone",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "fragment",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "host",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1153,
+ "name" : "matrixParam",
+ "parameterTypes" : [ "java.lang.String", "java.lang.Object[]" ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "path",
+ "parameterTypes" : [ "java.lang.Class" ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "path",
+ "parameterTypes" : [ "java.lang.Class", "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "path",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "path",
+ "parameterTypes" : [ "java.lang.reflect.Method" ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "port",
+ "parameterTypes" : [ "int" ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1153,
+ "name" : "queryParam",
+ "parameterTypes" : [ "java.lang.String", "java.lang.Object[]" ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "replaceMatrix",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1153,
+ "name" : "replaceMatrixParam",
+ "parameterTypes" : [ "java.lang.String", "java.lang.Object[]" ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "replacePath",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "replaceQuery",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1153,
+ "name" : "replaceQueryParam",
+ "parameterTypes" : [ "java.lang.String", "java.lang.Object[]" ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "resolveTemplate",
+ "parameterTypes" : [ "java.lang.String", "java.lang.Object" ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "resolveTemplate",
+ "parameterTypes" : [ "java.lang.String", "java.lang.Object", "boolean" ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "resolveTemplateFromEncoded",
+ "parameterTypes" : [ "java.lang.String", "java.lang.Object" ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "resolveTemplates",
+ "parameterTypes" : [ "java.util.Map<java.lang.String, java.lang.Object>" ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "resolveTemplates",
+ "parameterTypes" : [ "java.util.Map<java.lang.String, java.lang.Object>", "boolean" ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "resolveTemplatesFromEncoded",
+ "parameterTypes" : [ "java.util.Map<java.lang.String, java.lang.Object>" ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "scheme",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "schemeSpecificPart",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1153,
+ "name" : "segment",
+ "parameterTypes" : [ "java.lang.String[]" ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "uri",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "uri",
+ "parameterTypes" : [ "java.net.URI" ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "userInfo",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 4161,
+ "name" : "clone",
+ "parameterTypes" : [ ],
+ "returnType" : "java.lang.Object"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "fromLink",
+ "parameterTypes" : [ "javax.ws.rs.core.Link" ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "fromMethod",
+ "parameterTypes" : [ "java.lang.Class<?>", "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "fromPath",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "fromResource",
+ "parameterTypes" : [ "java.lang.Class<?>" ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "fromUri",
+ "parameterTypes" : [ "java.lang.String" ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "fromUri",
+ "parameterTypes" : [ "java.net.URI" ],
+ "returnType" : "javax.ws.rs.core.UriBuilder"
+ } ],
+ "modifier" : 1025,
+ "name" : "javax.ws.rs.core.UriBuilder",
+ "superclass" : "java.lang.Object"
+ }, {
+ "_type" : "scout.ClassSignature",
+ "interfaces" : [ ],
+ "methods" : [ {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "equals",
+ "parameterTypes" : [ "java.lang.Object" ],
+ "returnType" : "boolean"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "hashCode",
+ "parameterTypes" : [ ],
+ "returnType" : "int"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "getEncoding",
+ "parameterTypes" : [ ],
+ "returnType" : "java.lang.String"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "getLanguageString",
+ "parameterTypes" : [ ],
+ "returnType" : "java.lang.String"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "toString",
+ "parameterTypes" : [ ],
+ "returnType" : "java.lang.String"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "getLanguage",
+ "parameterTypes" : [ ],
+ "returnType" : "java.util.Locale"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1,
+ "name" : "getMediaType",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.core.MediaType"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 137,
+ "name" : "encodings",
+ "parameterTypes" : [ "java.lang.String[]" ],
+ "returnType" : "javax.ws.rs.core.Variant$VariantListBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 137,
+ "name" : "languages",
+ "parameterTypes" : [ "java.util.Locale[]" ],
+ "returnType" : "javax.ws.rs.core.Variant$VariantListBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 137,
+ "name" : "mediaTypes",
+ "parameterTypes" : [ "javax.ws.rs.core.MediaType[]" ],
+ "returnType" : "javax.ws.rs.core.Variant$VariantListBuilder"
+ } ],
+ "modifier" : 1,
+ "name" : "javax.ws.rs.core.Variant",
+ "superclass" : "java.lang.Object"
+ }, {
+ "_type" : "scout.ClassSignature",
+ "interfaces" : [ ],
+ "methods" : [ {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "build",
+ "parameterTypes" : [ ],
+ "returnType" : "java.util.List<javax.ws.rs.core.Variant>"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1025,
+ "name" : "add",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.core.Variant$VariantListBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1153,
+ "name" : "encodings",
+ "parameterTypes" : [ "java.lang.String[]" ],
+ "returnType" : "javax.ws.rs.core.Variant$VariantListBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1153,
+ "name" : "languages",
+ "parameterTypes" : [ "java.util.Locale[]" ],
+ "returnType" : "javax.ws.rs.core.Variant$VariantListBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 1153,
+ "name" : "mediaTypes",
+ "parameterTypes" : [ "javax.ws.rs.core.MediaType[]" ],
+ "returnType" : "javax.ws.rs.core.Variant$VariantListBuilder"
+ }, {
+ "_type" : "scout.MethodSignature",
+ "modifiers" : 9,
+ "name" : "newInstance",
+ "parameterTypes" : [ ],
+ "returnType" : "javax.ws.rs.core.Variant$VariantListBuilder"
+ } ],
+ "modifier" : 1033,
+ "name" : "javax.ws.rs.core.Variant$VariantListBuilder",
+ "superclass" : "java.lang.Object"
+ } ]
+}
diff --git a/org.eclipse.scout.rt.rest/pom.xml b/org.eclipse.scout.rt.rest/pom.xml
index 78a615a943..5eec418248 100644
--- a/org.eclipse.scout.rt.rest/pom.xml
+++ b/org.eclipse.scout.rt.rest/pom.xml
@@ -36,18 +36,9 @@
<artifactId>javax.ws.rs-api</artifactId>
</dependency>
- <!-- JAX-RS Jersey Client Apache Connector -->
- <!-- FIXME 8.0 pbz: Temporary workaround, see Jersey Issue 3771: https://github.com/jersey/jersey/pull/3771 -->
- <dependency>
- <groupId>org.glassfish.jersey.connectors</groupId>
- <artifactId>jersey-apache-connector</artifactId>
- <optional>true</optional>
- <exclusions>
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </exclusion>
- </exclusions>
+ <dependency>
+ <groupId>javax.annotation</groupId>
+ <artifactId>javax.annotation-api</artifactId>
</dependency>
</dependencies>
</project>
diff --git a/org.eclipse.scout.rt.rest/src/main/java/org/eclipse/scout/rt/rest/client/AbstractRestClientHelper.java b/org.eclipse.scout.rt.rest/src/main/java/org/eclipse/scout/rt/rest/client/AbstractRestClientHelper.java
index 12b5e9a694..63158a1083 100644
--- a/org.eclipse.scout.rt.rest/src/main/java/org/eclipse/scout/rt/rest/client/AbstractRestClientHelper.java
+++ b/org.eclipse.scout.rt.rest/src/main/java/org/eclipse/scout/rt/rest/client/AbstractRestClientHelper.java
@@ -15,31 +15,28 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.function.Supplier;
+import javax.ws.rs.WebApplicationException;
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.Entity;
+import javax.ws.rs.client.Invocation;
import javax.ws.rs.client.WebTarget;
-import javax.ws.rs.core.Configurable;
+import javax.ws.rs.core.Configuration;
import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.StatusType;
import javax.ws.rs.ext.ContextResolver;
import org.eclipse.scout.rt.platform.BEANS;
import org.eclipse.scout.rt.platform.IBean;
-import org.eclipse.scout.rt.platform.exception.PlatformException;
-import org.eclipse.scout.rt.platform.exception.ProcessingException;
-import org.eclipse.scout.rt.platform.exception.VetoException;
import org.eclipse.scout.rt.platform.util.UriBuilder;
-import org.eclipse.scout.rt.rest.error.ErrorDo;
-import org.eclipse.scout.rt.rest.error.ErrorResponse;
-import org.glassfish.jersey.apache.connector.ApacheConnectorProvider;
-import org.glassfish.jersey.client.ClientConfig;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.eclipse.scout.rt.rest.client.proxy.IRestClientExceptionTransformer;
+import org.eclipse.scout.rt.rest.client.proxy.RestClientProxyFactory;
/**
* Abstract implementation of a REST client helper dealing with REST requests to a API server.
* <p>
+ * {@link Client} and its derived objects are proxied to provide cancellation and exception transformation support (see
+ * {@link #transformException(RuntimeException, Response)}).
+ * <p>
* This class may be reused for subsequent REST requests to the same API server.
* <p>
* Subclasses may bind this generic REST client helper to a concrete REST endpoint by implementing the
@@ -47,8 +44,6 @@ import org.slf4j.LoggerFactory;
*/
public abstract class AbstractRestClientHelper implements IRestClientHelper {
- private static final Logger LOG = LoggerFactory.getLogger(AbstractRestClientHelper.class);
-
private final Supplier<Client> m_clientSupplier = createClientSupplier();
/**
@@ -60,26 +55,36 @@ public abstract class AbstractRestClientHelper implements IRestClientHelper {
return () -> client;
}
- protected Client createClient() {
- // Prepare client config
- // IMPORTANT: This must happen _before_ calling initClientBuilder() because "withConfig()" replaces the entire configuration!
- ClientConfig clientConfig = new ClientConfig();
- // TODO [8.0] pbz: Temporary workaround, this code line and the direct dependency to the Apache connector will be removed as soon as the jersey issue is resolved.
- // See Jersey Issue 3771: https://github.com/jersey/jersey/pull/3771 (see also TO DO in pom.xml)
- clientConfig.connectorProvider(new ApacheConnectorProvider());
- initClientConfig(clientConfig);
+ /**
+ * @return the unproxied {@link Client}.
+ */
+ protected Client internalClient() {
+ return m_clientSupplier.get();
+ }
+ /**
+ * Creates a new JAX-RS {@link Client} instance. Global customization should be done by an
+ * {@link IRestClientConfigFactory}, system-specific settings should be applied in
+ * {@link #configureClientBuilder(ClientBuilder)} and REST service-specific ones by configuring one of the REST client
+ * objects, i.e. {@link WebTarget} and {@link Invocation.Builder}.
+ */
+ protected Client createClient() {
+ Configuration clientConfig = createClientConfig();
ClientBuilder clientBuilder = ClientBuilder.newBuilder()
.withConfig(clientConfig);
+
+ // IMPORTANT: initClientBuilder must happen _after_ calling clientBuilder.withConfig() because "withConfig()" replaces the entire configuration!
initClientBuilder(clientBuilder);
return clientBuilder.build();
}
/**
- * @return the {@link Client} used by {@link #target(String)}
+ * Creates and sets-up a JAX-RS client configuration with any custom properties.
+ * <p>
+ * This default implementation delegates to {@link IRestClientConfigFactory#createClientConfig()}
*/
- protected Client client() {
- return m_clientSupplier.get();
+ protected Configuration createClientConfig() {
+ return BEANS.get(IRestClientConfigFactory.class).createClientConfig();
}
protected void initClientBuilder(ClientBuilder clientBuilder) {
@@ -109,16 +114,35 @@ public abstract class AbstractRestClientHelper implements IRestClientHelper {
}
/**
- * Override this method to setup the JAX-RS client configuration with any custom properties. <br>
- * The default implementation doesn't setup any properties.
+ * @return proxied {@link Client} instance that delegates {@link WebApplicationException}s and
+ * {@link javax.ws.rs.ProcessingException}s to {@link #transformException(RuntimeException, Response)}.
*/
- protected void initClientConfig(Configurable<?> clientConfig) {
- // NOP
+ public Client client() {
+ return client(this::transformException);
+ }
+
+ /**
+ * @return proxied {@link Client} instance that delegates {@link WebApplicationException}s and
+ * {@link javax.ws.rs.ProcessingException}s to the given {@link IRestClientExceptionTransformer}. The
+ * {@code null}-transformer returns the passed exception unchanged.
+ */
+ public Client client(IRestClientExceptionTransformer exceptionTransformer) {
+ return getProxyFactory().createClientProxy(m_clientSupplier.get(), exceptionTransformer);
}
@Override
public WebTarget target(String resourcePath) {
- return client().target(buildUri(resourcePath));
+ return target(resourcePath, this::transformException);
+ }
+
+ @Override
+ public WebTarget target(String resourcePath, IRestClientExceptionTransformer exceptionTransformer) {
+ WebTarget target = internalClient().target(buildUri(resourcePath));
+ return getProxyFactory().createWebTargetProxy(target, exceptionTransformer);
+ }
+
+ protected RestClientProxyFactory getProxyFactory() {
+ return BEANS.get(RestClientProxyFactory.class);
}
@Override
@@ -140,45 +164,14 @@ public abstract class AbstractRestClientHelper implements IRestClientHelper {
*/
protected abstract String getBaseUri();
- @Override
- public void throwOnResponseError(WebTarget target, Response response) {
- // TODO [8.0] pbz,abr: Remove special handling and exception wrapping, throw WebApplicationException with nested response, leave reading ErrorDo from response to caller
- if (response.getStatus() == Response.Status.FORBIDDEN.getStatusCode()) {
- handleForbiddenResponse(target, response);
- }
- if (response.getStatusInfo().getFamily() != Response.Status.Family.SUCCESSFUL) {
- handleErrorResponse(target, response);
- }
- }
-
- protected void handleForbiddenResponse(WebTarget target, Response response) {
- try {
- ErrorDo error = response.readEntity(ErrorResponse.class).getError();
- throw new VetoException(error.getMessage()).withTitle(error.getTitle()); // add other errordo attributes
- }
- catch (@SuppressWarnings("squid:S1166") javax.ws.rs.ProcessingException | IllegalStateException e) {
- StatusType statusInfo = response.getStatusInfo();
- LOG.debug("REST call to '{}' returned forbidden {} {} without error response object.", target.getUri(), statusInfo.getStatusCode(), statusInfo.getReasonPhrase());
-
- VetoException vetoException = new VetoException(response.getStatusInfo().getReasonPhrase());
- vetoException.addSuppressed(e);
- throw vetoException;
- }
- }
-
- protected void handleErrorResponse(WebTarget target, Response response) {
- try {
- ErrorDo error = response.readEntity(ErrorResponse.class).getError();
- throw new PlatformException(error.getMessage());
- }
- catch (@SuppressWarnings("squid:S1166") javax.ws.rs.ProcessingException | IllegalStateException e) {
- StatusType statusInfo = response.getStatusInfo();
- LOG.debug("REST call to '{}' returned error {} {} without error response object.", target.getUri(), statusInfo.getStatusCode(), statusInfo.getReasonPhrase());
-
- ProcessingException processingException = new ProcessingException("REST call to '{}' failed: {} {}", target.getUri(), statusInfo.getStatusCode(), statusInfo.getReasonPhrase());
- processingException.addSuppressed(e);
- throw processingException;
- }
+ /**
+ * Call-back method for transforming {@link WebApplicationException} and {@link javax.ws.rs.ProcessingException}
+ * thrown during a REST service invocation. Subclasses may extract service-specific error objects.
+ * <p>
+ * This default implementation just returns the passed exception.
+ */
+ protected RuntimeException transformException(RuntimeException e, Response response) {
+ return e;
}
@Override
diff --git a/org.eclipse.scout.rt.rest/src/main/java/org/eclipse/scout/rt/rest/client/IRestClientConfigFactory.java b/org.eclipse.scout.rt.rest/src/main/java/org/eclipse/scout/rt/rest/client/IRestClientConfigFactory.java
new file mode 100644
index 0000000000..f1a2dbc0ec
--- /dev/null
+++ b/org.eclipse.scout.rt.rest/src/main/java/org/eclipse/scout/rt/rest/client/IRestClientConfigFactory.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2018 BSI Business Systems Integration AG.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * BSI Business Systems Integration AG - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.scout.rt.rest.client;
+
+import javax.ws.rs.client.ClientBuilder;
+import javax.ws.rs.core.Configuration;
+
+import org.eclipse.scout.rt.platform.ApplicationScoped;
+
+/**
+ * Factory for creating JAX-RS implementor-specific {@link Configuration} objects that are used to build new
+ * {@link ClientBuilder} instances.
+ *
+ * @see ClientBuilder#withConfig(Configuration)
+ */
+@ApplicationScoped
+public interface IRestClientConfigFactory {
+
+ /**
+ * @return new JAX-RS implementor-specific {@link Configuration}.
+ */
+ Configuration createClientConfig();
+}
diff --git a/org.eclipse.scout.rt.rest/src/main/java/org/eclipse/scout/rt/rest/client/IRestClientHelper.java b/org.eclipse.scout.rt.rest/src/main/java/org/eclipse/scout/rt/rest/client/IRestClientHelper.java
index 5e66e7e466..7c09b1595c 100644
--- a/org.eclipse.scout.rt.rest/src/main/java/org/eclipse/scout/rt/rest/client/IRestClientHelper.java
+++ b/org.eclipse.scout.rt.rest/src/main/java/org/eclipse/scout/rt/rest/client/IRestClientHelper.java
@@ -12,31 +12,43 @@ package org.eclipse.scout.rt.rest.client;
import java.util.Map;
+import javax.ws.rs.WebApplicationException;
import javax.ws.rs.client.Entity;
import javax.ws.rs.client.WebTarget;
-import javax.ws.rs.core.Response;
+
+import org.eclipse.scout.rt.rest.client.proxy.IRestClientExceptionTransformer;
/**
- * Interface to a generic REST client helper dealing with REST requests to a API server.
+ * Interface to a generic REST client helper dealing with REST requests to an API server.
+ * <p>
+ * Implementers of this class are expected to provide support for cancellation and exception transformation.
*/
public interface IRestClientHelper {
/**
+ * Creates a new {@link WebTarget} that uses the default exception transformer defined by the implementing class.
+ *
* @param resourcePath
- * Path to the resource, relative to the Studio API root. This path must <i>not</i> contain template strings
- * (they would be encoded).
+ * Path to the resource, relative to the API root. This path must <i>not</i> contain template strings (they
+ * would be encoded).
*/
WebTarget target(String resourcePath);
/**
- * Applies all specified query parameters to the specified {@code target}
+ * @param resourcePath
+ * Path to the resource, relative to the API root. This path must <i>not</i> contain template strings (they
+ * would be encoded).
+ * @param exceptionTransformer
+ * optional {@link IRestClientExceptionTransformer} used by the returned {@link WebTarget} and any objects it
+ * creates to transform {@link WebApplicationException}s and {@link javax.ws.rs.ProcessingException}s. The
+ * {@code null}-transformer returns the passed exception unchanged.
*/
- WebTarget applyQueryParams(WebTarget target, Map<String, Object> queryParams);
+ WebTarget target(String resourcePath, IRestClientExceptionTransformer exceptionTransformer);
/**
- * Throws exception if response contains an error.
+ * Applies all specified query parameters to the specified {@code target}
*/
- void throwOnResponseError(WebTarget target, Response response);
+ WebTarget applyQueryParams(WebTarget target, Map<String, Object> queryParams);
/**
* @return {@link Entity} containing an empty JSON string.
diff --git a/org.eclipse.scout.rt.rest/src/main/java/org/eclipse/scout/rt/rest/client/proxy/AbstractEntityRestClientExceptionTransformer.java b/org.eclipse.scout.rt.rest/src/main/java/org/eclipse/scout/rt/rest/client/proxy/AbstractEntityRestClientExceptionTransformer.java
new file mode 100644
index 0000000000..23074b8088
--- /dev/null
+++ b/org.eclipse.scout.rt.rest/src/main/java/org/eclipse/scout/rt/rest/client/proxy/AbstractEntityRestClientExceptionTransformer.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2018 BSI Business Systems Integration AG.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * BSI Business Systems Integration AG - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.scout.rt.rest.client.proxy;
+
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.StatusType;
+
+import org.eclipse.scout.rt.platform.ApplicationScoped;
+import org.eclipse.scout.rt.platform.exception.ProcessingException;
+import org.eclipse.scout.rt.platform.exception.VetoException;
+
+/**
+ * Base implementation for reading the entity of an unsuccessful REST {@link Response}.
+ */
+@ApplicationScoped
+public abstract class AbstractEntityRestClientExceptionTransformer implements IRestClientExceptionTransformer {
+
+ @Override
+ public RuntimeException transform(RuntimeException e, Response response) {
+ if (response != null) {
+ if (response.getStatus() == Response.Status.FORBIDDEN.getStatusCode()) {
+ return transformForbiddenResponse(e, response);
+ }
+ if (response.getStatusInfo().getFamily() != Response.Status.Family.SUCCESSFUL) {
+ return transformErrorResponse(e, response);
+ }
+ }
+ return e;
+ }
+
+ protected RuntimeException transformForbiddenResponse(RuntimeException e, Response response) {
+ RuntimeException suppressedException = null;
+ try {
+ if (response.hasEntity()) {
+ return transformEntityForbidden(e, response);
+ }
+ }
+ catch (@SuppressWarnings("squid:S1166") javax.ws.rs.ProcessingException | IllegalStateException ex) {
+ suppressedException = ex;
+ }
+
+ VetoException vetoException = new VetoException(response.getStatusInfo().getReasonPhrase(), e);
+ if (suppressedException != null) {
+ vetoException.addSuppressed(suppressedException);
+ }
+ return vetoException;
+ }
+
+ protected RuntimeException transformErrorResponse(RuntimeException e, Response response) {
+ RuntimeException suppressedException = null;
+ try {
+ if (response.hasEntity() && MediaType.APPLICATION_JSON_TYPE.equals(response.getMediaType())) {
+ return transformEntityError(e, response);
+ }
+ }
+ catch (@SuppressWarnings("squid:S1166") javax.ws.rs.ProcessingException | IllegalStateException ex) {
+ suppressedException = ex;
+ }
+
+ StatusType statusInfo = response.getStatusInfo();
+ ProcessingException processingException = new ProcessingException("REST call failed: {} {}", statusInfo.getStatusCode(), statusInfo.getReasonPhrase(), e);
+ if (suppressedException != null) {
+ processingException.addSuppressed(suppressedException);
+ }
+ return processingException;
+ }
+
+ protected abstract RuntimeException transformEntityForbidden(RuntimeException cause, Response response);
+
+ protected abstract RuntimeException transformEntityError(RuntimeException cause, Response response);
+}
diff --git a/org.eclipse.scout.rt.rest/src/main/java/org/eclipse/scout/rt/rest/client/proxy/BasicRestClientExceptionTransformer.java b/org.eclipse.scout.rt.rest/src/main/java/org/eclipse/scout/rt/rest/client/proxy/BasicRestClientExceptionTransformer.java
new file mode 100644
index 0000000000..68852eea4e
--- /dev/null
+++ b/org.eclipse.scout.rt.rest/src/main/java/org/eclipse/scout/rt/rest/client/proxy/BasicRestClientExceptionTransformer.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2018 BSI Business Systems Integration AG.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * BSI Business Systems Integration AG - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.scout.rt.rest.client.proxy;
+
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.StatusType;
+
+import org.eclipse.scout.rt.platform.ApplicationScoped;
+import org.eclipse.scout.rt.platform.exception.ProcessingException;
+import org.eclipse.scout.rt.platform.exception.VetoException;
+
+/**
+ * REST client exception handler that transforms {@link Response.Status#FORBIDDEN} into a {@link VetoException} and all
+ * other unsuccessful status into a {@link ProcessingException}.
+ */
+@ApplicationScoped
+public class BasicRestClientExceptionTransformer implements IRestClientExceptionTransformer {
+
+ @Override
+ public RuntimeException transform(RuntimeException e, Response response) {
+ if (response != null) {
+ if (response.getStatus() == Response.Status.FORBIDDEN.getStatusCode()) {
+ return transformForbiddenResponse(e, response);
+ }
+ if (response.getStatusInfo().getFamily() != Response.Status.Family.SUCCESSFUL) {
+ return transformErrorResponse(e, response);
+ }
+ }
+ return e;
+ }
+
+ protected RuntimeException transformForbiddenResponse(RuntimeException e, Response response) {
+ return new VetoException(response.getStatusInfo().getReasonPhrase())
+ .withCode(response.getStatus());
+ }
+
+ protected RuntimeException transformErrorResponse(RuntimeException e, Response response) {
+ StatusType statusInfo = response.getStatusInfo();
+ return new ProcessingException("REST call failed: {} {}", statusInfo.getStatusCode(), statusInfo.getReasonPhrase(), e)
+ .withCode(response.getStatus());
+ }
+}
diff --git a/org.eclipse.scout.rt.rest/src/main/java/org/eclipse/scout/rt/rest/client/proxy/ErrorDoRestClientExceptionTransformer.java b/org.eclipse.scout.rt.rest/src/main/java/org/eclipse/scout/rt/rest/client/proxy/ErrorDoRestClientExceptionTransformer.java
new file mode 100644
index 0000000000..db63526ed9
--- /dev/null
+++ b/org.eclipse.scout.rt.rest/src/main/java/org/eclipse/scout/rt/rest/client/proxy/ErrorDoRestClientExceptionTransformer.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2018 BSI Business Systems Integration AG.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * BSI Business Systems Integration AG - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.scout.rt.rest.client.proxy;
+
+import javax.ws.rs.core.Response;
+
+import org.eclipse.scout.rt.platform.ApplicationScoped;
+import org.eclipse.scout.rt.platform.exception.ProcessingException;
+import org.eclipse.scout.rt.platform.exception.VetoException;
+import org.eclipse.scout.rt.rest.error.ErrorDo;
+import org.eclipse.scout.rt.rest.error.ErrorResponse;
+
+/**
+ * REST client exception handler that extracts {@link ErrorDo} from the error {@link Response}.
+ */
+@ApplicationScoped
+public class ErrorDoRestClientExceptionTransformer extends AbstractEntityRestClientExceptionTransformer {
+
+ @Override
+ protected RuntimeException transformEntityForbidden(RuntimeException cause, Response response) {
+ ErrorDo error = response.readEntity(ErrorResponse.class).getError();
+ return new VetoException(error.getMessage(), cause).withTitle(error.getTitle());
+ }
+
+ @Override
+ protected RuntimeException transformEntityError(RuntimeException cause, Response response) {
+ ErrorDo error = response.readEntity(ErrorResponse.class).getError();
+ return new ProcessingException(error.getMessage(), cause).withTitle(error.getTitle());
+ }
+}
diff --git a/org.eclipse.scout.rt.rest/src/main/java/org/eclipse/scout/rt/rest/client/proxy/IRestClientExceptionTransformer.java b/org.eclipse.scout.rt.rest/src/main/java/org/eclipse/scout/rt/rest/client/proxy/IRestClientExceptionTransformer.java
new file mode 100644
index 0000000000..059c83fbfc
--- /dev/null
+++ b/org.eclipse.scout.rt.rest/src/main/java/org/eclipse/scout/rt/rest/client/proxy/IRestClientExceptionTransformer.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2018 BSI Business Systems Integration AG.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * BSI Business Systems Integration AG - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.scout.rt.rest.client.proxy;
+
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Response;
+
+/**
+ * Strategy used by proxied REST clients for transforming technical REST exceptions, i.e.
+ * {@link WebApplicationException} and {@link javax.ws.rs.ProcessingException}, into the current application context.
+ */
+@FunctionalInterface
+public interface IRestClientExceptionTransformer {
+
+ IRestClientExceptionTransformer IDENTITY = (e, r) -> {
+ throw e;
+ };
+
+ static IRestClientExceptionTransformer identityIfNull(IRestClientExceptionTransformer t) {
+ return t == null ? IDENTITY : t;
+ }
+
+ /**
+ * Transforms the given {@link RuntimeException} and optional {@link Response}.
+ *
+ * @param e
+ * {@link WebApplicationException} or {@link javax.ws.rs.ProcessingException} caught during REST service
+ * invocation.
+ * @param response
+ * optional response extracted from the given exception. <b>Note:</b> Could be null.
+ */
+ RuntimeException transform(RuntimeException e, Response response);
+}
diff --git a/org.eclipse.scout.rt.rest/src/main/java/org/eclipse/scout/rt/rest/client/proxy/RestClientProxyFactory.java b/org.eclipse.scout.rt.rest/src/main/java/org/eclipse/scout/rt/rest/client/proxy/RestClientProxyFactory.java
new file mode 100644
index 0000000000..39bb3bb260
--- /dev/null
+++ b/org.eclipse.scout.rt.rest/src/main/java/org/eclipse/scout/rt/rest/client/proxy/RestClientProxyFactory.java
@@ -0,0 +1,456 @@
+/*******************************************************************************
+ * Copyright (c) 2018 BSI Business Systems Integration AG.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * BSI Business Systems Integration AG - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.scout.rt.rest.client.proxy;
+
+import static org.eclipse.scout.rt.platform.util.Assertions.assertNotNull;
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+import java.util.concurrent.CancellationException;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+import java.util.function.BiFunction;
+import java.util.function.Supplier;
+
+import javax.ws.rs.BadRequestException;
+import javax.ws.rs.ClientErrorException;
+import javax.ws.rs.ForbiddenException;
+import javax.ws.rs.InternalServerErrorException;
+import javax.ws.rs.NotAcceptableException;
+import javax.ws.rs.NotAllowedException;
+import javax.ws.rs.NotAuthorizedException;
+import javax.ws.rs.NotFoundException;
+import javax.ws.rs.NotSupportedException;
+import javax.ws.rs.RedirectionException;
+import javax.ws.rs.ServerErrorException;
+import javax.ws.rs.ServiceUnavailableException;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.client.AsyncInvoker;
+import javax.ws.rs.client.Client;
+import javax.ws.rs.client.Invocation;
+import javax.ws.rs.client.InvocationCallback;
+import javax.ws.rs.client.ResponseProcessingException;
+import javax.ws.rs.client.SyncInvoker;
+import javax.ws.rs.client.WebTarget;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.Status;
+
+import org.eclipse.scout.rt.platform.ApplicationScoped;
+import org.eclipse.scout.rt.platform.BEANS;
+import org.eclipse.scout.rt.platform.exception.DefaultRuntimeExceptionTranslator;
+import org.eclipse.scout.rt.platform.util.FinalValue;
+import org.eclipse.scout.rt.platform.util.LazyValue;
+import org.eclipse.scout.rt.platform.util.concurrent.FutureCancelledError;
+import org.eclipse.scout.rt.platform.util.concurrent.ThreadInterruptedError;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Creates proxy instances around REST client resources which provide the following features:
+ * <ul>
+ * <li><b>Cancellation:</b> Synchronously invoked REST services cannot be cancelled. Proxies created by this factory
+ * perform synchronous invocations asynchronously, allowing to cancel the blocking client-side execution. <b>Note:</b>
+ * the server-side invocation cannot be cancelled in general.</li>
+ * <li><b>Exception handling:</b> {@link WebApplicationException}s and {@link javax.ws.rs.ProcessingException}s are
+ * transformed by an {@link IRestClientExceptionTransformer} which allows to extract additional service-dependent
+ * payload.</li>
+ * </ul>
+ */
+@ApplicationScoped
+public class RestClientProxyFactory {
+
+ private static final Logger LOG = LoggerFactory.getLogger(RestClientProxyFactory.class);
+
+ static final String INVOCATION_SUBMIT_METHOD_NAME = "submit";
+ static final String INVOCATION_INVOKE_METHOD_NAME = "invoke";
+
+ private final LazyValue<Map<Method, Method>> m_syncToAsyncMethods = new LazyValue<>(this::collectSyncToAsyncMethodMappings);
+ private final LazyValue<Set<Method>> m_invocationCallbackMethods = new LazyValue<>(this::collectInvocationCallbackMethods);
+
+ public Client createClientProxy(Client client, IRestClientExceptionTransformer exceptionTransformer) {
+ assertNotNull(client, "client is required");
+ return createProxy(Client.class, new RestProxyInvcationHandler<>(client, exceptionTransformer));
+ }
+
+ public WebTarget createWebTargetProxy(WebTarget webTarget, IRestClientExceptionTransformer exceptionTransformer) {
+ return createProxy(WebTarget.class, new RestProxyInvcationHandler<>(webTarget, exceptionTransformer));
+ }
+
+ public Invocation.Builder createInvocationBuilderProxy(Invocation.Builder builder, IRestClientExceptionTransformer exceptionTransformer) {
+ return createProxy(Invocation.Builder.class, new AsyncInvocationBuilderInvocationHandler(builder, exceptionTransformer));
+ }
+
+ public Invocation createInvocationProxy(Invocation invocation, IRestClientExceptionTransformer exceptionTransformer) {
+ return createProxy(Invocation.class, new AsyncInvocationInvocationHandler(invocation, exceptionTransformer));
+ }
+
+ public AsyncInvoker createAsyncInvokerProxy(AsyncInvoker asyncInvoker, IRestClientExceptionTransformer exceptionTransformer) {
+ return createProxy(AsyncInvoker.class, new RestProxyInvcationHandler<>(asyncInvoker, exceptionTransformer));
+ }
+
+ public Future<?> createFutureProxy(Future<?> future, IRestClientExceptionTransformer exceptionTransformer) {
+ return createProxy(Future.class, new FutureExceptionTransformerInvocationHandler(future, exceptionTransformer));
+ }
+
+ protected <T> T createProxy(Class<T> type, InvocationHandler handler) {
+ return type.cast(Proxy.newProxyInstance(
+ RestClientProxyFactory.class.getClassLoader(),
+ new Class[]{type},
+ handler));
+ }
+
+ /**
+ * Resolves the corresponding async method declared in {@link AsyncInvoker} for the given one declared in
+ * {@link SyncInvoker}.
+ *
+ * @return Returns the the corresponding method of {@link AsyncInvoker} for the requested {@link SyncInvoker} method
+ * or {@code null} in any other case.
+ */
+ protected Method resolveAsyncMethod(Method syncMethod) {
+ return m_syncToAsyncMethods.get().get(syncMethod);
+ }
+
+ /**
+ * @return {@code true} if the given method makes use of an {@link InvocationCallback} which is currently not
+ * completely covered by cancellation and exception transformation. Otherwise {@code false}.
+ */
+ protected boolean isUsingInvocationCallback(Method method) {
+ return m_invocationCallbackMethods.get().contains(method);
+ }
+
+ /**
+ * Creates the mapping of all {@link SyncInvoker} methods to their corresponding {@link AsyncInvoker} methods.
+ * <p>
+ * <b>Implementation Note:</b>The mapping is computed once, kept in a {@link FinalValue} and used by
+ * {@link #resolveAsyncMethod(Method)}.
+ */
+ protected Map<Method, Method> collectSyncToAsyncMethodMappings() {
+ Map<Method, Method> syncToAsyncMethods = new HashMap<>();
+
+ // map SyncInvoker to AsyncInvoker methods
+ for (Method syncMethod : SyncInvoker.class.getDeclaredMethods()) {
+ getMethod(AsyncInvoker.class, syncMethod.getName(), syncMethod.getParameterTypes())
+ .ifPresent(asyncMethod -> syncToAsyncMethods.put(syncMethod, asyncMethod));
+ }
+
+ // map sync methods on Invocation to corresponding async method
+ for (Method method : Invocation.class.getMethods()) {
+ if (INVOCATION_INVOKE_METHOD_NAME.equals(method.getName())) {
+ getMethod(Invocation.class, INVOCATION_SUBMIT_METHOD_NAME, method.getParameterTypes())
+ .ifPresent(asyncMethod -> syncToAsyncMethods.put(method, asyncMethod));
+ }
+ }
+ return syncToAsyncMethods;
+ }
+
+ /**
+ * Collects all REST client methods that are using an {@link InvocationCallback} parameter, which is currently not
+ * completely supported by this factory (exceptions are not transformed).
+ * <p>
+ * <b>Implementation Note:</b>The mapping is computed once, kept in a {@link FinalValue} and used by
+ * {@link #isUsingInvocationCallback(Method)}.
+ */
+ protected Set<Method> collectInvocationCallbackMethods() {
+ Set<Method> discouragedMethods = new HashSet<>();
+
+ // collect methods of AsyncInvoker which last parameter is a InvocationCallback
+ for (Method method : AsyncInvoker.class.getDeclaredMethods()) {
+ Class<?>[] paramTypes = method.getParameterTypes();
+ if (paramTypes.length > 0 && paramTypes[paramTypes.length - 1] == InvocationCallback.class) {
+ discouragedMethods.add(method);
+ }
+ }
+
+ // add Invocation.submit(InvocationCallback)
+ getMethod(Invocation.class, INVOCATION_SUBMIT_METHOD_NAME, InvocationCallback.class).ifPresent(discouragedMethods::add);
+
+ return discouragedMethods;
+ }
+
+ /**
+ * Returns a public method of the given class, that matches the given name and parameter types.
+ */
+ protected Optional<Method> getMethod(Class<?> clazz, String name, Class<?>... parameterTypes) {
+ try {
+ return Optional.of(clazz.getMethod(name, parameterTypes));
+ }
+ catch (NoSuchMethodException | SecurityException e) {
+ LOG.warn("Could not find method {}.{}({})", clazz, name, parameterTypes, e);
+ }
+ return Optional.empty();
+ }
+
+ /**
+ * @return returns {@code true} if the given object is part of a REST client proxy created by this factory.
+ */
+ public boolean isProxy(Object o) {
+ if (o == null || !Proxy.isProxyClass(o.getClass())) {
+ return false;
+ }
+ InvocationHandler handler = Proxy.getInvocationHandler(o);
+ return RestProxyInvcationHandler.class.isInstance(handler);
+ }
+
+ /**
+ * @return Returns the instance wrapped into a proxy created by this class. Otherwise the given object itself;
+ */
+ @SuppressWarnings("unchecked")
+ public <T> T unwrap(T o) {
+ if (!isProxy(o)) {
+ return o;
+ }
+ RestProxyInvcationHandler handler = (RestProxyInvcationHandler) Proxy.getInvocationHandler(o);
+ return (T) handler.unwrap();
+ }
+
+ protected class RestProxyInvcationHandler<T> implements InvocationHandler {
+
+ private final T m_proxiedObject;
+ private final IRestClientExceptionTransformer m_exceptionTransformer;
+
+ public RestProxyInvcationHandler(T proxiedObject, IRestClientExceptionTransformer exceptionTransformer) {
+ m_proxiedObject = assertNotNull(proxiedObject, "proxiedObject is required");
+ m_exceptionTransformer = IRestClientExceptionTransformer.identityIfNull(exceptionTransformer);
+ }
+
+ public T unwrap() {
+ return m_proxiedObject;
+ }
+
+ /**
+ * Returns a REST client exception transformer. Never {@code null}.
+ */
+ protected IRestClientExceptionTransformer getExceptionTransformer() {
+ return m_exceptionTransformer;
+ }
+
+ @Override
+ public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
+ if (isUsingInvocationCallback(method)) {
+ LOG.warn("Discuraged method invocation: Exceptions handed over to InvocationCallback.failed() are not transformed by this REST client proxy");
+ }
+ Object result = method.invoke(unwrap(), args);
+ return proxyResult(proxy, result);
+ }
+
+ protected Object proxyResult(Object proxy, Object result) {
+ // proxy JAX-RS invocation related objects
+ if (result == unwrap()) {
+ return proxy;
+ }
+ if (result instanceof Client) {
+ return createClientProxy((Client) result, getExceptionTransformer());
+ }
+ if (result instanceof WebTarget) {
+ return createWebTargetProxy((WebTarget) result, getExceptionTransformer());
+ }
+ if (result instanceof Invocation.Builder) {
+ return createInvocationBuilderProxy((Invocation.Builder) result, getExceptionTransformer());
+ }
+ if (result instanceof Invocation) {
+ return createInvocationProxy((Invocation) result, getExceptionTransformer());
+ }
+ if (result instanceof Future<?>) {
+ return createFutureProxy((Future<?>) result, getExceptionTransformer());
+ }
+ if (result instanceof AsyncInvoker) {
+ return createAsyncInvokerProxy((AsyncInvoker) result, getExceptionTransformer());
+ }
+ if (result instanceof Response) {
+ // check status
+ Response response = (Response) result;
+ WebApplicationException webAppException = convertToWebAppException(response);
+ if (webAppException == null) {
+ return response;
+ }
+ throw getExceptionTransformer().transform(webAppException, response);
+ }
+ return result;
+ }
+
+ protected Object invokeRestService(Supplier<Object> asyncObjectSupplier, Method method, Object[] args) {
+ try {
+ final Future<?> future = findAndInvokeAsyncMethod(asyncObjectSupplier, method, args);
+ if (future != null) {
+ return awaitDoneAndGet(future);
+ }
+
+ // fall back to sync invocation
+ return invokeSyncMethod(method, args);
+ }
+ catch (WebApplicationException e) {
+ throw getExceptionTransformer().transform(e, e.getResponse());
+ }
+ catch (ResponseProcessingException e) {
+ throw getExceptionTransformer().transform(e, e.getResponse());
+ }
+ catch (javax.ws.rs.ProcessingException e) {
+ throw getExceptionTransformer().transform(e, null);
+ }
+ }
+
+ protected Future<?> findAndInvokeAsyncMethod(Supplier<Object> asyncObjectSupplier, Method syncMethod, Object[] args) {
+ try {
+ Method asyncMethod = resolveAsyncMethod(syncMethod);
+ if (asyncMethod != null) {
+ LOG.debug("transforming sync to async REST invocation");
+ return (Future<?>) asyncMethod.invoke(asyncObjectSupplier.get(), args);
+ }
+ }
+ catch (Exception e) {
+ LOG.warn("converting sync to async method failed. Falling back to sync invocation [method='{}']", syncMethod, e);
+ }
+ return null;
+ }
+
+ protected Object invokeSyncMethod(Method syncMethod, Object[] args) {
+ try {
+ return syncMethod.invoke(unwrap(), args);
+ }
+ catch (Exception e) {
+ throw BEANS.get(DefaultRuntimeExceptionTranslator.class).translate(e);
+ }
+ }
+
+ protected Object awaitDoneAndGet(Future<?> future) {
+ try {
+ return future.get();
+ }
+ catch (CancellationException e) {
+ throw new FutureCancelledError("Async REST invocation has been cancelled", e);
+ }
+ catch (InterruptedException e) {
+ future.cancel(true); // cancel async invocation
+ Thread.currentThread().interrupt(); // restore interrupted flag
+ throw new ThreadInterruptedError("Interrupted while invoking REST service", e);
+ }
+ catch (ExecutionException e) {
+ // unwrap execution exception and make sure it is an unchecked exception
+ throw BEANS.get(DefaultRuntimeExceptionTranslator.class).translate(e);
+ }
+ }
+ }
+
+ protected class AsyncInvocationBuilderInvocationHandler extends RestProxyInvcationHandler<Invocation.Builder> {
+
+ public AsyncInvocationBuilderInvocationHandler(Invocation.Builder builder, IRestClientExceptionTransformer exceptionTransformer) {
+ super(builder, exceptionTransformer);
+ }
+
+ @Override
+ public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
+ if (method.getDeclaringClass() == SyncInvoker.class) {
+ return proxyResult(proxy, invokeRestService(() -> unwrap().async(), method, args));
+ }
+ return super.invoke(proxy, method, args);
+ }
+ }
+
+ protected class AsyncInvocationInvocationHandler extends RestProxyInvcationHandler<Invocation> {
+
+ public AsyncInvocationInvocationHandler(Invocation invocation, IRestClientExceptionTransformer exceptionTransformer) {
+ super(invocation, exceptionTransformer);
+ }
+
+ @Override
+ public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
+ if (INVOCATION_INVOKE_METHOD_NAME.equals(method.getName())) {
+ return proxyResult(proxy, invokeRestService(this::unwrap, method, args));
+ }
+ return super.invoke(proxy, method, args);
+ }
+ }
+
+ protected class FutureExceptionTransformerInvocationHandler extends RestProxyInvcationHandler<Future> {
+ public FutureExceptionTransformerInvocationHandler(Future future, IRestClientExceptionTransformer exceptionTransformer) {
+ super(future, exceptionTransformer);
+ }
+
+ @Override
+ public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
+ try {
+ return super.invoke(proxy, method, args);
+ }
+ catch (@SuppressWarnings("squid:S1166") InvocationTargetException ie) {
+ Throwable cause = ie.getTargetException();
+ if (cause instanceof ExecutionException) {
+ cause = ((ExecutionException) cause).getCause();
+ }
+
+ BiFunction<RuntimeException, Response, ExecutionException> extractAndTransform = (re, r) -> new ExecutionException(getExceptionTransformer().transform(re, r));
+ if (cause instanceof WebApplicationException) {
+ WebApplicationException we = (WebApplicationException) cause;
+ throw extractAndTransform.apply(we, we.getResponse());
+ }
+ else if (cause instanceof ResponseProcessingException) {
+ ResponseProcessingException rpe = (ResponseProcessingException) cause;
+ throw extractAndTransform.apply(rpe, rpe.getResponse());
+ }
+ else if (cause instanceof javax.ws.rs.ProcessingException) {
+ javax.ws.rs.ProcessingException pe = (javax.ws.rs.ProcessingException) cause;
+ throw extractAndTransform.apply(pe, null);
+ }
+ throw ie.getTargetException();
+ }
+ }
+ }
+
+ protected WebApplicationException convertToWebAppException(Response response) {
+ if (response.getStatusInfo().getFamily() == Status.Family.SUCCESSFUL) {
+ return null;
+ }
+
+ // Buffer and close input stream to release any resources (i.e. memory and connections)
+ response.bufferEntity();
+
+ final Response.Status status = Response.Status.fromStatusCode(response.getStatus());
+ if (status != null) {
+ switch (status) {
+ case BAD_REQUEST:
+ return new BadRequestException(response);
+ case UNAUTHORIZED:
+ return new NotAuthorizedException(response);
+ case FORBIDDEN:
+ return new ForbiddenException(response);
+ case NOT_FOUND:
+ return new NotFoundException(response);
+ case METHOD_NOT_ALLOWED:
+ return new NotAllowedException(response);
+ case NOT_ACCEPTABLE:
+ return new NotAcceptableException(response);
+ case UNSUPPORTED_MEDIA_TYPE:
+ return new NotSupportedException(response);
+ case INTERNAL_SERVER_ERROR:
+ return new InternalServerErrorException(response);
+ case SERVICE_UNAVAILABLE:
+ return new ServiceUnavailableException(response);
+ }
+ }
+
+ switch (response.getStatusInfo().getFamily()) {
+ case REDIRECTION:
+ return new RedirectionException(response);
+ case CLIENT_ERROR:
+ return new ClientErrorException(response);
+ case SERVER_ERROR:
+ return new ServerErrorException(response);
+ default:
+ return new WebApplicationException(response);
+ }
+ }
+}
diff --git a/org.eclipse.scout.rt.team-project-set/scoutRT.psf b/org.eclipse.scout.rt.team-project-set/scoutRT.psf
index cdbc7264e9..ed645d022a 100644
--- a/org.eclipse.scout.rt.team-project-set/scoutRT.psf
+++ b/org.eclipse.scout.rt.team-project-set/scoutRT.psf
@@ -26,6 +26,7 @@
<item elementID="=org.eclipse.scout.rt.server" factoryID="org.eclipse.jdt.ui.PersistableJavaElementFactory"/>
<item elementID="=org.eclipse.scout.rt.rest.jackson" factoryID="org.eclipse.jdt.ui.PersistableJavaElementFactory"/>
<item elementID="=org.eclipse.scout.rt.rest.jersey.client" factoryID="org.eclipse.jdt.ui.PersistableJavaElementFactory"/>
+ <item elementID="=org.eclipse.scout.rt.rest.jersey.test" factoryID="org.eclipse.jdt.ui.PersistableJavaElementFactory"/>
</workingSets>
<workingSets editPageId="org.eclipse.jdt.ui.JavaWorkingSetPage" id="1375704042674_2" label="scout.rt.client" name="scout.rt.client">
<item elementID="=org.eclipse.scout.rt.svg.ui.html" factoryID="org.eclipse.jdt.ui.PersistableJavaElementFactory"/>
diff --git a/org.eclipse.scout.rt/pom.xml b/org.eclipse.scout.rt/pom.xml
index 5122547903..90c915166f 100644
--- a/org.eclipse.scout.rt/pom.xml
+++ b/org.eclipse.scout.rt/pom.xml
@@ -62,6 +62,7 @@
<module>../org.eclipse.scout.rt.jackson.test</module>
<module>../org.eclipse.scout.rt.rest.jackson</module>
<module>../org.eclipse.scout.rt.rest.jersey.client</module>
+ <module>../org.eclipse.scout.rt.rest.jersey.test</module>
<module>../org.eclipse.scout.jaxws.apt</module>
@@ -308,6 +309,12 @@
<dependency>
<groupId>org.eclipse.scout.rt</groupId>
+ <artifactId>org.eclipse.scout.rt.rest.jersey.test</artifactId>
+ <version>8.0.0-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.eclipse.scout.rt</groupId>
<artifactId>org.eclipse.scout.rt.shared</artifactId>
<version>8.0.0-SNAPSHOT</version>
</dependency>

Back to the top