You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by lb...@apache.org on 2017/08/04 16:10:05 UTC

[14/19] camel git commit: CAMEL-11555: ServiceNow : create a maven plugin to generate models based on table layout

http://git-wip-us.apache.org/repos/asf/camel/blob/109da7c9/components/camel-servicenow/camel-servicenow-maven-plugin/src/test/java/org/apache/camel/maven/CamelServiceNowMojoTestSupport.java
----------------------------------------------------------------------
diff --git a/components/camel-servicenow/camel-servicenow-maven-plugin/src/test/java/org/apache/camel/maven/CamelServiceNowMojoTestSupport.java b/components/camel-servicenow/camel-servicenow-maven-plugin/src/test/java/org/apache/camel/maven/CamelServiceNowMojoTestSupport.java
new file mode 100644
index 0000000..1fbb041
--- /dev/null
+++ b/components/camel-servicenow/camel-servicenow-maven-plugin/src/test/java/org/apache/camel/maven/CamelServiceNowMojoTestSupport.java
@@ -0,0 +1,56 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.maven;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.camel.util.ObjectHelper;
+import org.apache.commons.io.FileUtils;
+import org.apache.maven.plugin.logging.SystemStreamLog;
+
+class CamelServiceNowMojoTestSupport  {
+
+    protected CamelServiceNowGenerateMojo createMojo() throws IOException {
+        CamelServiceNowGenerateMojo mojo = new CamelServiceNowGenerateMojo();
+
+        mojo.setLog(new SystemStreamLog());
+
+        // set defaults
+        mojo.instanceName = getSystemPropertyOrEnvVar("servicenow.instance");
+        mojo.userName = getSystemPropertyOrEnvVar("servicenow.username");
+        mojo.userPassword = getSystemPropertyOrEnvVar("servicenow.password");
+        mojo.oauthClientId = getSystemPropertyOrEnvVar("servicenow.oauth2.client.id");
+        mojo.oauthClientSecret = getSystemPropertyOrEnvVar("servicenow.oauth2.client.secret");
+        mojo.outputDirectory = new File("target/generated-sources/camel-servicenow");
+        mojo.packageName = "org.apache.camel.servicenow.dto";
+
+        FileUtils.deleteDirectory(mojo.outputDirectory);
+
+        return mojo;
+    }
+
+    public static String getSystemPropertyOrEnvVar(String systemProperty) {
+        String answer = System.getProperty(systemProperty);
+        if (ObjectHelper.isEmpty(answer)) {
+            String envProperty = systemProperty.toUpperCase().replaceAll("[.-]", "_");
+            answer = System.getenv(envProperty);
+        }
+
+        return answer;
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/109da7c9/components/camel-servicenow/camel-servicenow-maven-plugin/src/test/resources/log4j2.properties
----------------------------------------------------------------------
diff --git a/components/camel-servicenow/camel-servicenow-maven-plugin/src/test/resources/log4j2.properties b/components/camel-servicenow/camel-servicenow-maven-plugin/src/test/resources/log4j2.properties
new file mode 100644
index 0000000..495dd7f
--- /dev/null
+++ b/components/camel-servicenow/camel-servicenow-maven-plugin/src/test/resources/log4j2.properties
@@ -0,0 +1,43 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+appender.file.type = File
+appender.file.name = file
+appender.file.fileName = target/camel-servicenow-maven-plugin-test.log
+appender.file.layout.type = PatternLayout
+appender.file.layout.pattern = %d %-5p %c{1} - %m %n
+
+appender.out.type = Console
+appender.out.name = out
+appender.out.layout.type = PatternLayout
+appender.out.layout.pattern = %d{HH:mm:ss.SSS} [%-15.15t] %-30.30c{1} %-5p %m%n
+
+logger.servicenow.name = org.apache.camel.component.servicenow
+logger.servicenow.level = DEBUG
+
+logger.mojo.name = org.apache.camel.maven.CamelServiceNowGenerateMojo
+logger.mojo.level = DEBUG
+logger.mojo.additivity = true
+logger.mojo.appenderRef.metadata.ref = out
+
+logger.mojo-test.name = org.apache.camel.maven.CamelServiceNowGenerateMojoTest
+logger.mojo-test.level = DEBUG
+logger.mojo-test.additivity = true
+logger.mojo-test.appenderRef.metadata-ext.ref = out
+
+rootLogger.level = INFO
+rootLogger.appenderRef.root.ref = file

http://git-wip-us.apache.org/repos/asf/camel/blob/109da7c9/components/camel-servicenow/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-servicenow/pom.xml b/components/camel-servicenow/pom.xml
index e60c8ec..c3ee25c 100644
--- a/components/camel-servicenow/pom.xml
+++ b/components/camel-servicenow/pom.xml
@@ -17,7 +17,8 @@
     limitations under the License.
 
 -->
-<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/maven-v4_0_0.xsd">
+<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/maven-v4_0_0.xsd">
 
   <modelVersion>4.0.0</modelVersion>
 
@@ -27,171 +28,44 @@
     <version>2.20.0-SNAPSHOT</version>
   </parent>
 
-  <artifactId>camel-servicenow</artifactId>
-  <packaging>jar</packaging>
-  <name>Camel :: ServiceNow</name>
-  <description>Camel ServiceNow support</description>
+  <artifactId>camel-servicenow-parent</artifactId>
+  <packaging>pom</packaging>
+  <name>Camel :: ServiceNow :: Parent</name>
+  <description>Camel ServiceNow parent</description>
+
+  <modules>
+    <module>camel-servicenow-component</module>
+    <module>camel-servicenow-maven-plugin</module>
+  </modules>
 
   <properties>
-    <camel.osgi.export.pkg>
-      org.apache.camel.component.servicenow.*
-    </camel.osgi.export.pkg>
-    <camel.osgi.export.service>
-      org.apache.camel.spi.ComponentResolver;component=servicenow
-    </camel.osgi.export.service>
+    <servicenow.component.root>${project.basedir}</servicenow.component.root>
   </properties>
 
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.camel</groupId>
-      <artifactId>camel-core</artifactId>
-    </dependency>
-
-    <!-- CXF -->
-    <dependency>
-      <groupId>org.apache.cxf</groupId>
-      <artifactId>cxf-core</artifactId>
-      <version>${cxf-version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.cxf</groupId>
-      <artifactId>cxf-rt-frontend-jaxrs</artifactId>
-      <version>${cxf-version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.cxf</groupId>
-      <artifactId>cxf-rt-rs-security-oauth2</artifactId>
-      <version>${cxf-version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.cxf</groupId>
-      <artifactId>cxf-rt-rs-extension-providers</artifactId>
-      <version>${cxf-version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.cxf</groupId>
-      <artifactId>cxf-rt-rs-client</artifactId>
-      <version>${cxf-version}</version>
-    </dependency>
-
-    <!-- Jackson -->
-    <dependency>
-      <groupId>com.fasterxml.jackson.core</groupId>
-      <artifactId>jackson-core</artifactId>
-      <version>${jackson2-version}</version>
-    </dependency>
-    <dependency>
-      <groupId>com.fasterxml.jackson.core</groupId>
-      <artifactId>jackson-annotations</artifactId>
-      <version>${jackson2-version}</version>
-    </dependency>
-    <dependency>
-      <groupId>com.fasterxml.jackson.core</groupId>
-      <artifactId>jackson-databind</artifactId>
-      <version>${jackson2-version}</version>
-    </dependency>
-    <dependency>
-      <groupId>com.fasterxml.jackson.jaxrs</groupId>
-      <artifactId>jackson-jaxrs-json-provider</artifactId>
-      <version>${jackson2-version}</version>
-    </dependency>
-
-    <!-- testing -->
-
-    <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>javax.servlet-api</artifactId>
-      <version>${javax.servlet-api-version}</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.osgi</groupId>
-      <artifactId>org.osgi.compendium</artifactId>
-      <version>${osgi-version}</version>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.camel</groupId>
-      <artifactId>camel-test</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.camel</groupId>
-      <artifactId>camel-test-blueprint</artifactId>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.logging.log4j</groupId>
-      <artifactId>log4j-api</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.logging.log4j</groupId>
-      <artifactId>log4j-core</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.logging.log4j</groupId>
-      <artifactId>log4j-slf4j-impl</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.mockito</groupId>
-      <artifactId>mockito-all</artifactId>
-      <version>${mockito-version}</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.hamcrest</groupId>
-      <artifactId>java-hamcrest</artifactId>
-      <version>${hamcrest-version}</version>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-
   <build>
     <plugins>
-          <plugin>
-            <artifactId>maven-surefire-plugin</artifactId>
-            <configuration>
-              <skipTests>true</skipTests>
-            </configuration>
-          </plugin>
+      <plugin>
+        <groupId>org.apache.camel</groupId>
+        <artifactId>camel-package-maven-plugin</artifactId>
+        <version>${project.version}</version>
+        <executions>
+          <execution>
+            <id>prepare</id>
+            <goals>
+              <goal>prepare-components</goal>
+            </goals>
+            <phase>generate-resources</phase>
+          </execution>
+          <execution>
+            <id>validate</id>
+            <goals>
+              <goal>validate-components</goal>
+            </goals>
+            <phase>prepare-package</phase>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>
 
-  <profiles>
-    <profile>
-      <id>servicenow-tests</id>
-      <activation>
-        <property>
-            <name>env.SERVICENOW_INSTANCE</name>
-        </property>
-      </activation>
-      <build>
-        <plugins>
-          <plugin>
-            <artifactId>maven-surefire-plugin</artifactId>
-            <configuration>
-              <skipTests>false</skipTests>
-              <systemPropertyVariables>
-                <servicenow.instance>${env.SERVICENOW_INSTANCE}</servicenow.instance>
-                <servicenow.username>${env.SERVICENOW_USERNAME}</servicenow.username>
-                <servicenow.password>${env.SERVICENOW_PASSWORD}</servicenow.password>
-              </systemPropertyVariables>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-  </profiles>
-
 </project>

http://git-wip-us.apache.org/repos/asf/camel/blob/109da7c9/components/camel-servicenow/src/main/docs/servicenow-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-servicenow/src/main/docs/servicenow-component.adoc b/components/camel-servicenow/src/main/docs/servicenow-component.adoc
deleted file mode 100644
index 197ebd9..0000000
--- a/components/camel-servicenow/src/main/docs/servicenow-component.adoc
+++ /dev/null
@@ -1,300 +0,0 @@
-## ServiceNow Component
-
-*Available as of Camel version 2.18*
-
-The ServiceNow component provides access to ServiceNow platform through their REST API.
-
-NOTE: From Camel 2.18.1 the component supports multiple version of ServiceNow platform with default to Helsinki. Supported version are <<ServiceNow-Fuji>> and <<ServiceNow-Helsinki>>
-
-
-Maven users will need to add the following dependency to their pom.xml
-for this component:
-
-[source,java]
--------------------------------------------------
-    <dependency>
-        <groupId>org.apache.camel</groupId>
-        <artifactId>camel-servicenow</artifactId>
-        <version>${camel-version}</version>
-    </dependency>
--------------------------------------------------
-
-### URI format
-
-[source,java]
----------------------------------------
-    servicenow://instanceName?[options]
----------------------------------------
-
-### Options
-
-
-// component options: START
-The ServiceNow component supports 10 options which are listed below.
-
-
-
-[width="100%",cols="2,5,^1,2",options="header"]
-|=======================================================================
-| Name | Description | Default | Type
-| **instanceName** (advanced) | The ServiceNow instance name |  | String
-| **configuration** (advanced) | The ServiceNow default configuration |  | ServiceNowConfiguration
-| **apiUrl** (producer) | The ServiceNow REST API url |  | String
-| **userName** (security) | ServiceNow user account name |  | String
-| **password** (security) | ServiceNow account password |  | String
-| **oauthClientId** (security) | OAuth2 ClientID |  | String
-| **oauthClientSecret** (security) | OAuth2 ClientSecret |  | String
-| **oauthTokenUrl** (security) | OAuth token Url |  | String
-| **useGlobalSslContext Parameters** (security) | Enable usage of global SSL context parameters. | false | boolean
-| **resolveProperty Placeholders** (advanced) | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. | true | boolean
-|=======================================================================
-// component options: END
-
-
-// endpoint options: START
-The ServiceNow endpoint is configured using URI syntax:
-
-    servicenow:instanceName
-
-with the following path and query parameters:
-
-#### Path Parameters (1 parameters):
-
-[width="100%",cols="2,5,^1,2",options="header"]
-|=======================================================================
-| Name | Description | Default | Type
-| **instanceName** | *Required* The ServiceNow instance name |  | String
-|=======================================================================
-
-#### Query Parameters (41 parameters):
-
-[width="100%",cols="2,5,^1,2",options="header"]
-|=======================================================================
-| Name | Description | Default | Type
-| **display** (producer) | Set this parameter to true to return only scorecards where the indicator Display field is selected. Set this parameter to all to return scorecards with any Display field value. This parameter is true by default. | true | String
-| **displayValue** (producer) | Return the display value (true) actual value (false) or both (all) for reference fields (default: false) | false | String
-| **excludeReferenceLink** (producer) | True to exclude Table API links for reference fields (default: false) |  | Boolean
-| **favorites** (producer) | Set this parameter to true to return only scorecards that are favorites of the querying user. |  | Boolean
-| **includeAggregates** (producer) | Set this parameter to true to always return all available aggregates for an indicator including when an aggregate has already been applied. If a value is not specified this parameter defaults to false and returns no aggregates. |  | Boolean
-| **includeAvailableAggregates** (producer) | Set this parameter to true to return all available aggregates for an indicator when no aggregate has been applied. If a value is not specified this parameter defaults to false and returns no aggregates. |  | Boolean
-| **includeAvailableBreakdowns** (producer) | Set this parameter to true to return all available breakdowns for an indicator. If a value is not specified this parameter defaults to false and returns no breakdowns. |  | Boolean
-| **includeScoreNotes** (producer) | Set this parameter to true to return all notes associated with the score. The note element contains the note text as well as the author and timestamp when the note was added. |  | Boolean
-| **includeScores** (producer) | Set this parameter to true to return all scores for a scorecard. If a value is not specified this parameter defaults to false and returns only the most recent score value. |  | Boolean
-| **inputDisplayValue** (producer) | True to set raw value of input fields (default: false) |  | Boolean
-| **key** (producer) | Set this parameter to true to return only scorecards for key indicators. |  | Boolean
-| **models** (producer) | Defines both request and response models |  | String
-| **perPage** (producer) | Enter the maximum number of scorecards each query can return. By default this value is 10 and the maximum is 100. | 10 | Integer
-| **release** (producer) | The ServiceNow release to target default to Helsinki See https://docs.servicenow.com | HELSINKI | ServiceNowRelease
-| **requestModels** (producer) | Defines the request model |  | String
-| **resource** (producer) | The default resource can be overridden by header CamelServiceNowResource |  | String
-| **responseModels** (producer) | Defines the response model |  | String
-| **sortBy** (producer) | Specify the value to use when sorting results. By default queries sort records by value. |  | String
-| **sortDir** (producer) | Specify the sort direction ascending or descending. By default queries sort records in descending order. Use sysparm_sortdir=asc to sort in ascending order. |  | String
-| **suppressAutoSysField** (producer) | True to suppress auto generation of system fields (default: false) |  | Boolean
-| **suppressPaginationHeader** (producer) | Set this value to true to remove the Link header from the response. The Link header allows you to request additional pages of data when the number of records matching your query exceeds the query limit |  | Boolean
-| **table** (producer) | The default table can be overridden by header CamelServiceNowTable |  | String
-| **target** (producer) | Set this parameter to true to return only scorecards that have a target. |  | Boolean
-| **topLevelOnly** (producer) | Gets only those categories whose parent is a catalog. |  | Boolean
-| **apiVersion** (advanced) | The ServiceNow REST API version default latest |  | String
-| **httpClientPolicy** (advanced) | To configure http-client |  | HTTPClientPolicy
-| **mapper** (advanced) | Sets Jackson's ObjectMapper to use for request/reply |  | ObjectMapper
-| **proxyAuthorizationPolicy** (advanced) | To configure proxy authentication |  | ProxyAuthorization Policy
-| **retrieveTargetRecordOn Import** (advanced) | Set this parameter to true to retrieve the target record when using import set api. The import set result is then replaced by the target record | false | Boolean
-| **synchronous** (advanced) | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). | false | boolean
-| **proxyHost** (proxy) | The proxy host name |  | String
-| **proxyPort** (proxy) | The proxy port number |  | Integer
-| **apiUrl** (security) | The ServiceNow REST API url |  | String
-| **oauthClientId** (security) | OAuth2 ClientID |  | String
-| **oauthClientSecret** (security) | OAuth2 ClientSecret |  | String
-| **oauthTokenUrl** (security) | OAuth token Url |  | String
-| **password** (security) | *Required* ServiceNow account password MUST be provided |  | String
-| **proxyPassword** (security) | Password for proxy authentication |  | String
-| **proxyUserName** (security) | Username for proxy authentication |  | String
-| **sslContextParameters** (security) | To configure security using SSLContextParameters. See http://camel.apache.org/camel-configuration-utilities.html |  | SSLContextParameters
-| **userName** (security) | *Required* ServiceNow user account name MUST be provided |  | String
-|=======================================================================
-// endpoint options: END
-
-
-
-### Headers
-
-[width="100%",cols="10%,10%,10%,10%,60%",options="header",]
-|===
-|Name |Type |ServiceNow API Parameter |Endpoint option |Description
-|CamelServiceNowResource |String | - | - | The resource to access
-|CamelServiceNowAction |String | - | - | The action to perform
-|CamelServiceNowActionSubject | - | - | String |The subject to which the action should be applied
-|CamelServiceNowModel |Class | - | - | The data model
-|CamelServiceNowRequestModel |Class | - | - | The request data model
-|CamelServiceNowResponseModel |Class | - | - | The response data model
-|CamelServiceNowOffsetNext | - | - | - | -
-|CamelServiceNowOffsetPrev | - | - | - | -
-|CamelServiceNowOffsetFirst | - | - | - | -
-|CamelServiceNowOffsetLast | - | - | - | -
-|CamelServiceNowContentType | - | - | - | -
-|CamelServiceNowContentEncoding | - | - | - | -
-|CamelServiceNowContentMeta | - | - | - | -
-|CamelServiceNowSysId |String | sys_id | - | -
-|CamelServiceNowUserSysId |String | user_sysid | - | -
-|CamelServiceNowUserId |String | user_id | - | -
-|CamelServiceNowCartItemId |String | cart_item_id | - | -
-|CamelServiceNowFileName |String | file_name | - | -
-|CamelServiceNowTable |String | table_name | - | -
-|CamelServiceNowTableSysId |String | table_sys_id | - | -
-|CamelServiceNowEncryptionContext | String | encryption_context | - | -
-|CamelServiceNowCategory | String | sysparm_category  | - | -
-|CamelServiceNowType |String | sysparm_type | - | -
-|CamelServiceNowCatalog | String | sysparm_catalog | - | -
-|CamelServiceNowQuery |String | sysparm_query | - | -
-|CamelServiceNowDisplayValue |String | sysparm_display_value | displayValue  | -
-|CamelServiceNowInputDisplayValue |Boolean | sysparm_input_display_value | inputDisplayValue  | -
-|CamelServiceNowExcludeReferenceLink |Boolean | sysparm_exclude_reference_link | excludeReferenceLink  | -
-|CamelServiceNowFields |String | sysparm_fields | - | -
-|CamelServiceNowLimit |Integer | sysparm_limit | - | -
-|CamelServiceNowText | String | sysparm_text | - | -
-|CamelServiceNowOffset | Integer | sysparm_offset | - | -
-|CamelServiceNowView |String | sysparm_view | - | -
-|CamelServiceNowSuppressAutoSysField |Boolean | sysparm_suppress_auto_sys_field | suppressAutoSysField | -
-|CamelServiceNowSuppressPaginationHeader | Booleab | sysparm_suppress_pagination_header | suppressPaginationHeader | -
-|CamelServiceNowMinFields |String | sysparm_min_fields | - | -
-|CamelServiceNowMaxFields |String | sysparm_max_fields | - | -
-|CamelServiceNowSumFields |String | sysparm_sum_fields | - | -
-|CamelServiceNowAvgFields |String | sysparm_avg_fields | - | -
-|CamelServiceNowCount |Boolean | sysparm_count | - | -
-|CamelServiceGroupBy |String | sysparm_group_by | - | -
-|CamelServiceOrderBy |String | sysparm_order_by | - | -
-|CamelServiceHaving |String | sysparm_having | - | -
-|CamelServiceNowUUID |String | sysparm_uuid | - | -
-|CamelServiceNowBreakdown| String| sysparm_breakdown | - | -
-|CamelServiceNowIncludeScores| Boolean | sysparm_include_scores | includeScores | -
-|CamelServiceNowIncludeScoreNotes | Boolean | sysparm_include_score_notes | includeScoreNotes | -
-|CamelServiceNowIncludeAggregates | Boolean | sysparm_include_aggregates | includeAggregates | -
-|CamelServiceNowIncludeAvailableBreakdowns | Boolean | sysparm_include_available_breakdowns | includeAvailableBreakdowns | -
-|CamelServiceNowIncludeAvailableAggregates | Boolean | sysparm_include_available_aggregates | includeAvailableAggregates | -
-|CamelServiceNowFavorites | Boolean | sysparm_favorites | favorites | -
-|CamelServiceNowKey  | Boolean | sysparm_key | key | -
-|CamelServiceNowTarget | Boolean | sysparm_target | target | -
-|CamelServiceNowDisplay | String | sysparm_display | display | -
-|CamelServiceNowPerPage | Integer | sysparm_per_page | perPage | -
-|CamelServiceNowSortBy | String | sysparm_sortby | sortBy | -
-|CamelServiceNowSortDir | String | sysparm_sortdit | sortDir | -
-|CamelServiceNowContains | String | sysparm_contains | - | -
-|CamelServiceNowTags | String | sysparm_tags | - | -
-|CamelServiceNowPage | String | sysparm_page | - | -
-|CamelServiceNowElementsFilter | String | sysparm_elements_filter | - | -
-|CamelServiceNowBreakdownRelation | String | sysparm_breakdown_relation | - | -
-|CamelServiceNowDataSource | String | sysparm_data_source | - | -
-|CamelServiceNowTopLevelOnly | Boolean | sysparm_top_level_only | topLevelOnly | -
-|CamelServiceNowApiVersion | String | - | - | The REST API version
-|CamelServiceNowResponseMeta | Map | - | - | Meta data provided along with a response
-|===
-
-[[ServiceNow-Fuji]]
-[cols="10%a,10%a,10%a,70%a", options="header"]
-.API Mapping
-|===
-| CamelServiceNowResource | CamelServiceNowAction | Method | API URI
-1.5+<.^|TABLE
-| RETRIEVE | GET | /api/now/v1/table/{table_name}/{sys_id}
-| CREATE | POST | /api/now/v1/table/{table_name}
-| MODIFY | PUT | /api/now/v1/table/{table_name}/{sys_id}
-| DELETE | DELETE | /api/now/v1/table/{table_name}/{sys_id}
-| UPDATE | PATCH | /api/now/v1/table/{table_name}/{sys_id}
-
-| AGGREGATE
-| RETRIEVE | GET | /api/now/v1/stats/{table_name}
-
-1.2+<.^|IMPORT
-| RETRIEVE | GET | /api/now/import/{table_name}/{sys_id}
-| CREATE | POST | /api/now/import/{table_name}
-|===
-
-NOTE: link:http://wiki.servicenow.com/index.php?title=REST_API#Available_APIs[Fuji REST API Documentation]
-
-[[ServiceNow-Helsinki]]
-[cols="10%a,10%a,10%a,10%a,60%a", options="header"]
-.API Mapping
-|===
-| CamelServiceNowResource | CamelServiceNowAction | CamelServiceNowActionSubject | Method | API URI
-1.5+<.^|TABLE
-| RETRIEVE | | GET | /api/now/v1/table/{table_name}/{sys_id}
-| CREATE | | POST | /api/now/v1/table/{table_name}
-| MODIFY | | PUT | /api/now/v1/table/{table_name}/{sys_id}
-| DELETE | | DELETE | /api/now/v1/table/{table_name}/{sys_id}
-| UPDATE | | PATCH | /api/now/v1/table/{table_name}/{sys_id}
-
-| AGGREGATE
-| RETRIEVE | | GET | /api/now/v1/stats/{table_name}
-
-1.2+<.^|IMPORT
-| RETRIEVE | | GET | /api/now/import/{table_name}/{sys_id}
-| CREATE | | POST | /api/now/import/{table_name}
-
-1.4+<.^|ATTACHMENT
-| RETRIEVE | | GET | /api/now/api/now/attachment/{sys_id}
-| CONTENT | | GET | /api/now/attachment/{sys_id}/file
-| UPLOAD | | POST | /api/now/api/now/attachment/file
-| DELETE | | DELETE | /api/now/attachment/{sys_id}
-
-| SCORECARDS
-| RETRIEVE | PERFORMANCE_ANALYTICS | GET | /api/now/pa/scorecards
-
-1.2+<.^|MISC
-| RETRIEVE | USER_ROLE_INHERITANCE | GET | /api/global/user_role_inheritance
-| CREATE | IDENTIFY_RECONCILE | POST | /api/now/identifyreconcile
-
-1.2+<.^|SERVICE_CATALOG
-| RETRIEVE | | GET | /sn_sc/servicecatalog/catalogs/{sys_id}
-| RETRIEVE | CATEGORIES |  GET | /sn_sc/servicecatalog/catalogs/{sys_id}/categories
-
-1.5+<.^|SERVICE_CATALOG_ITEMS
-| RETRIEVE | | GET | /sn_sc/servicecatalog/items/{sys_id}
-| RETRIEVE | SUBMIT_GUIDE | POST | /sn_sc/servicecatalog/items/{sys_id}/submit_guide
-| RETRIEVE | CHECKOUT_GUIDE | POST | /sn_sc/servicecatalog/items/{sys_id}/checkout_guide
-| CREATE | SUBJECT_CART | POST | /sn_sc/servicecatalog/items/{sys_id}/add_to_cart
-| CREATE | SUBJECT_PRODUCER | POST | /sn_sc/servicecatalog/items/{sys_id}/submit_producer
-
-1.6+<.^|SERVICE_CATALOG_CARTS
-| RETRIEVE | | GET | /sn_sc/servicecatalog/cart
-| RETRIEVE | DELIVERY_ADDRESS | GET | /sn_sc/servicecatalog/cart/delivery_address/{user_id}
-| RETRIEVE | CHECKOUT | POST | /sn_sc/servicecatalog/cart/checkout
-| UPDATE | | POST | /sn_sc/servicecatalog/cart/{cart_item_id}
-| UPDATE | CHECKOUT | POST | /sn_sc/servicecatalog/cart/submit_order
-| DELETE | | DELETE | /sn_sc/servicecatalog/cart/{sys_id}/empty
-
-| SERVICE_CATALOG_CATEGORIES
-| RETRIEVE | | GET | /sn_sc/servicecatalog/categories/{sys_id}
-
-|===
-
-NOTE: https://docs.servicenow.com/bundle/helsinki-servicenow-platform/page/integrate/inbound-rest/reference/r_RESTResources.html[Helsinki REST API Documentation]
-
-### Usage examples:
- 
-{% raw %}
-[source,java]
-.Retrieve 10 Incidents
--------------------------------------------------------------------------------------------------------------------
-context.addRoutes(new RouteBuilder() {
-    public void configure() {
-       from("direct:servicenow")
-           .to("servicenow:{{env:SERVICENOW_INSTANCE}}"
-               + "?userName={{env:SERVICENOW_USERNAME}}"
-               + "&password={{env:SERVICENOW_PASSWORD}}"
-               + "&oauthClientId={{env:SERVICENOW_OAUTH2_CLIENT_ID}}"
-               + "&oauthClientSecret={{env:SERVICENOW_OAUTH2_CLIENT_SECRET}}"
-           .to("mock:servicenow");
-    }
-}); 
-
-FluentProducerTemplate.on(context)
-    .withHeader(ServiceNowConstants.RESOURCE, "table")
-    .withHeader(ServiceNowConstants.ACTION, ServiceNowConstants.ACTION_RETRIEVE)
-    .withHeader(ServiceNowConstants.SYSPARM_LIMIT.getId(), "10")
-    .withHeader(ServiceNowConstants.TABLE, "incident")
-    .withHeader(ServiceNowConstants.MODEL, Incident.class)
-    .to("direct:servicenow")
-    .send();
--------------------------------------------------------------------------------------------------------------------
-{% endraw %}

http://git-wip-us.apache.org/repos/asf/camel/blob/109da7c9/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/AbstractServiceNowProcessor.java
----------------------------------------------------------------------
diff --git a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/AbstractServiceNowProcessor.java b/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/AbstractServiceNowProcessor.java
deleted file mode 100644
index 1ae25af..0000000
--- a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/AbstractServiceNowProcessor.java
+++ /dev/null
@@ -1,293 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.servicenow;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.Response;
-
-import com.fasterxml.jackson.databind.JavaType;
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.apache.camel.Exchange;
-import org.apache.camel.Message;
-import org.apache.camel.Processor;
-import org.apache.camel.util.ObjectHelper;
-
-public abstract class AbstractServiceNowProcessor implements Processor {
-
-    protected final ServiceNowEndpoint endpoint;
-    protected final ServiceNowConfiguration config;
-    protected final ObjectMapper mapper;
-    protected final ServiceNowClient client;
-
-    // Cache for JavaTypes
-    private final JavaTypeCache javaTypeCache;
-    private final List<ServiceNowDispatcher> dispatchers;
-
-    protected AbstractServiceNowProcessor(ServiceNowEndpoint endpoint) throws Exception {
-        this.javaTypeCache = new JavaTypeCache();
-        this.endpoint = endpoint;
-        this.config = endpoint.getConfiguration();
-        this.mapper = ObjectHelper.notNull(config.getMapper(), "mapper");
-        this.client = new ServiceNowClient(endpoint.getCamelContext(), config);
-        this.dispatchers = new ArrayList<>();
-    }
-
-    protected AbstractServiceNowProcessor setBodyAndHeaders(Message message, Class<?> responseModel, Response response) throws Exception {
-        if (response != null) {
-            setHeaders(message, responseModel, response);
-            setBody(message, responseModel, response);
-        }
-
-        return this;
-    }
-
-    @Override
-    public void process(Exchange exchange) throws Exception {
-        final ServiceNowDispatcher dispatcher = findDispatcher(exchange);
-
-        if (dispatcher != null) {
-            dispatcher.process(exchange);
-        } else {
-            throw new IllegalArgumentException("Unable to process exchange");
-        }
-    }
-
-    // *********************************
-    // Header
-    // *********************************
-
-    protected AbstractServiceNowProcessor setHeaders(Message message, Class<?> responseModel, Response response) throws Exception {
-        ServiceNowHelper.findOffsets(response, (k, v) -> message.setHeader(k, v));
-
-        String attachmentMeta = response.getHeaderString(ServiceNowConstants.ATTACHMENT_META_HEADER);
-        if (ObjectHelper.isNotEmpty(attachmentMeta)) {
-            message.setHeader(
-                ServiceNowConstants.CONTENT_META,
-                mapper.readValue(attachmentMeta, Map.class)
-            );
-        }
-
-        copyHeader(response, HttpHeaders.CONTENT_TYPE, message, ServiceNowConstants.CONTENT_TYPE);
-        copyHeader(response, HttpHeaders.CONTENT_ENCODING, message, ServiceNowConstants.CONTENT_ENCODING);
-
-        if (responseModel != null) {
-            message.getHeaders().putIfAbsent(ServiceNowConstants.MODEL, responseModel.getName());
-            message.getHeaders().putIfAbsent(ServiceNowConstants.RESPONSE_MODEL, responseModel.getName());
-        }
-
-        return this;
-    }
-
-    // *********************************
-    // Body
-    // *********************************
-
-    protected AbstractServiceNowProcessor setBody(Message message, Class<?> model, Response response) throws Exception {
-        if (message != null && response != null) {
-            if (ObjectHelper.isNotEmpty(response.getHeaderString(HttpHeaders.CONTENT_TYPE))) {
-
-                JsonNode root = response.readEntity(JsonNode.class);
-                Map<String, String> responseAttributes = null;
-
-                if (root != null) {
-                    Iterator<Map.Entry<String, JsonNode>> fields = root.fields();
-                    while (fields.hasNext()) {
-                        final Map.Entry<String, JsonNode> entry = fields.next();
-                        final String key = entry.getKey();
-                        final JsonNode node = entry.getValue();
-
-                        if (ObjectHelper.equal("result", key, true)) {
-                            Object body = unwrap(node, model);
-                            if (body != null) {
-                                message.setHeader(ServiceNowConstants.RESPONSE_TYPE, body.getClass());
-                                message.setBody(body);
-                            }
-                        } else {
-                            if (responseAttributes == null) {
-                                responseAttributes = new HashMap<>();
-                            }
-
-                            responseAttributes.put(key, node.textValue());
-                        }
-                    }
-
-                    if (responseAttributes != null) {
-                        message.setHeader(ServiceNowConstants.RESPONSE_META, responseAttributes);
-                    }
-                }
-            }
-        }
-
-        return this;
-    }
-
-    protected AbstractServiceNowProcessor validateBody(Message message, Class<?> model) {
-        return validateBody(message.getBody(), model);
-    }
-
-    protected AbstractServiceNowProcessor validateBody(Object body, Class<?> model) {
-        ObjectHelper.notNull(body, "body");
-
-        if (!body.getClass().isAssignableFrom(model)) {
-            throw new IllegalArgumentException(
-                "Body is not compatible with model (body=" + body.getClass() + ", model=" + model);
-        }
-
-        return this;
-    }
-
-    protected Object unwrap(JsonNode node, Class<?> model) throws IOException {
-        Object result;
-
-        if (node.isArray()) {
-            if (model.isInstance(Map.class)) {
-                // If the model is a Map, there's no need to use any
-                // specific JavaType to instruct Jackson about the
-                // expected element type
-                result = mapper.treeToValue(node, List.class);
-            } else {
-                result = mapper.readValue(node.traverse(), javaTypeCache.get(model));
-            }
-        } else {
-            result = mapper.treeToValue(node, model);
-        }
-
-        return result;
-    }
-
-    // *********************************
-    // Helpers
-    // *********************************
-
-    protected final void addDispatcher(ServiceNowDispatcher dispatcher) {
-        this.dispatchers.add(dispatcher);
-    }
-
-    protected final void addDispatcher(String action, Processor processor) {
-        addDispatcher(ServiceNowDispatcher.on(action, null, processor));
-    }
-
-    protected final void addDispatcher(String action, String subject, Processor processor) {
-        addDispatcher(ServiceNowDispatcher.on(action, subject, processor));
-    }
-
-    protected final ServiceNowDispatcher findDispatcher(Exchange exchange) {
-        ServiceNowDispatcher dispatcher = null;
-        for (int i = 0; i < dispatchers.size(); i++) {
-            dispatcher = dispatchers.get(i);
-            if (dispatcher.match(exchange)) {
-                return dispatcher;
-            }
-        }
-
-        return null;
-    }
-
-    // *********************************
-    // Helpers
-    // *********************************
-
-    protected Object getRequestParamFromHeader(ServiceNowParam sysParam, Message message) {
-        return message.getHeader(
-            sysParam.getHeader(),
-            sysParam.getDefaultValue(config),
-            sysParam.getType()
-        );
-    }
-
-    protected Object getMandatoryRequestParamFromHeader(ServiceNowParam sysParam, Message message) {
-        return ObjectHelper.notNull(
-            getRequestParamFromHeader(sysParam, message),
-            sysParam.getHeader()
-        );
-    }
-
-    protected void copyHeader(Response from, String fromId, Message to, String toId) {
-        Object fromValue = from.getHeaders().getFirst(fromId);
-        if (ObjectHelper.isNotEmpty(fromValue)) {
-            to.setHeader(toId, fromValue);
-        }
-    }
-
-    protected Class<?> getRequestModel(Message message) {
-        return getRequestModel(message, null);
-    }
-
-    protected Class<?> getRequestModel(Message message, String modelName) {
-        Class<?> model = null;
-
-        if (message != null) {
-            model = message.getHeader(ServiceNowConstants.REQUEST_MODEL, Class.class);
-            if (model == null) {
-                model = message.getHeader(ServiceNowConstants.MODEL, Class.class);
-            }
-        }
-
-        return model != null
-            ? model
-            : ObjectHelper.isEmpty(modelName) ? Map.class : config.getRequestModel(modelName, Map.class);
-    }
-
-    protected Class<?> getResponseModel(Message message) {
-        return getRequestModel(message, null);
-    }
-
-    protected Class<?> getResponseModel(Message message, String modelName) {
-        Class<?> model = null;
-
-        if (message != null) {
-            model = message.getHeader(ServiceNowConstants.RESPONSE_MODEL, Class.class);
-            if (model == null) {
-                model = message.getHeader(ServiceNowConstants.MODEL, Class.class);
-            }
-        }
-
-        return model != null
-            ? model
-            : ObjectHelper.isEmpty(modelName) ? Map.class : config.getResponseModel(modelName, Map.class);
-    }
-
-    protected String getApiVersion(Message message) {
-        return message.getHeader(ServiceNowConstants.API_VERSION, config.getApiVersion(), String.class);
-    }
-
-    protected String getTableName(Message message) {
-        return message.getHeader(ServiceNowParams.PARAM_TABLE_NAME.getHeader(), config.getTable(), String.class);
-    }
-
-    protected String getSysID(Message message) {
-        return message.getHeader(ServiceNowParams.PARAM_SYS_ID.getHeader(), String.class);
-    }
-
-    // *************************************************************************
-    // Use ClassValue to lazy create and cache JavaType
-    // *************************************************************************
-
-    private class JavaTypeCache extends ClassValue<JavaType> {
-        @Override
-        protected JavaType computeValue(Class<?> type) {
-            return mapper.getTypeFactory().constructCollectionType(List.class, type);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/109da7c9/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/AbstractServiceNowProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/AbstractServiceNowProducer.java b/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/AbstractServiceNowProducer.java
deleted file mode 100644
index 0fd23d7..0000000
--- a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/AbstractServiceNowProducer.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.servicenow;
-
-import org.apache.camel.impl.HeaderSelectorProducer;
-
-public abstract class AbstractServiceNowProducer extends HeaderSelectorProducer implements ServiceNowProducer {
-    private final ServiceNowRelease release;
-    private final ServiceNowEndpoint endpoint;
-
-    public AbstractServiceNowProducer(ServiceNowEndpoint endpoint, ServiceNowRelease release) {
-        super(endpoint, ServiceNowConstants.RESOURCE, endpoint.getConfiguration().getResource());
-
-        this.release = release;
-        this.endpoint = endpoint;
-    }
-
-    @Override
-    public ServiceNowRelease getRelease() {
-        return release;
-    }
-
-    protected final ServiceNowConfiguration getConfiguration() {
-        return endpoint.getConfiguration();
-    }
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/109da7c9/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowClient.java
----------------------------------------------------------------------
diff --git a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowClient.java b/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowClient.java
deleted file mode 100644
index 5128797..0000000
--- a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowClient.java
+++ /dev/null
@@ -1,274 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.servicenow;
-
-import java.util.Arrays;
-import java.util.Map;
-import java.util.function.Function;
-import javax.net.ssl.SSLContext;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-
-import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
-import org.apache.camel.CamelContext;
-import org.apache.camel.Message;
-import org.apache.camel.component.servicenow.annotations.ServiceNowSysParm;
-import org.apache.camel.component.servicenow.auth.AuthenticationRequestFilter;
-import org.apache.camel.util.ObjectHelper;
-import org.apache.camel.util.jsse.SSLContextParameters;
-import org.apache.cxf.configuration.jsse.TLSClientParameters;
-import org.apache.cxf.configuration.security.ProxyAuthorizationPolicy;
-import org.apache.cxf.jaxrs.client.WebClient;
-import org.apache.cxf.transport.http.HTTPConduit;
-import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public final class ServiceNowClient {
-    private static final Logger LOGGER = LoggerFactory.getLogger(ServiceNowClient.class);
-
-    private final CamelContext camelContext;
-    private final ServiceNowConfiguration configuration;
-    private final WebClient client;
-
-    ServiceNowClient(CamelContext camelContext, ServiceNowConfiguration configuration) throws Exception {
-        this.camelContext = camelContext;
-        this.configuration = configuration;
-        this.client = WebClient.create(
-            configuration.getApiUrl(),
-            Arrays.asList(
-                new AuthenticationRequestFilter(configuration),
-                new JacksonJsonProvider(configuration.getMapper())
-            ),
-            true
-        );
-
-        configureRequestContext(camelContext, configuration, client);
-        configureTls(camelContext, configuration, client);
-        configureHttpClientPolicy(camelContext, configuration, client);
-        configureProxyAuthorizationPolicy(camelContext, configuration, client);
-    }
-
-    public ServiceNowClient types(MediaType type) {
-        return types(type, type);
-    }
-
-    public ServiceNowClient types(MediaType accept, MediaType type) {
-        client.accept(accept);
-        client.type(type);
-        return this;
-    }
-
-    public ServiceNowClient path(Object path) {
-        if (ObjectHelper.isNotEmpty(path)) {
-            client.path(path);
-        }
-
-        return this;
-    }
-
-    public ServiceNowClient type(MediaType ct) {
-        client.type(ct);
-        return this;
-    }
-
-    public ServiceNowClient type(String type) {
-        client.type(type);
-        return this;
-    }
-
-    public ServiceNowClient accept(MediaType... types) {
-        client.accept(types);
-        return this;
-    }
-
-    public ServiceNowClient accept(String... types) {
-        client.accept(types);
-        return this;
-    }
-
-    public ServiceNowClient query(String name, Object... values) {
-        client.query(name, values);
-        return this;
-    }
-
-    public ServiceNowClient queryF(String name, String format, Object... values) {
-        client.query(name, String.format(format, values));
-        return this;
-    }
-
-    public ServiceNowClient query(ServiceNowParam param, Message message) {
-        Object value = param.getHeaderValue(message, configuration);
-        if (value != null) {
-            client.query(param.getId(), value);
-        }
-
-        return this;
-    }
-
-    public ServiceNowClient query(Class<?> model) {
-        if (model != null) {
-            String name;
-            String value;
-
-            for (ServiceNowSysParm parm : model.getAnnotationsByType(ServiceNowSysParm.class)) {
-                name = parm.name();
-                value = parm.value();
-
-                // SysParms defined on model have precedence and replace query param
-                // with same name set via Message headers.
-                if (ObjectHelper.isNotEmpty(name) && ObjectHelper.isNotEmpty(value)) {
-                    LOGGER.debug("Replace query param {} with value {}", name, value);
-                    client.replaceQueryParam(name, value);
-                }
-            }
-        }
-
-        return this;
-    }
-
-    public Response invoke(String httpMethod) throws Exception {
-        return invoke(client, httpMethod, null);
-    }
-
-    public Response invoke(String httpMethod, Object body) throws Exception {
-        return invoke(client, httpMethod, body);
-    }
-
-    public <T> T trasform(String httpMethod, Function<Response, T> function) throws Exception {
-        return function.apply(invoke(client, httpMethod, null));
-    }
-
-    public <T> T trasform(String httpMethod, Object body, Function<Response, T> function) throws Exception {
-        return function.apply(invoke(client, httpMethod, body));
-    }
-
-    public ServiceNowClient reset() {
-        client.back(true);
-        client.reset();
-        client.resetQuery();
-
-        return this;
-    }
-
-    // *******************************
-    // Helpers
-    // *******************************
-
-    private Response invoke(WebClient client, String httpMethod, Object body) throws Exception {
-        Response response = client.invoke(httpMethod, body);
-        int code = response.getStatus();
-
-        // Only ServiceNow known error status codes are mapped
-        // See http://wiki.servicenow.com/index.php?title=REST_API#REST_Response_HTTP_Status_Codes
-        switch(code) {
-        case 200:
-        case 201:
-        case 204:
-            // Success
-            break;
-        case 400:
-        case 401:
-        case 403:
-        case 404:
-        case 405:
-        case 406:
-        case 415:
-            ServiceNowExceptionModel model = response.readEntity(ServiceNowExceptionModel.class);
-            throw new ServiceNowException(
-                code,
-                model.getStatus(),
-                model.getError().get("message"),
-                model.getError().get("detail")
-            );
-        default:
-            throw new ServiceNowException(
-                code,
-                response.readEntity(Map.class)
-            );
-        }
-
-        return response;
-    }
-
-    private static void configureRequestContext(
-            CamelContext context, ServiceNowConfiguration configuration, WebClient client) throws Exception {
-
-        WebClient.getConfig(client)
-            .getRequestContext()
-            .put("org.apache.cxf.http.header.split", true);
-    }
-
-    private static void configureTls(
-        CamelContext camelContext, ServiceNowConfiguration configuration, WebClient client) throws Exception {
-
-        SSLContextParameters sslContextParams = configuration.getSslContextParameters();
-        if (sslContextParams != null) {
-            HTTPConduit conduit = WebClient.getConfig(client).getHttpConduit();
-            TLSClientParameters tlsClientParams = conduit.getTlsClientParameters();
-            if (tlsClientParams == null) {
-                tlsClientParams = new TLSClientParameters();
-            }
-
-            SSLContext sslContext = sslContextParams.createSSLContext(camelContext);
-            tlsClientParams.setSSLSocketFactory(sslContext.getSocketFactory());
-
-            conduit.setTlsClientParameters(tlsClientParams);
-        }
-    }
-
-    private static void configureHttpClientPolicy(
-            CamelContext context, ServiceNowConfiguration configuration, WebClient client) throws Exception {
-
-        HTTPClientPolicy httpPolicy = configuration.getHttpClientPolicy();
-        if (httpPolicy == null) {
-            String host = configuration.getProxyHost();
-            Integer port = configuration.getProxyPort();
-
-            if (host != null && port != null) {
-                httpPolicy = new HTTPClientPolicy();
-                httpPolicy.setProxyServer(host);
-                httpPolicy.setProxyServerPort(port);
-            }
-        }
-
-        if (httpPolicy != null) {
-            WebClient.getConfig(client).getHttpConduit().setClient(httpPolicy);
-        }
-    }
-
-    private static void configureProxyAuthorizationPolicy(
-            CamelContext context, ServiceNowConfiguration configuration, WebClient client) throws Exception {
-
-        ProxyAuthorizationPolicy proxyPolicy = configuration.getProxyAuthorizationPolicy();
-        if (proxyPolicy == null) {
-            String username = configuration.getProxyUserName();
-            String password = configuration.getProxyPassword();
-
-            if (username != null && password != null) {
-                proxyPolicy = new ProxyAuthorizationPolicy();
-                proxyPolicy.setAuthorizationType("Basic");
-                proxyPolicy.setUserName(username);
-                proxyPolicy.setPassword(password);
-            }
-        }
-
-        if (proxyPolicy != null) {
-            WebClient.getConfig(client).getHttpConduit().setProxyAuthorization(proxyPolicy);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/109da7c9/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowComponent.java b/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowComponent.java
deleted file mode 100644
index c9cbb89..0000000
--- a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowComponent.java
+++ /dev/null
@@ -1,226 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.servicenow;
-
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Map;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.ComponentVerifier;
-import org.apache.camel.Endpoint;
-import org.apache.camel.SSLContextParametersAware;
-import org.apache.camel.VerifiableComponent;
-import org.apache.camel.component.extension.ComponentExtension;
-import org.apache.camel.component.extension.ComponentVerifierExtension;
-import org.apache.camel.component.extension.MetaDataExtension;
-import org.apache.camel.impl.DefaultComponent;
-import org.apache.camel.spi.Metadata;
-import org.apache.camel.util.EndpointHelper;
-import org.apache.camel.util.IntrospectionSupport;
-import org.apache.camel.util.ObjectHelper;
-
-/**
- * Represents the component that manages {@link ServiceNowEndpoint}.
- */
-@Metadata(label = "verifiers", enums = "parameters,connectivity")
-public class ServiceNowComponent extends DefaultComponent implements VerifiableComponent, SSLContextParametersAware {
-    private static final Collection<Class<? extends ComponentExtension>> EXTENSIONS = Arrays.asList(ComponentVerifierExtension.class, MetaDataExtension.class);
-
-    @Metadata(label = "advanced")
-    private String instanceName;
-    @Metadata(label = "advanced")
-    private ServiceNowConfiguration configuration;
-    @Metadata(label = "security", defaultValue = "false")
-    private boolean useGlobalSslContextParameters;
-
-    private ServiceNowComponentVerifierExtension verifierExtension;
-    private ServiceNowMetaDataExtension metaDataExtension;
-
-    public ServiceNowComponent() {
-        this(null);
-    }
-
-    public ServiceNowComponent(CamelContext camelContext) {
-        super(camelContext);
-
-        this.configuration = new ServiceNowConfiguration();
-
-        registerExtension(ServiceNowComponentVerifierExtension::new);
-        registerExtension(ServiceNowMetaDataExtension::new);
-    }
-
-    @Override
-    protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
-        final CamelContext context = getCamelContext();
-        final ServiceNowConfiguration configuration = this.configuration.copy();
-
-        Map<String, Object> models = IntrospectionSupport.extractProperties(parameters, "model.");
-        for (Map.Entry<String, Object> entry : models.entrySet()) {
-            configuration.addModel(
-                entry.getKey(),
-                EndpointHelper.resolveParameter(context, (String)entry.getValue(), Class.class));
-        }
-
-        Map<String, Object> requestModels = IntrospectionSupport.extractProperties(parameters, "requestModel.");
-        for (Map.Entry<String, Object> entry : requestModels.entrySet()) {
-            configuration.addRequestModel(
-                entry.getKey(),
-                EndpointHelper.resolveParameter(context, (String)entry.getValue(), Class.class));
-        }
-
-        Map<String, Object> responseModels = IntrospectionSupport.extractProperties(parameters, "responseModel.");
-        for (Map.Entry<String, Object> entry : responseModels.entrySet()) {
-            configuration.addResponseModel(
-                entry.getKey(),
-                EndpointHelper.resolveParameter(context, (String)entry.getValue(), Class.class));
-        }
-
-        setProperties(configuration, parameters);
-
-        if (ObjectHelper.isEmpty(remaining)) {
-            // If an instance is not set on the endpoint uri, use the one set on
-            // component.
-            remaining = instanceName;
-        }
-
-        String instanceName = getCamelContext().resolvePropertyPlaceholders(remaining);
-        if (!configuration.hasApiUrl()) {
-            configuration.setApiUrl(String.format("https://%s.service-now.com/api", instanceName));
-        }
-        if (!configuration.hasOauthTokenUrl()) {
-            configuration.setOauthTokenUrl(String.format("https://%s.service-now.com/oauth_token.do", instanceName));
-        }
-
-        if (configuration.getSslContextParameters() == null) {
-            configuration.setSslContextParameters(retrieveGlobalSslContextParameters());
-        }
-
-        return new ServiceNowEndpoint(uri, this, configuration, instanceName);
-    }
-
-    public String getInstanceName() {
-        return instanceName;
-    }
-
-    /**
-     * The ServiceNow instance name
-     */
-    public void setInstanceName(String instanceName) {
-        this.instanceName = instanceName;
-    }
-
-    public ServiceNowConfiguration getConfiguration() {
-        return configuration;
-    }
-
-    /**
-     * The ServiceNow default configuration
-     */
-    public void setConfiguration(ServiceNowConfiguration configuration) {
-        this.configuration = configuration;
-    }
-
-    public String getApiUrl() {
-        return configuration.getApiUrl();
-    }
-
-    /**
-     * The ServiceNow REST API url
-     */
-    public void setApiUrl(String apiUrl) {
-        configuration.setApiUrl(apiUrl);
-    }
-
-    public String getUserName() {
-        return configuration.getUserName();
-    }
-
-    /**
-     * ServiceNow user account name
-     */
-    @Metadata(label = "security", secret = true)
-    public void setUserName(String userName) {
-        configuration.setUserName(userName);
-    }
-
-    public String getPassword() {
-        return configuration.getPassword();
-    }
-
-    /**
-     * ServiceNow account password
-     */
-    @Metadata(label = "security", secret = true)
-    public void setPassword(String password) {
-        configuration.setPassword(password);
-    }
-
-    public String getOauthClientId() {
-        return configuration.getOauthClientId();
-    }
-
-    /**
-     * OAuth2 ClientID
-     */
-    @Metadata(label = "security", secret = true)
-    public void setOauthClientId(String oauthClientId) {
-        configuration.setOauthClientId(oauthClientId);
-    }
-
-    public String getOauthClientSecret() {
-        return configuration.getOauthClientSecret();
-    }
-
-    /**
-     * OAuth2 ClientSecret
-     */
-    @Metadata(label = "security", secret = true)
-    public void setOauthClientSecret(String oauthClientSecret) {
-        configuration.setOauthClientSecret(oauthClientSecret);
-    }
-
-    public String getOauthTokenUrl() {
-        return configuration.getOauthTokenUrl();
-    }
-
-    /**
-     * OAuth token Url
-     */
-    @Metadata(label = "security", secret = true)
-    public void setOauthTokenUrl(String oauthTokenUrl) {
-        configuration.setOauthTokenUrl(oauthTokenUrl);
-    }
-
-    @Override
-    public boolean isUseGlobalSslContextParameters() {
-        return this.useGlobalSslContextParameters;
-    }
-
-    /**
-     * Enable usage of global SSL context parameters.
-     */
-    @Override
-    public void setUseGlobalSslContextParameters(boolean useGlobalSslContextParameters) {
-        this.useGlobalSslContextParameters = useGlobalSslContextParameters;
-    }
-
-    @Override
-    public ComponentVerifier getVerifier() {
-        return (scope, parameters) -> getExtension(ComponentVerifierExtension.class).orElseThrow(UnsupportedOperationException::new).verify(scope, parameters);
-    }
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/109da7c9/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowComponentVerifierExtension.java
----------------------------------------------------------------------
diff --git a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowComponentVerifierExtension.java b/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowComponentVerifierExtension.java
deleted file mode 100644
index 0422238..0000000
--- a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowComponentVerifierExtension.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.servicenow;
-
-import java.util.Map;
-import javax.ws.rs.HttpMethod;
-import javax.ws.rs.core.MediaType;
-
-import org.apache.camel.component.extension.verifier.DefaultComponentVerifierExtension;
-import org.apache.camel.component.extension.verifier.NoSuchOptionException;
-import org.apache.camel.component.extension.verifier.ResultBuilder;
-import org.apache.camel.component.extension.verifier.ResultErrorBuilder;
-
-final class ServiceNowComponentVerifierExtension extends DefaultComponentVerifierExtension {
-
-    ServiceNowComponentVerifierExtension() {
-        super("servicenow");
-    }
-
-    // *********************************
-    // Parameters validation
-    // *********************************
-
-    @Override
-    protected Result verifyParameters(Map<String, Object> parameters) {
-        ResultBuilder builder = ResultBuilder.withStatusAndScope(Result.Status.OK, Scope.PARAMETERS);
-
-        // Validate using the catalog
-        super.verifyParametersAgainstCatalog(builder, parameters);
-
-        return builder.build();
-    }
-
-    // *********************************
-    // Connectivity validation
-    // *********************************
-
-    @Override
-    protected Result verifyConnectivity(Map<String, Object> parameters) {
-        // Default is success
-        ResultBuilder builder = ResultBuilder.withStatusAndScope(Result.Status.OK, Scope.CONNECTIVITY);
-
-        try {
-            // Load ServiceNow Configuration
-            ServiceNowConfiguration configuration = new ServiceNowConfiguration();
-            setProperties(configuration, parameters);
-
-            String instanceName = getMandatoryOption(parameters, "instanceName", String.class);
-            String tableName = configuration.getTable() != null ? configuration.getTable() : "incident";
-
-            // Configure Api and OAuthToken ULRs using instanceName
-            if (!configuration.hasApiUrl()) {
-                configuration.setApiUrl(String.format("https://%s.service-now.com/api", instanceName));
-            }
-            if (!configuration.hasOauthTokenUrl()) {
-                configuration.setOauthTokenUrl(String.format("https://%s.service-now.com/oauth_token.do", instanceName));
-            }
-
-            new ServiceNowClient(getCamelContext(), configuration)
-                .types(MediaType.APPLICATION_JSON_TYPE)
-                .path("now")
-                .path(configuration.getApiVersion())
-                .path("table")
-                .path(tableName)
-                .query(ServiceNowParams.SYSPARM_LIMIT.getId(), 1L)
-                .invoke(HttpMethod.GET);
-        } catch (NoSuchOptionException e) {
-            builder.error(
-                ResultErrorBuilder.withMissingOption(e.getOptionName()).build()
-            );
-        } catch (ServiceNowException e) {
-            ResultErrorBuilder errorBuilder = ResultErrorBuilder.withException(e)
-                .detail(VerificationError.HttpAttribute.HTTP_CODE, e.getCode())
-                .detail("servicenow_error_message", e.getMessage())
-                .detail("servicenow_error_status", e.getStatus())
-                .detail("servicenow_error_detail", e.getDetail());
-
-            if (e.getCode() == 401) {
-                errorBuilder.code(VerificationError.StandardCode.AUTHENTICATION);
-                errorBuilder.parameterKey("userName");
-                errorBuilder.parameterKey("password");
-                errorBuilder.parameterKey("oauthClientId");
-                errorBuilder.parameterKey("oauthClientSecret");
-            }
-
-            builder.error(errorBuilder.build());
-        } catch (Exception e) {
-            builder.error(
-                ResultErrorBuilder.withException(e).build()
-            );
-        }
-
-        return builder.build();
-    }
-}