Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
Added SOAP message client
Browse files Browse the repository at this point in the history
Change-Id: I2a7bed70fab999b55077090082229b608fa82393
  • Loading branch information
Tsvetislav Viktorov committed Dec 28, 2016
1 parent c5e0153 commit 9c824c2
Show file tree
Hide file tree
Showing 55 changed files with 1,064 additions and 8,554 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ hs_err_pid*
/target/
.classpath
.project
.settings

# Mobile Tools for Java (J2ME)
.mtj.tmp/
11 changes: 11 additions & 0 deletions CREDITS
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
This program references the following third party open source or other free download components.
The third party licensors of these components may provide additional license rights,
terms and conditions and/or require certain notices as described below.

Gson (http://code.google.com/p/google-gson/)
Licensed under Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0


SLF4J (http://www.slf4j.org/)
Licensed under MIT - http://www.slf4j.org/license.html

30 changes: 3 additions & 27 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Apache License

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

Expand Down Expand Up @@ -173,29 +174,4 @@
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright {yyyy} {name of copyright owner}

Licensed 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.
END OF TERMS AND CONDITIONS
77 changes: 38 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,78 +1,77 @@
# Ariba Simple Requisition Sample
# Ariba Simple Requisition

Prerequisites:
--------------
## Introduction

1. Eclipse installed with SAP HANA Cloud Platform Tools plugins
2. JDK 1.7 is available as an Installed JRE in *Windows->Preferences->Java->Installed JREs*
3. SAP HANA Cloud Java Web Tomcat 7 is available as a runtime environment *Windows->Preferences->Server-> Runtime Environments*
4. [Configured destinations for connecting to the Ariba API](#configuring-destinations)
This is an SAP HANA Cloud Platform Web application that demonstrates the consumption of Ariba P2P API for purchasing requisitions.

##What is it?
## Prerequisites

This is a sample HCP application, demonstrating consumption of Ariba P2P API for purchase requisitions.
1. Eclipse installed with SAP HANA Cloud Platform Tools plugins.
2. JDK 1.7 set as an Installed JRE in Eclipse: *Preferences > Java > Installed JREs*.
3. Java Web Tomcat 7 or Java Web Tomcat 8 set as a runtime environment in Eclipse: *Preferences > Server > Runtime Environments*.
4. [Destinations configured for connecting to the Ariba API](#configure-the-destinations).

## How to run it?
## Build and Deploy the Application

Step 1: Clone the Git repository
1. Clone the Git repository.
2. Import the project as a Maven project into your Eclipse workspace.
>*Note*: Make sure you use JDK 1.7 for this project. You can configure this in the project build path.
3. Run the *requisition-parent* project with Maven goal `clean install`.
4. If you are deploying the application locally, see [Creating and Deleting Destinations Locally](https://help.hana.ondemand.com/help/frameset.htm?7fa92ffa007346f58491999361928303.html).<br>
If you are deploying it on the Cloud, see [Creating and Deleting Destinations on the Cloud](https://help.hana.ondemand.com/help/frameset.htm?94dddf7d9e56401ba1719b7e836d8ee9.html).
5. Deploy the application.
>*Note*: Make sure you select the Java Web Tomcat 7 or Java Web Tomcat 8 as a runtime environment.
6. To access the application, follow the steps described in the [Access the application](#access-the-application) section.

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*
## Configure the Destination

Step 3: Run Maven goal `clean install`

Step 4: If you are deploying locally then see [Creating and Deleting Destinations Locally](https://help.hana.ondemand.com/help/frameset.htm?7fa92ffa007346f58491999361928303.html).<br>
If you are deploying on the Cloud see [Creating and Deleting Destinations on the Cloud](https://help.hana.ondemand.com/help/frameset.htm?94dddf7d9e56401ba1719b7e836d8ee9.html).

Step 5: Build and deploy your application. **Make sure you selected the SAP HANA Cloud Java Web Tomcat 7 as the runtime environment**


## <a name="configuring-destinations"></a> Configuring Destinations
The sample uses one HTTP Connectivity Destination for the Ariba P2P API.
Prior to running the project you must have the destination configured as described in the [SAP HANA Cloud Platform Destinations Documentation] (https://help.hana.ondemand.com/help/frameset.htm?e4f1d97cbb571014a247d10f9f9a685d.html)

The HTTP API Destination should look like this:
You need to configure an HTTP Connectivity Destination for the Ariba P2P API before running the project.
>*Note*: To learn more about how to configure the destination, see [SAP HANA Cloud Platform Destinations Documentation] (https://help.hana.ondemand.com/help/frameset.htm?e4f1d97cbb571014a247d10f9f9a685d.html).
The HTTP API Destination looks like this:

Name=ariba-p2p-api
Description=Ariba P2P SOAP WS API Destination
Type=HTTP
URL=https\://<ariba host>/Buyer/soap/salesdemo/RequisitionImportPull?wsdl
URL=https\://<Ariba instance>/Buyer/soap/<Ariba realm>
User=<endpoint-user>
Password=<endpoint-password>
Authentication=BasicAuthentication
ProxyType=Internet
TrustAll=true
CloudConnectorVersion=2
deliverTo=<deliver to name>
headerUniqueName=<header>
shipTo=<shipping address>
billingAddress=<billing address>
currency=<default currency>
originatingSystem=<originating system>
passwordAdapter=PasswordAdapter1
preparer=<preparer user>
requester=<requester user>
originatingSystemId=<system id>
businessUnit=<business unit>
commodityCode=<standard commodity code>
CommonCommodityCodeDomain=<common commodity code domain>
CommonCommodityCodeName=<common commodity code name>
requisitionComment=<comment for requisition>
requisitionName=<requisition name>
namespaceXMLNSvariant=<namespace XMLNS variant>

## Access the application

If you deploy the application on the cloud, this is the URL pattern that you use to access it: `http://<application><account>.<domain>/requisition-app/`

## Accessing the application
After deployment the application is accessible on the following URL:
`http(s)://<host>:<port>/`
If you run the application locally, then use this URL pattern: `http://<host>:<port>/requisition-app/`.

You should see kiosk-like user interface with a list of products presented as tiles that can be selected by clicking/touching the tiles to choose number of the the given product items.
You should see a kiosk-like user interface with a list of products presented as tiles.

## Resources
To choose the amount of a given product item that you want to order, select or touch (depending on the device) the respective tile.

* SAP HANA Cloud Documentation - https://help.hana.ondemand.com/
* SAP HANA Cloud Platform Documentation - https://help.hana.ondemand.com/

## Copyright and license

Copyright 2015 SAP AG
Copyright 2016 SAP SE

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
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.
1 change: 1 addition & 0 deletions requisition-parent/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target/
2 changes: 2 additions & 0 deletions requisition-parent/.settings/org.eclipse.core.resources.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
4 changes: 4 additions & 0 deletions requisition-parent/.settings/org.eclipse.m2e.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
54 changes: 20 additions & 34 deletions requisition-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,12 @@
<version>1.0.0</version>
<packaging>pom</packaging>
<name>Ariba Simple Requisition Extension</name>

<organization>
<name>SAP AG</name>
<url>http://www.sap.com</url>
</organization>

<developers>
<developer>
<name>SAP HANA Cloud</name>
<email>[email protected]</email>
<url>http://hana.ondemand.com</url>
<organization>SAP AG</organization>
<organizationUrl>http://www.sap.com/</organizationUrl>
</developer>
</developers>

<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
Expand All @@ -31,49 +21,45 @@
</licenses>

<url>https://github.com/SAP/cloud-ariba-simple-requisition-ext</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<cloud.jdk.version>1.7</cloud.jdk.version>
<cxf.version>2.7.11</cxf.version>
<cloud.jdk.version>1.7</cloud.jdk.version>
<maven.plugins.version>3.3</maven.plugins.version>
<slf4j.version>1.7.7</slf4j.version>
</properties>

<modules>
<module>requisition-ariba-p2p-client</module>
<module>requisition-app</module>
<module>requisition-app</module>
</modules>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.plugins.version}</version>
<configuration>
<source>${cloud.jdk.version}</source>
<target>${cloud.jdk.version}</target>
<showDeprecation>false</showDeprecation>
<showWarnings>false</showWarnings>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</plugin>
</plugins>
</pluginManagement>
</build>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.7</version>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<version>1.7.7</version>
</dependency>
</dependencies>
</dependencyManagement>
<description>A sample HCP application, demonstrating consumption of Ariba P2P API for purchase requisitions</description>
<description>A sample SAP HANA Cloud Platform application, demonstrating consumption of Ariba P2P API for purchase requisitions</description>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding/<project>=UTF-8
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.7
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
eclipse.preferences.version=1
org.eclipse.jdt.ui.javadoc=false
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">/**\r\n * Returns ${bare_field_name} property from destination\r\n *\r\n * @return ${bare_field_name} property from destination\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user}\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><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\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" 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}\r\n// ${todo} Auto-generated constructor stub</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></templates>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="requisition-app">
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<dependent-module archiveName="requisition-ariba-p2p-client-1.0.0.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/requisition-ariba-p2p-client/requisition-ariba-p2p-client">
<dependency-type>uses</dependency-type>
</dependent-module>
<property name="context-root" value="requisition-app"/>
<property name="java-output-path" value="/requisition-app/target/classes"/>
</wb-module>
</project-modules>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<fixed facet="wst.jsdt.web"/>
<installed facet="java" version="1.7"/>
<installed facet="jst.web" version="3.0"/>
<installed facet="wst.jsdt.web" version="1.0"/>
</faceted-project>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.eclipse.wst.jsdt.launching.baseBrowserLibrary
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Window
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
disabled=06target
eclipse.preferences.version=1
Loading

0 comments on commit 9c824c2

Please sign in to comment.