-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3431 from GDLMadushanka/sample2
Add samples
- Loading branch information
Showing
61 changed files
with
1,616 additions
and
286 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
Binary file added
BIN
+139 KB
samples/FetchSalesForceAccounts/deployment/docker/resources/client-truststore.jks
Binary file not shown.
Binary file added
BIN
+140 KB
samples/FetchSalesForceAccounts/deployment/docker/resources/wso2carbon.jks
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...es/FetchSalesForceAccounts/src/main/wso2mi/artifacts/apis/SalesForceAccountServiceAPI.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
17 changes: 17 additions & 0 deletions
17
...FetchSalesForceAccounts/src/main/wso2mi/artifacts/local-entries/SalesforceConnection1.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 added
BIN
+283 KB
...alesForceAccounts/src/main/wso2mi/resources/connectors/salesforcerest-connector-2.0.0.zip
Binary file not shown.
11 changes: 11 additions & 0 deletions
11
...orceAccounts/src/main/wso2mi/resources/metadata/SalesForceAccountServiceAPI_metadata.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
13 changes: 13 additions & 0 deletions
13
...ForceAccounts/src/main/wso2mi/resources/metadata/SalesForceAccountServiceAPI_swagger.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Oops, something went wrong.