From f00b038bf0a5dfda8355b964a992630de8145c99 Mon Sep 17 00:00:00 2001 From: Nuvindu Date: Mon, 21 Oct 2024 11:31:59 +0530 Subject: [PATCH 01/12] Add missing `soap12` parameter in the config function --- ballerina/soap_utils.bal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ballerina/soap_utils.bal b/ballerina/soap_utils.bal index e78497f..65fcfb7 100644 --- a/ballerina/soap_utils.bal +++ b/ballerina/soap_utils.bal @@ -58,7 +58,7 @@ public isolated function applySecurityPolicies(wssec:OutboundSecurityConfig|wsse } else { xml securedEnvelope = envelope.clone(); foreach wssec:OutboundSecurityConfig policy in security { - securedEnvelope = check applySecurityPolicies(policy, securedEnvelope); + securedEnvelope = check applySecurityPolicies(policy, securedEnvelope, soap12); } return securedEnvelope; } From e6452480f3e32a345d9408f0dcaad4b03c4320e3 Mon Sep 17 00:00:00 2001 From: Nuvindu Date: Mon, 21 Oct 2024 11:33:23 +0530 Subject: [PATCH 02/12] Update test cases with array of outbound security policies --- ballerina/modules/soap11/tests/soap11_client_test.bal | 5 ++++- ballerina/modules/soap12/tests/soap12_client_test.bal | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ballerina/modules/soap11/tests/soap11_client_test.bal b/ballerina/modules/soap11/tests/soap11_client_test.bal index 21d5271..705ab6c 100644 --- a/ballerina/modules/soap11/tests/soap11_client_test.bal +++ b/ballerina/modules/soap11/tests/soap11_client_test.bal @@ -387,7 +387,7 @@ function testSoapReceiveWithAsymmetricBindingAndInboundConfig() returns error? { xmlns "http://schemas.xmlsoap.org/soap/envelope/" as soap11; Client soapClient = check new ("http://localhost:9090", { - outboundSecurity: { + outboundSecurity: [{ signatureConfig: { keystore: { path: KEY_STORE_PATH_2, @@ -408,6 +408,9 @@ function testSoapReceiveWithAsymmetricBindingAndInboundConfig() returns error? { encryptionAlgorithm: wssec:AES_128 } }, + { + timeToLive: 1 + }], inboundSecurity: { decryptKeystore: { path: KEY_STORE_PATH_2, diff --git a/ballerina/modules/soap12/tests/soap12_client_test.bal b/ballerina/modules/soap12/tests/soap12_client_test.bal index ef9eba9..671e955 100644 --- a/ballerina/modules/soap12/tests/soap12_client_test.bal +++ b/ballerina/modules/soap12/tests/soap12_client_test.bal @@ -420,7 +420,7 @@ function testSoapReceiveWithAsymmetricBindingAndInboundConfig() returns error? { xmlns "http://www.w3.org/2003/05/soap-envelope" as soap11; Client soapClient = check new ("http://localhost:9091", { - outboundSecurity: { + outboundSecurity: [{ signatureConfig: { keystore: { path: KEY_STORE_PATH_2, @@ -440,7 +440,9 @@ function testSoapReceiveWithAsymmetricBindingAndInboundConfig() returns error? { publicKeyAlias: ALIAS, encryptionAlgorithm: wssec:AES_128 } - }, + }, { + timeToLive: 1 + }], inboundSecurity: { decryptKeystore: { path: KEY_STORE_PATH_2, From 6c83b1345a7118fc9d5efaf6e96cd15c1a140c32 Mon Sep 17 00:00:00 2001 From: Nuvindu Date: Mon, 21 Oct 2024 11:41:12 +0530 Subject: [PATCH 03/12] [Automated] Update the native jar versions --- ballerina/Ballerina.toml | 6 +++--- ballerina/Dependencies.toml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index 9acd016..ddc699f 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -1,7 +1,7 @@ [package] org = "ballerina" name = "soap" -version = "2.0.0" +version = "2.0.1" authors = ["Ballerina"] export=["soap", "soap.soap11", "soap.soap12"] keywords = ["soap"] @@ -19,8 +19,8 @@ graalvmCompatible = true [[platform.java17.dependency]] groupId = "io.ballerina.stdlib" artifactId = "soap-native" -version = "2.0.0" -path = "../native/build/libs/soap-native-2.0.0.jar" +version = "2.0.1" +path = "../native/build/libs/soap-native-2.0.1-SNAPSHOT.jar" [[platform.java17.dependency]] groupId = "org.apache.wss4j" diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index 127be5b..22c0774 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -64,7 +64,7 @@ dependencies = [ [[package]] org = "ballerina" name = "http" -version = "2.12.0" +version = "2.12.1" dependencies = [ {org = "ballerina", name = "auth"}, {org = "ballerina", name = "cache"}, @@ -227,7 +227,7 @@ dependencies = [ [[package]] org = "ballerina" name = "mime" -version = "2.10.0" +version = "2.10.1" dependencies = [ {org = "ballerina", name = "io"}, {org = "ballerina", name = "jballerina.java"}, @@ -271,7 +271,7 @@ dependencies = [ [[package]] org = "ballerina" name = "soap" -version = "2.0.0" +version = "2.0.1" dependencies = [ {org = "ballerina", name = "crypto"}, {org = "ballerina", name = "http"}, From a5a9f5e4cfbf11addb824fc53e8dbceb95fd7d54 Mon Sep 17 00:00:00 2001 From: Nuvindu Date: Mon, 21 Oct 2024 12:06:23 +0530 Subject: [PATCH 04/12] Add new test case for array of outbound security policies --- .../soap12/tests/soap12_client_test.bal | 61 ++++++++++++++++++- 1 file changed, 58 insertions(+), 3 deletions(-) diff --git a/ballerina/modules/soap12/tests/soap12_client_test.bal b/ballerina/modules/soap12/tests/soap12_client_test.bal index 671e955..2c8dbe6 100644 --- a/ballerina/modules/soap12/tests/soap12_client_test.bal +++ b/ballerina/modules/soap12/tests/soap12_client_test.bal @@ -414,10 +414,55 @@ function testSoapEndpoint() returns error? { } @test:Config { - groups: ["soap12", "send_receive", "new2"] + groups: ["soap12", "send_receive"] } function testSoapReceiveWithAsymmetricBindingAndInboundConfig() returns error? { - xmlns "http://www.w3.org/2003/05/soap-envelope" as soap11; + xmlns "http://www.w3.org/2003/05/soap-envelope" as soap12; + Client soapClient = check new ("http://localhost:9091", + { + outboundSecurity: [{ + signatureConfig: { + keystore: { + path: KEY_STORE_PATH_2, + password: PASSWORD + }, + privateKeyAlias: ALIAS, + privateKeyPassword: PASSWORD, + signatureAlgorithm: soap:RSA_SHA512, + canonicalizationAlgorithm: soap:C14N_EXCL_OMIT_COMMENTS, + digestAlgorithm: soap:SHA512 + }, + encryptionConfig: { + keystore: { + path: KEY_STORE_PATH_2, + password: PASSWORD + }, + publicKeyAlias: ALIAS, + encryptionAlgorithm: wssec:AES_128 + } + }], + inboundSecurity: { + decryptKeystore: { + path: KEY_STORE_PATH_2, + password: PASSWORD + }, + signatureKeystore: { + path: KEY_STORE_PATH_2, + password: PASSWORD + } + } + } + ); + xml body = xml `23`; + xml response = check soapClient->sendReceive(body, "http://tempuri.org/Add"); + test:assertEquals((response/).toString(), (body/).toString()); +} + +@test:Config { + groups: ["soap12", "send_receive"] +} +function testSoapReceiveWithArrayOfOutboundConfigAndInboundConfig() returns error? { + xmlns "http://www.w3.org/2003/05/soap-envelope" as soap12; Client soapClient = check new ("http://localhost:9091", { outboundSecurity: [{ @@ -442,6 +487,10 @@ function testSoapReceiveWithAsymmetricBindingAndInboundConfig() returns error? { } }, { timeToLive: 1 + }, { + username: "user", + password: "password", + passwordType: wssec:TEXT }], inboundSecurity: { decryptKeystore: { @@ -457,5 +506,11 @@ function testSoapReceiveWithAsymmetricBindingAndInboundConfig() returns error? { ); xml body = xml `23`; xml response = check soapClient->sendReceive(body, "http://tempuri.org/Add"); - test:assertEquals((response/).toString(), (body/).toString()); + string:RegExp usernameTokenTag = re `.*`; + string:RegExp usernameTag = re `user`; + test:assertTrue(response.toString().includesMatch(usernameTokenTag)); + test:assertTrue(response.toString().includesMatch(usernameTag)); + string:RegExp passwordTag = re `password`; + test:assertTrue(response.toString().includesMatch(passwordTag)); + test:assertEquals((response/).toString(), (body/).toString()); } From 4b3595bbea4d6dc88399562468f048172445bbbe Mon Sep 17 00:00:00 2001 From: ballerina-bot Date: Mon, 21 Oct 2024 07:54:52 +0000 Subject: [PATCH 05/12] [Automated] Update the native jar versions --- ballerina/Dependencies.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index 22c0774..bee7ad0 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -64,7 +64,7 @@ dependencies = [ [[package]] org = "ballerina" name = "http" -version = "2.12.1" +version = "2.12.0" dependencies = [ {org = "ballerina", name = "auth"}, {org = "ballerina", name = "cache"}, @@ -227,7 +227,7 @@ dependencies = [ [[package]] org = "ballerina" name = "mime" -version = "2.10.1" +version = "2.10.0" dependencies = [ {org = "ballerina", name = "io"}, {org = "ballerina", name = "jballerina.java"}, From 1fd93ca1aeb2194d026decd4a9b07965882f5525 Mon Sep 17 00:00:00 2001 From: ballerina-bot Date: Mon, 21 Oct 2024 07:55:41 +0000 Subject: [PATCH 06/12] [Automated] Update the native jar versions --- ballerina/Ballerina.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index ddc699f..8d30e88 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -20,7 +20,7 @@ graalvmCompatible = true groupId = "io.ballerina.stdlib" artifactId = "soap-native" version = "2.0.1" -path = "../native/build/libs/soap-native-2.0.1-SNAPSHOT.jar" +path = "../native/build/libs/soap-native-2.0.1.jar" [[platform.java17.dependency]] groupId = "org.apache.wss4j" From 49ec34d4299526e7e48780a3bd489b3497e5d306 Mon Sep 17 00:00:00 2001 From: ballerina-bot Date: Mon, 21 Oct 2024 07:55:41 +0000 Subject: [PATCH 07/12] [Gradle Release Plugin] - pre tag commit: 'v2.0.1'. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index eed1b8b..5260aa6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ org.gradle.caching=true group=io.ballerina.stdlib -version=2.0.1-SNAPSHOT +version=2.0.1 checkstylePluginVersion=10.12.0 spotbugsPluginVersion=5.0.14 From cf0ff59dff1d2337a10293ee2478abec634e2b9d Mon Sep 17 00:00:00 2001 From: ballerina-bot Date: Mon, 21 Oct 2024 07:55:42 +0000 Subject: [PATCH 08/12] [Gradle Release Plugin] - new version commit: 'v2.0.2-SNAPSHOT'. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 5260aa6..5c99539 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ org.gradle.caching=true group=io.ballerina.stdlib -version=2.0.1 +version=2.0.2-SNAPSHOT checkstylePluginVersion=10.12.0 spotbugsPluginVersion=5.0.14 From 584630e03669d81dea641d4cb1fadd971615eaae Mon Sep 17 00:00:00 2001 From: Sumudu Nissanka Date: Thu, 7 Nov 2024 13:33:29 +0530 Subject: [PATCH 09/12] Update gradle.properties --- gradle.properties | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index 5c99539..0eb5e18 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ org.gradle.caching=true group=io.ballerina.stdlib -version=2.0.2-SNAPSHOT +version=2.1.0-SNAPSHOT checkstylePluginVersion=10.12.0 spotbugsPluginVersion=5.0.14 @@ -9,7 +9,7 @@ downloadPluginVersion=5.4.0 releasePluginVersion=2.8.0 ballerinaGradlePluginVersion=2.2.4 -ballerinaLangVersion=2201.10.0 +ballerinaLangVersion=2201.11.0-20241008-112400-81975006 stdlibIoVersion=1.6.1 stdlibTimeVersion=2.4.0 @@ -28,10 +28,11 @@ stdlibMimeVersion=2.10.0 stdlibUuidVersion=1.8.0 stdlibAuthVersion=2.12.0 +stdlibDataJsonDataVersion=0.3.0-20241105-101100-661d11f stdlibJwtVersion=2.13.0 stdlibOAuth2Version=2.12.0 -stdlibHttpVersion=2.12.0 +stdlibHttpVersion=2.13.0-20241106-120000-d375c3b wsSecurityDomVersion=3.0.1 wsSecurityCommonVersion=3.0.1 From a334eb9eefa0aa15c572e06756edfdcafba63461 Mon Sep 17 00:00:00 2001 From: Sumudu Nissanka Date: Thu, 7 Nov 2024 13:34:57 +0530 Subject: [PATCH 10/12] Update Ballerina.toml --- build-config/resources/Ballerina.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-config/resources/Ballerina.toml b/build-config/resources/Ballerina.toml index b55c963..e4c0aab 100644 --- a/build-config/resources/Ballerina.toml +++ b/build-config/resources/Ballerina.toml @@ -8,7 +8,7 @@ keywords = ["soap"] repository = "https://github.com/ballerina-platform/module-ballerina-soap" icon = "icon.png" license = ["Apache-2.0"] -distribution = "2201.10.0" +distribution = "2201.11.0" [build-options] observabilityIncluded = true From 0fc09d018c0bdd63abd976d985d14519d93af359 Mon Sep 17 00:00:00 2001 From: Sumudu Nissanka Date: Thu, 7 Nov 2024 13:35:32 +0530 Subject: [PATCH 11/12] Update build.gradle --- build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle b/build.gradle index 5d2e722..ddb8e0d 100644 --- a/build.gradle +++ b/build.gradle @@ -91,6 +91,7 @@ subprojects { ballerinaStdLibs "io.ballerina.stdlib:os-ballerina:${project.stdlibOsVersion}" ballerinaStdLibs "io.ballerina.stdlib:url-ballerina:${project.stdlibUrlVersion}" ballerinaStdLibs "io.ballerina.stdlib:io-ballerina:${project.stdlibIoVersion}" + ballerinaStdLibs "io.ballerina.lib:data.jsondata-ballerina:${stdlibDataJsonDataVersion}" externalJars (group: 'org.apache.wss4j', name: 'wss4j-ws-security-dom', version: "${wsSecurityDomVersion}") { transitive = false From 267d6c5f1840c2ff60ed846d1794057effb2b541 Mon Sep 17 00:00:00 2001 From: ravinperera00 Date: Thu, 14 Nov 2024 21:14:26 +0530 Subject: [PATCH 12/12] Migrate to new Runtime APIs --- ballerina/Ballerina.toml | 8 ++-- ballerina/Dependencies.toml | 31 ++++++++++---- build-config/resources/Ballerina.toml | 2 +- gradle.properties | 42 +++++++++---------- .../main/java/io/ballerina/lib/soap/Soap.java | 13 +++--- 5 files changed, 53 insertions(+), 43 deletions(-) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index 2cbdec0..5e13cb0 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -1,14 +1,14 @@ [package] org = "ballerina" name = "soap" -version = "2.0.1" +version = "2.1.0" authors = ["Ballerina"] export=["soap", "soap.soap11", "soap.soap12"] keywords = ["soap"] repository = "https://github.com/ballerina-platform/module-ballerina-soap" icon = "icon.png" license = ["Apache-2.0"] -distribution = "2201.10.0-20241011-161100-51978649" +distribution = "2201.11.0-20241112-214900-6b80ab87" [build-options] observabilityIncluded = true @@ -19,8 +19,8 @@ graalvmCompatible = true [[platform.java21.dependency]] groupId = "io.ballerina.stdlib" artifactId = "soap-native" -version = "2.0.1" -path = "../native/build/libs/soap-native-2.0.1.jar" +version = "2.1.0" +path = "../native/build/libs/soap-native-2.1.0-SNAPSHOT.jar" [[platform.java21.dependency]] groupId = "org.apache.wss4j" diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index b5a1a75..09db1b2 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -5,7 +5,7 @@ [ballerina] dependencies-toml-version = "2" -distribution-version = "2201.10.0-20241011-161100-51978649" +distribution-version = "2201.11.0-20241112-214900-6b80ab87" [[package]] org = "ballerina" @@ -26,13 +26,14 @@ version = "3.8.1" dependencies = [ {org = "ballerina", name = "constraint"}, {org = "ballerina", name = "jballerina.java"}, - {org = "ballerina", name = "task"} + {org = "ballerina", name = "task"}, + {org = "ballerina", name = "time"} ] [[package]] org = "ballerina" name = "constraint" -version = "1.5.1" +version = "1.6.0" dependencies = [ {org = "ballerina", name = "jballerina.java"} ] @@ -49,6 +50,15 @@ modules = [ {org = "ballerina", packageName = "crypto", moduleName = "crypto"} ] +[[package]] +org = "ballerina" +name = "data.jsondata" +version = "0.3.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.object"} +] + [[package]] org = "ballerina" name = "file" @@ -63,12 +73,13 @@ dependencies = [ [[package]] org = "ballerina" name = "http" -version = "2.12.1" +version = "2.13.0" dependencies = [ {org = "ballerina", name = "auth"}, {org = "ballerina", name = "cache"}, {org = "ballerina", name = "constraint"}, {org = "ballerina", name = "crypto"}, + {org = "ballerina", name = "data.jsondata"}, {org = "ballerina", name = "file"}, {org = "ballerina", name = "io"}, {org = "ballerina", name = "jballerina.java"}, @@ -123,7 +134,8 @@ dependencies = [ {org = "ballerina", name = "jballerina.java"}, {org = "ballerina", name = "lang.int"}, {org = "ballerina", name = "lang.string"}, - {org = "ballerina", name = "log"} + {org = "ballerina", name = "log"}, + {org = "ballerina", name = "time"} ] [[package]] @@ -225,7 +237,7 @@ dependencies = [ [[package]] org = "ballerina" name = "mime" -version = "2.10.1" +version = "2.10.2" dependencies = [ {org = "ballerina", name = "io"}, {org = "ballerina", name = "jballerina.java"}, @@ -245,13 +257,14 @@ dependencies = [ {org = "ballerina", name = "crypto"}, {org = "ballerina", name = "jballerina.java"}, {org = "ballerina", name = "log"}, + {org = "ballerina", name = "time"}, {org = "ballerina", name = "url"} ] [[package]] org = "ballerina" name = "observe" -version = "1.3.1" +version = "1.4.0" dependencies = [ {org = "ballerina", name = "jballerina.java"} ] @@ -268,7 +281,7 @@ dependencies = [ [[package]] org = "ballerina" name = "soap" -version = "2.0.1" +version = "2.1.0" dependencies = [ {org = "ballerina", name = "crypto"}, {org = "ballerina", name = "http"}, @@ -311,7 +324,7 @@ modules = [ [[package]] org = "ballerina" name = "time" -version = "2.5.1" +version = "2.6.0" dependencies = [ {org = "ballerina", name = "jballerina.java"} ] diff --git a/build-config/resources/Ballerina.toml b/build-config/resources/Ballerina.toml index d30bca5..174eae7 100644 --- a/build-config/resources/Ballerina.toml +++ b/build-config/resources/Ballerina.toml @@ -8,7 +8,7 @@ keywords = ["soap"] repository = "https://github.com/ballerina-platform/module-ballerina-soap" icon = "icon.png" license = ["Apache-2.0"] -distribution = "2201.11.0" +distribution = "2201.11.0-20241112-214900-6b80ab87" [build-options] observabilityIncluded = true diff --git a/gradle.properties b/gradle.properties index 4a9a4fd..1962954 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,30 +9,30 @@ downloadPluginVersion=5.4.0 releasePluginVersion=2.8.0 ballerinaGradlePluginVersion=2.2.4 -ballerinaLangVersion=2201.11.0-20241008-112400-81975006 +ballerinaLangVersion=2201.11.0-20241112-214900-6b80ab87 -stdlibIoVersion=1.6.2-20240928-084100-656404f -stdlibTimeVersion=2.5.1-20240930-120200-e59222b -stdlibUrlVersion=2.4.1-20240930-120200-b7fb9e1 +stdlibIoVersion=1.6.2-20241112-233100-995cf5f +stdlibTimeVersion=2.6.0-20241113-073800-201b904 +stdlibUrlVersion=2.4.1-20241113-073900-335ff51 -stdlibConstraintVersion=1.5.1-20240930-123400-5ecd396 -stdlibCryptoVersion=2.7.3-20240930-132000-5ecc9ab -stdlibLogVersion=2.10.1-20240930-154200-5ab2aa4 -stdlibOsVersion=1.8.1-20241001-120600-dd1626e -stdlibRandomVersion=1.5.1-20240930-193000-e5c6c0e -stdlibTaskVersion=2.5.1-20241002-145700-5bdb843 +stdlibConstraintVersion=1.6.0-20241113-090900-d276ad5 +stdlibCryptoVersion=2.7.3-20241113-081400-d015a39 +stdlibLogVersion=2.10.1-20241113-120000-4577868 +stdlibOsVersion=1.8.1-20241113-122000-cca973b +stdlibRandomVersion=1.5.1-20241113-122300-1bc770e +stdlibTaskVersion=2.5.1-20241113-123500-f905281 -stdlibCacheVersion=3.8.1-20241007-154900-63f4403 -stdlibFileVersion=1.10.1-20241007-160900-03f7b64 -stdlibMimeVersion=2.10.1-20241009-141200-8b6c9f0 -stdlibUuidVersion=1.8.1-20241009-134600-a05012b +stdlibCacheVersion=3.8.1-20241113-125700-b75a1bf +stdlibFileVersion=1.10.1-20241113-151700-e1a2e38 +stdlibMimeVersion=2.10.2-20241113-154200-d953747 +stdlibUuidVersion=1.8.1-20241113-154400-443c67b -stdlibAuthVersion=2.12.1-20241010-130800-733dbef -stdlibDataJsonDataVersion=0.3.0-20241105-101100-661d11f -stdlibJwtVersion=2.13.1-20241010-123600-5ea6a94 -stdlibOAuth2Version=2.12.1-20241010-123600-0e0cfcc +stdlibAuthVersion=2.12.1-20241113-162300-ded40eb +stdlibDataJsonDataVersion=0.3.0-20241113-163100-6d332e1 +stdlibJwtVersion=2.13.1-20241113-162400-b59ccfa +stdlibOAuth2Version=2.12.1-20241113-162400-4c6ddfe -stdlibHttpVersion=2.13.0-20241106-120000-d375c3b +stdlibHttpVersion=2.13.0-20241114-182900-7e9f66a wsSecurityDomVersion=3.0.1 wsSecurityCommonVersion=3.0.1 @@ -40,5 +40,5 @@ xmlSecVersion=3.0.3 guavaVersion=32.1.1-jre # Ballerinax Observer -observeVersion=1.3.1-20241007-161000-645452d -observeInternalVersion=1.3.1-20241015-172900-cdc3cb3 +observeVersion=1.4.0-20241113-092000-b83ae74 +observeInternalVersion=1.3.1-20241113-101700-265054d diff --git a/native/src/main/java/io/ballerina/lib/soap/Soap.java b/native/src/main/java/io/ballerina/lib/soap/Soap.java index a7526cf..fd3ba02 100644 --- a/native/src/main/java/io/ballerina/lib/soap/Soap.java +++ b/native/src/main/java/io/ballerina/lib/soap/Soap.java @@ -28,36 +28,33 @@ public class Soap { public static Object sendReceive11(Environment env, BObject soap11, Object body, BString action, BMap headers, BString path, BTypedesc typeDesc) { - env.yieldAndRun(() -> { + return env.yieldAndRun(() -> { try { Object[] arguments = new Object[]{body, action, headers, path}; - Object result = env.getRuntime().call(soap11, REMOTE_FUNCTION, arguments); + Object result = env.getRuntime().callMethod(soap11, REMOTE_FUNCTION, null, arguments); if (result instanceof BError) { ((BError) result).printStackTrace(); - System.exit(1); - } + return result; } catch (BError bError) { bError.printStackTrace(); System.exit(1); } return null; }); - return null; } public static Object sendReceive12(Environment env, BObject soap12, Object body, Object action, BMap headers, BString path, BTypedesc typeDesc) { - env.yieldAndRun(() -> { + return env.yieldAndRun(() -> { try { Object[] arguments = new Object[]{body, action, headers, path}; - env.getRuntime().call(soap12, REMOTE_FUNCTION, arguments); + return env.getRuntime().callMethod(soap12, REMOTE_FUNCTION, null, arguments); } catch (BError bError) { bError.printStackTrace(); System.exit(1); } return null; }); - return null; } }