- Eclipse installed with SAP Cloud Platform Tools plugins
- JDK 1.7 is available as an Installed JRE in Windows->Preferences->Java->Installed JREs
- SAP Cloud Platform SDK for Java Web Tomcat 7 is available as a runtime environment Windows->Preferences->Server-> Runtime Environments
- Configured destinations for connecting to the Concur API
##What is it?
This is a sample showing how you can connect to the Concur API and get the travel itineraries for the people in your company.
Step 1: Clone the Git repository
Step 2: Import the project as a Maven project into your eclipse workspace. Note - Make sure the project uses JDK 1.7. This can be configured in the project build path
Step 3: Run Maven goal clean install
Step 4: If you are deploying locally then see Creating and Deleting Destinations Locally.
If you are deploying on the Cloud see Creating and Deleting Destinations on the Cloud.
Step 5: Build and deploy your application. Make sure you selected the Java Web Tomcat 7 as the runtime environment
The sample uses two HTTP Connectivity Destinations - one for authentication and one for the API. Prior to running the project you must have the two destinations configured as described in the [SAP Cloud Platform Destinations Documentation] (https://help.sap.com/viewer/cca91383641e40ffbe03bdc78f00f681/Cloud/en-US/e4f1d97cbb571014a247d10f9f9a685d.html)
The HTTP API Destination should look like this:
Name=concur-api
Type=HTTP
URL=https://www.concursolutions.com/api
ProxyType=Internet
TrustAll=true
CloudConnectorVersion=2
Authentication=NoAuthentication
The HTTP Auth Destination should look like this:
Name=concur-auth
Type=HTTP
URL=https://www.concursolutions.com/net2/oauth2/accesstoken.ashx
ProxyType=Internet
TrustAll=true
Description=OAuth Token
Authentication=BasicAuthentication
CloudConnectorVersion=2
User=your user email
Password=your user password
X-ConsumerKey=your consumer key
After deployment the application is accessible on the following URL:
https://host:port/com.sap.hana.cloud.samples.concur.travel/travel
You should see either an empty ItineraryInfoList or a list containing your travel itineraries.
- SAP Cloud Platform Documentation - https://help.sap.com/viewer/product/CP/Cloud/en-US
- Concur API - https://developer.concur.com/api-reference/index.html
- SCN Blog post - Here
Copyright 2015 SAP AG
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or 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.