Add SAP JCo connector documentation - #2364
Conversation
📝 WalkthroughSummary
WalkthroughAdds complete SAP JCo connector documentation covering its overview, compatibility, prerequisites, proprietary library installation, connection configuration, and Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (3)
en/docs/reference/connectors/sap-jco-connector/sap-jco-connector-configuration.md (2)
98-98: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueUse "Username" instead of "User Name".
Consider using the single-word compound "Username" as it is the more common convention.
📝 Proposed fix
-- **User Name** — your SAP user account name. +- **Username** — your SAP user account name.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@en/docs/reference/connectors/sap-jco-connector/sap-jco-connector-configuration.md` at line 98, Update the “User Name” label in the SAP JCo connector configuration documentation to the single-word “Username,” preserving the existing description and formatting.Source: Linters/SAST tools
45-47: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueSpecify a language for the fenced code block.
Specify a language (e.g.,
text) for this code block to improve rendering and resolve the markdownlint warning.📝 Proposed fix
-``` +```text java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path: ...</details> <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.In
@en/docs/reference/connectors/sap-jco-connector/sap-jco-connector-configuration.md
around lines 45 - 47, Specify the text language on the fenced code block
containing the UnsatisfiedLinkError example, changing the opening fence to use
text while preserving the error content.</details> <!-- cr-comment:v1:4c663cb88380b004eccbbf62 --> _Source: Linters/SAST tools_ </blockquote></details> <details> <summary>en/docs/reference/connectors/sap-jco-connector/sap-jco-connector-overview.md (1)</summary><blockquote> `31-31`: _📐 Maintainability & Code Quality_ | _🔵 Trivial_ | _💤 Low value_ **Hyphenate "open-source" when used as an adjective.** Consider hyphenating "open-source" to improve grammar. <details> <summary>📝 Proposed fix</summary> ```diff -As an open source project, WSO2 extensions welcome contributions from the community. +As an open-source project, WSO2 extensions welcome contributions from the community.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@en/docs/reference/connectors/sap-jco-connector/sap-jco-connector-overview.md` at line 31, Update the adjective in the introductory sentence to use the hyphenated “open-source” form, while preserving the rest of the sentence unchanged.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@en/docs/reference/connectors/sap-jco-connector/sap-jco-connector-overview.md`:
- Line 25: Resolve the broken SAP JCo Connector Example reference in the
overview documentation: either create the missing example page at the linked
destination with the expected content, or update/remove the link so it targets
an existing connector documentation page.
In
`@en/docs/reference/connectors/sap-jco-connector/sap-jco-connector-reference.md`:
- Around line 149-165: Update the XML sample’s return-type element in the
sap_jco.execute configuration to use the documented returnType parameter name
instead of returnTypeDataType, keeping the sample consistent with the parameter
table.
---
Nitpick comments:
In
`@en/docs/reference/connectors/sap-jco-connector/sap-jco-connector-configuration.md`:
- Line 98: Update the “User Name” label in the SAP JCo connector configuration
documentation to the single-word “Username,” preserving the existing description
and formatting.
- Around line 45-47: Specify the text language on the fenced code block
containing the UnsatisfiedLinkError example, changing the opening fence to use
text while preserving the error content.
In
`@en/docs/reference/connectors/sap-jco-connector/sap-jco-connector-overview.md`:
- Line 31: Update the adjective in the introductory sentence to use the
hyphenated “open-source” form, while preserving the rest of the sentence
unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 45f6fd24-fe73-4cf9-8709-6e924ea4325d
📒 Files selected for processing (4)
en/docs/reference/connectors/sap-jco-connector/sap-jco-connector-configuration.mden/docs/reference/connectors/sap-jco-connector/sap-jco-connector-overview.mden/docs/reference/connectors/sap-jco-connector/sap-jco-connector-reference.mden/mkdocs.yml
|
|
||
| * **[Set up the SAP JCo Connector]({{base_path}}/reference/connectors/sap-jco-connector/sap-jco-connector-configuration/)**: This documentation explains how to obtain the SAP middleware libraries, install the native SAP JCo library, and configure a connection to an SAP system. | ||
|
|
||
| * **[SAP JCo Connector Example]({{base_path}}/reference/connectors/sap-jco-connector/sap-jco-connector-example/)**: This example explains how to use the SAP JCo Connector to call an RFC-enabled function module and to send an IDoc to an SAP system. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Check if the SAP JCo connector example page exists.
fd 'sap-jco-connector-example.md'Repository: wso2/docs-mi
Length of output: 150
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== search for example page references =="
rg -n --hidden --glob '!**/.git/**' 'sap-jco-connector-example|SAP JCo Connector Example' .
echo
echo "== list matching markdown files =="
fd -t f 'sap-jco-connector-example.*|sap-jco-connector.*' en docs . 2>/dev/null || true
echo
echo "== inspect relevant connector docs files =="
fd -t f 'sap-jco-connector.*\.md$' en docs . 2>/dev/null | sed -n '1,20p'Repository: wso2/docs-mi
Length of output: 1562
Remove or add the missing SAP JCo Connector Example link
en/docs/reference/connectors/sap-jco-connector/sap-jco-connector-overview.md:25 points to sap-jco-connector-example/, but no corresponding page exists in the connector docs. Either add the page or update/remove the link.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@en/docs/reference/connectors/sap-jco-connector/sap-jco-connector-overview.md`
at line 25, Resolve the broken SAP JCo Connector Example reference in the
overview documentation: either create the missing example page at the linked
destination with the expected content, or update/remove the link so it targets
an existing connector documentation page.
| <td>returnType</td> | ||
| <td>The data type of the operation response. Accepted values: <code>RfcRecord</code>, <code>xml</code>, <code>json</code>. The default value is <code>RfcRecord</code>.</td> | ||
| <td>No</td> | ||
| </tr> | ||
| </table> | ||
|
|
||
| **Sample configuration** | ||
|
|
||
| ```xml | ||
| <sap_jco.execute configKey="SAP_CONNECTION"> | ||
| <functionName>TEST_FUNCTION</functionName> | ||
| <importParameters>{"importParam1": "Hello", "importParam2": 123}</importParameters> | ||
| <returnTypeDataType>json</returnTypeDataType> | ||
| <responseVariable>sapExecuteResult</responseVariable> | ||
| <overwriteBody>false</overwriteBody> | ||
| </sap_jco.execute> | ||
| ``` |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Ensure consistency between the parameter table and the XML sample.
The parameter table defines the parameter as returnType, but the XML sample uses <returnTypeDataType>. Please update the sample to match the parameter name if this is a typographical error.
📝 Proposed fix
- <returnTypeDataType>json</returnTypeDataType>
+ <returnType>json</returnType>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <td>returnType</td> | |
| <td>The data type of the operation response. Accepted values: <code>RfcRecord</code>, <code>xml</code>, <code>json</code>. The default value is <code>RfcRecord</code>.</td> | |
| <td>No</td> | |
| </tr> | |
| </table> | |
| **Sample configuration** | |
| ```xml | |
| <sap_jco.execute configKey="SAP_CONNECTION"> | |
| <functionName>TEST_FUNCTION</functionName> | |
| <importParameters>{"importParam1": "Hello", "importParam2": 123}</importParameters> | |
| <returnTypeDataType>json</returnTypeDataType> | |
| <responseVariable>sapExecuteResult</responseVariable> | |
| <overwriteBody>false</overwriteBody> | |
| </sap_jco.execute> | |
| ``` | |
| <sap_jco.execute configKey="SAP_CONNECTION"> | |
| <functionName>TEST_FUNCTION</functionName> | |
| <importParameters>{"importParam1": "Hello", "importParam2": 123}</importParameters> | |
| <returnType>json</returnType> | |
| <responseVariable>sapExecuteResult</responseVariable> | |
| <overwriteBody>false</overwriteBody> | |
| </sap_jco.execute> |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In
`@en/docs/reference/connectors/sap-jco-connector/sap-jco-connector-reference.md`
around lines 149 - 165, Update the XML sample’s return-type element in the
sap_jco.execute configuration to use the documented returnType parameter name
instead of returnTypeDataType, keeping the sample consistent with the parameter
table.
|
|
||
| ## Obtain the SAP middleware libraries | ||
|
|
||
| The SAP JCo (`sapjco3.jar`) and SAP IDoc (`sapidoc3.jar`) libraries are proprietary software owned by SAP SE. They **cannot be distributed publicly** and are therefore **not** bundled with this connector. You must obtain them yourself from the [SAP Support Portal](https://support.sap.com/en/product/connectors/jco.html). |
There was a problem hiding this comment.
| The SAP JCo (`sapjco3.jar`) and SAP IDoc (`sapidoc3.jar`) libraries are proprietary software owned by SAP SE. They **cannot be distributed publicly** and are therefore **not** bundled with this connector. You must obtain them yourself from the [SAP Support Portal](https://support.sap.com/en/product/connectors/jco.html). | |
| The SAP JCo (`sapjco3.jar`) and SAP IDoc (`sapidoc3.jar`) libraries are proprietary software owned by SAP SE. You must obtain them yourself from the [SAP Support Portal](https://support.sap.com/en/product/connectors/jco.html). |
|
|
||
| ### Step 1: Add the JAR files to the classpath | ||
|
|
||
| Copy `sapjco3.jar` and `sapidoc3.jar` into the `<MI_HOME>/lib` directory. This folder is on the Micro Integrator classpath, so the SAP JCo Java classes are picked up automatically. |
There was a problem hiding this comment.
| Copy `sapjco3.jar` and `sapidoc3.jar` into the `<MI_HOME>/lib` directory. This folder is on the Micro Integrator classpath, so the SAP JCo Java classes are picked up automatically. | |
| Copy `sapjco3.jar` and `sapidoc3.jar` into the `<MI_HOME>/lib` directory. |
| - `sapjco3.jar` — Java classes, resolved via the **classpath** (Step 1 above). | ||
| - `libsapjco3.so` / `sapjco3.dll` / `libsapjco3.dylib` — the **native** library, resolved via the JVM's **`java.library.path`**, *not* the classpath. | ||
|
|
||
| Placing the native library in `<MI_HOME>/lib` is **not** sufficient — that folder is on the classpath but not on `java.library.path`. If the native library is missing from `java.library.path`, initialization fails with: |
There was a problem hiding this comment.
In docs, do we have to mention these internal details?
| java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path: ... | ||
| ``` | ||
|
|
||
| In the instructions below, `<NATIVE_LIB_DIR>` is the directory where you extracted the downloaded native library. The native library architecture (for example, arm64 vs x86_64) must match the JVM's architecture. Pick **one** option per OS, then **fully restart** the Micro Integrator — native libraries load only once at JVM startup. |
There was a problem hiding this comment.
Let's add this as a note.
Purpose
$subject
Goals
Approach
User stories
Release note
Documentation
Training
Certification
Marketing
Automation tests
Security checks
Samples
Related PRs
Migrations (if applicable)
Test environment
Learning