Skip to content

Commit

Permalink
Merge pull request #3431 from GDLMadushanka/sample2
Browse files Browse the repository at this point in the history
Add samples
  • Loading branch information
GDLMadushanka authored Jul 18, 2024
2 parents 15bd395 + 94114c5 commit be7de0b
Show file tree
Hide file tree
Showing 61 changed files with 1,616 additions and 286 deletions.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,45 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.microintegrator.projects</groupId>
<artifactId>ProxyingREST</artifactId>
<groupId>wso2.sampleReadSalesforceAccountsTemplate</groupId>
<artifactId>FetchSalesForceAccounts</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>
<name>ProxyingREST</name>
<description>ProxyingREST</description>
<name>FetchSalesForceAccounts</name>
<description>FetchSalesForceAccounts</description>
<repositories>
<repository>
<id>wso2-nexus</id>
<name>WSO2 internal Repository</name>
<url>https://maven.wso2.org/nexus/content/groups/wso2-public/</url>
<releases>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
<checksumPolicy>ignore</checksumPolicy>
</releases>
<id>wso2-nexus</id>
<name>WSO2 internal Repository</name>
<url>https://maven.wso2.org/nexus/content/groups/wso2-public/</url>
<releases>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
<checksumPolicy>ignore</checksumPolicy>
</releases>
</repository>
<repository>
<id>wso2.releases</id>
<name>WSO2 internal Repository</name>
<url>https://maven.wso2.org/nexus/content/repositories/releases/</url>
<releases>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
<checksumPolicy>ignore</checksumPolicy>
</releases>
<id>wso2.releases</id>
<name>WSO2 internal Repository</name>
<url>https://maven.wso2.org/nexus/content/repositories/releases/</url>
<releases>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
<checksumPolicy>ignore</checksumPolicy>
</releases>
</repository>
<repository>
<id>wso2.snapshots</id>
<name>Apache Snapshot Repository</name>
<url>https://maven.wso2.org/nexus/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
<id>wso2.snapshots</id>
<name>Apache Snapshot Repository</name>
<url>https://maven.wso2.org/nexus/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
Expand Down Expand Up @@ -104,7 +103,7 @@
<plugin>
<groupId>org.wso2.maven</groupId>
<artifactId>vscode-car-plugin</artifactId>
<version>5.2.54</version>
<version>5.2.60</version>
<extensions>true</extensions>
<executions>
<execution>
Expand Down Expand Up @@ -148,7 +147,7 @@
<plugin>
<groupId>org.wso2.maven</groupId>
<artifactId>synapse-unit-test-maven-plugin</artifactId>
<version>5.2.54</version>
<version>5.2.60</version>
<executions>
<execution>
<id>synapse-unit-test</id>
Expand Down Expand Up @@ -176,8 +175,8 @@
<id>docker</id>
<build>
<plugins>
<!-- Compile and build the class mediator jars -->
<plugin>
<!-- Compile and build the class mediator jars -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
Expand Down Expand Up @@ -211,7 +210,7 @@
<plugin>
<groupId>org.wso2.maven</groupId>
<artifactId>vscode-car-plugin</artifactId>
<version>5.2.54</version>
<version>5.2.60</version>
<extensions>true</extensions>
<executions>
<execution>
Expand Down Expand Up @@ -247,7 +246,7 @@
<plugin>
<groupId>org.wso2.maven</groupId>
<artifactId>mi-container-config-mapper</artifactId>
<version>5.2.54</version>
<version>5.2.60</version>
<extensions>true</extensions>
<executions>
<execution>
Expand Down Expand Up @@ -316,7 +315,7 @@
<configuration>
<images>
<image>
<name>${project.artifactId}:${project.version}</name>
<name>fetchsalesforceaccounts:${project.version}</name>
<build>
<from>${dockerfile.base.image}</from>
<dockerFile>${basedir}/target/tmp_docker/Dockerfile</dockerFile>
Expand All @@ -339,10 +338,10 @@
</plugins>
</build>
</profile>
</profiles>
</profiles>
<properties>
<projectType>integration-project</projectType>
<uuid>50a6a1c7-6ed2-4853-9741-61bebdcfc9d7</uuid>
<uuid>94a5c2ed-0c46-4b9d-9726-24e79a6babf3</uuid>
<!-- <archiveLocation>configure a custom target directory for CAPP</archiveLocation> -->
<keystore.type>JKS</keystore.type>
<keystore.name>wso2carbon.jks</keystore.name>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<api context="/salesforceaccountapi" name="SalesForceAccountServiceAPI" xmlns="http://ws.apache.org/ns/synapse">
<resource methods="GET">
<inSequence>
<salesforcerest.query configKey="SalesforceConnection1">
<queryString>select id from Account</queryString>
</salesforcerest.query>
<respond/>
</inSequence>
<outSequence/>
<faultSequence/>
</resource>
</api>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<localEntry key="SalesforceConnection1" xmlns="http://ws.apache.org/ns/synapse">
<salesforcerest.init>
<connectionType>init</connectionType>
<name>SalesforceConnection1</name>
<accessToken></accessToken>
<apiVersion>v44.0</apiVersion>
<hostName>https://login.salesforce.com</hostName>
<refreshToken></refreshToken>
<clientSecret></clientSecret>
<clientId></clientId>
<apiUrl></apiUrl>
<timeout>3000</timeout>
<username></username>
<password></password>
</salesforcerest.init>
</localEntry>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
key: "SalesForceAccountServiceAPI-1.0.0"
name : "SalesForceAccountServiceAPI"
displayName : "SalesForceAccountServiceAPI"
description: "Sample API"
version: "1.0.0"
serviceUrl: "https://{MI_HOST}:{MI_PORT}/salesforceaccountapi"
definitionType: "OAS3"
securityType: "BASIC"
mutualSSLEnabled: false
apiId : "null"
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
openapi: 3.0.1
info:
title: SalesForceAccountServiceAPI
description: API Definition of SalesForceAccountServiceAPI
version: 1.0.0
servers:
- url: http://localhost:8290/salesforceaccountapi
paths:
/:
get:
responses:
default:
description: Default response
111 changes: 111 additions & 0 deletions samples/HelloDocker/deployment/deployment.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
[server]
hostname = "localhost"
hot_deployment = false
# offset = 10

[user_store]
type = "read_only_ldap"

[keystore.primary]
file_name = "repository/resources/security/wso2carbon.jks"
password = "wso2carbon"
alias = "wso2carbon"
key_password = "wso2carbon"

[truststore]
file_name = "repository/resources/security/client-truststore.jks"
password = "wso2carbon"
alias = "symmetric.key.value"
algorithm = "AES"

## Following are set of example configs. Please refer docs for complete set of configurations.

# [transport.http]
# socket_timeout = 180000 # timeout in milliseconds
# disable_connection_keepalive = false
# connection_timeout = 90000 # in milliseconds

# [transport.jms]
# sender_enable = true
# listener_enable = true

# [[transport.jms.sender]]
# name = "myQueueSender"
# parameter.initial_naming_factory = "org.apache.activemq.jndi.ActiveMQInitialContextFactory"
# parameter.provider_url = "tcp://localhost:61616"
# parameter.connection_factory_name = "QueueConnectionFactory"
# parameter.connection_factory_type = "queue"
# parameter.cache_level = "producer"


#[[transport.jms.listener]]
# name = "myQueueConnectionFactory"
# parameter.initial_naming_factory = "org.apache.activemq.jndi.ActiveMQInitialContextFactory"
# parameter.provider_url = "tcp://localhost:61616"
# parameter.connection_factory_name = "QueueConnectionFactory"
# parameter.connection_factory_type = "queue"

# [transport.jndi.connection_factories]
# 'connectionfactory.QueueConnectionFactory' = "amqp://admin:admin@clientID/carbon?brokerlist='tcp://localhost:5675'"
# 'connectionfactory.TopicConnectionFactory' = "amqp://admin:admin@clientID/carbon?brokerlist='tcp://localhost:5675'"

# [transport.jndi.queue]
# jndiNameOfQueue = "physicalNameOfQueue"

# [transport.jndi.topic]
# jndiNameOfTopic = "physicalNameOfTopic"

# [transport.rabbitmq]
# sender_enable = true
# listener_enable = true

# [[transport.rabbitmq.sender]]
# name = "AMQPConnectionFactory"
# parameter.hostname = "localhost"
# parameter.port = 5672
# parameter.username = "guest"
# parameter.password = "guest"

# [[transport.rabbitmq.listener]]
# name = "AMQPConnectionFactory"
# parameter.hostname = "localhost"
# parameter.port = 5672
# parameter.username = "guest"
# parameter.password = "guest"

# [system.parameter]
# 'key' = "value"

# [[datasource]]
# id = "WSO2CarbonDB" # "WSO2_COORDINATION_DB"
# url = "jdbc:mysql://localhost:3306/integratordb"
# username = "root"
# password = "root"
# driver = "com.mysql.jdbc.Driver"

# [management_api]
# protocols = "http"

# [[internal_apis.users]]
# user.name = "user-1"
# user.password = "pwd-1"

# [transaction_counter]
# enable = true
# data_source = "WSO2CarbonDB"
# update_interval = 2

# [mediation]
# synapse.global_timeout_interval = "120000" # interval in milliseconds

# [secrets]
# secret_key = "[secret value]"

# [[service_catalog]]
# apim_host = "https://localhost:9443"
# enable = true
# username = "admin"
# password = "admin"

# [dashboard_config]
# dashboard_url = "https://localhost:9743/dashboard/api/"
6 changes: 6 additions & 0 deletions samples/HelloDocker/deployment/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
COPY CompositeApps/*.car ${WSO2_SERVER_HOME}/repository/deployment/server/carbonapps/
COPY resources/wso2carbon.jks ${WSO2_SERVER_HOME}/repository/resources/security/wso2carbon.jks
COPY resources/client-truststore.jks ${WSO2_SERVER_HOME}/repository/resources/security/client-truststore.jks
# COPY libs/*.jar ${WSO2_SERVER_HOME}/lib/
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit be7de0b

Please sign in to comment.