-
Notifications
You must be signed in to change notification settings - Fork 34
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 #1063 from wso2/4.3.0
Sync main
- Loading branch information
Showing
18 changed files
with
613 additions
and
464 deletions.
There are no files selected for viewing
Binary file modified
BIN
+55.6 KB
(120%)
en/docs/assets/img/integrate/connectors/sf-inboundep-create-new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
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
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 |
---|---|---|
|
@@ -136,3 +136,56 @@ You will find that all the records have been inserted into the `Employees` datab | |
```bash | ||
SELECT * FROM Employees | ||
``` | ||
!!! Note | ||
Additionally, you can add a resource to call the query to invoke batch request as a REST service invocation. For that you have to append `_batch_req` suffix to the [resource request path]({{base_path}}/reference/synapse-properties/data-services/elements-of-a-data-service/#defining-resources) when invoking. See the [how to post json data in batches]({{base_path}}/learn/examples/data-integration/json-with-data-service/#post-data-in-batches) documentation for more information. | ||
Sample resource configuration: | ||
``` | ||
<resource method="POST" path="employee"> | ||
<call-query href="addEmployeeQuery"> | ||
<with-param name="EmployeeNumber" query-param="EmployeeNumber"/> | ||
<with-param name="FirstName" query-param="FirstName"/> | ||
<with-param name="LastName" query-param="LastName"/> | ||
<with-param name="Email" query-param="Email"/> | ||
<with-param name="JobTitle" query-param="JobTitle"/> | ||
<with-param name="Officecode" query-param="Officecode"/> | ||
</call-query> | ||
</resource> | ||
``` | ||
Request: | ||
1. First, create a file named `employee-batch-payload.json`, and define the JSON payload for posting multiple employee records (batch) as shown below. | ||
``` | ||
{ | ||
"user_defined_value": { | ||
"user_defined_value": [ | ||
{ | ||
"EmployeeNumber": "5012", | ||
"FirstName": "Will", | ||
"LastName": "Smith", | ||
"Email": "[email protected]", | ||
"JobTitle": "Consultant", | ||
"Officecode": "01" | ||
}, | ||
{ | ||
"EmployeeNumber": "5013", | ||
"FirstName": "Parker", | ||
"LastName": "Peter", | ||
"Email": "[email protected]", | ||
"JobTitle": "Consultant", | ||
"Officecode": "01" | ||
} | ||
] | ||
} | ||
} | ||
``` | ||
2. On the terminal, navigate to the location where the `employee-batch-payload.json` file is stored, and execute the following HTTP request: | ||
``` | ||
curl -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' --data "@employee-batch-payload.json" -k -v http://localhost:8290/services/batch_requesting_sample/employee_batch_req | ||
``` |
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 |
---|---|---|
|
@@ -168,3 +168,54 @@ You will see the following response received by SoapUI: | |
</soapenv:Body> | ||
</soapenv:Envelope> | ||
``` | ||
!!! Note | ||
Additionally, you can add resources to call the queries to invoke request_box as a REST service invocation. For that you have to append `request_box` to the URL when invoking. See the [how to post data using request box]({{base_path}}/learn/examples/data-integration/json-with-data-service/#post-data-using-request-box) documentation for more information. | ||
Sample resource configuration: | ||
``` | ||
<resource method="POST" path="employee"> | ||
<call-query href="addEmployeeQuery"> | ||
<with-param name="EmployeeNumber" query-param="EmployeeNumber"/> | ||
<with-param name="FirstName" query-param="FirstName"/> | ||
<with-param name="LastName" query-param="LastName"/> | ||
<with-param name="Email" query-param="Email"/> | ||
<with-param name="JobTitle" query-param="JobTitle"/> | ||
<with-param name="Officecode" query-param="Officecode"/> | ||
</call-query> | ||
</resource> | ||
<resource method="GET" path="employee/{EmployeeNumber}"> | ||
<call-query href="selectEmployeebyIDQuery"> | ||
<with-param name="EmployeeNumber" query-param="EmployeeNumber"/> | ||
</call-query> | ||
</resource> | ||
``` | ||
Request: | ||
1. First, create a file named `employee-request-box-payload.json`, and define the JSON payload for posting the request box as shown below. | ||
``` | ||
{ | ||
"request_box" : { | ||
"_postemployee" : { | ||
"EmployeeNumber" : "14005", | ||
"LastName" : "Smith" , | ||
"FirstName" : "Will" , | ||
"Email" : "[email protected]" , | ||
"JobTitle": "Consultant", | ||
"Officecode": "01" | ||
}, | ||
"_getemployee_employeenumber":{ | ||
"EmployeeNumber" : "14005" | ||
} | ||
} | ||
} | ||
``` | ||
2. On the terminal, navigate to the location where the `employee-request-box-payload.json` file is stored, and execute the following HTTP request: | ||
``` | ||
curl -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' --data "@employee-request-box-payload.json" http://localhost:8290/services/request_box_example/request_box | ||
``` |
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
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
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
Oops, something went wrong.