You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-commits@axis.apache.org by ro...@apache.org on 2026/04/08 16:40:24 UTC

(axis-axis2-c-core) branch master updated (b4e34b024 -> da31a741c)

This is an automated email from the ASF dual-hosted git repository.

robertlazarski pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/axis-axis2-c-core.git


    from b4e34b024 Fix request-path segfault when transport descriptors are NULL in HTTP/2 mode
     new 398c626d0 Add Problems 9-10 to debug guide, fix deploy test operation name
     new 91a2e3be4 Wire _invoke_json dispatch in JsonRpcMessageReceiver for server-side services
     new da31a741c Apply Gemini review: error fallback, doc return types, get_instance note

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 docs/HTTP2_ANDROID.md                        |  51 ++++++++++++
 docs/HTTP2_JSON_DEBUG.md                     |  79 ++++++++++++++++++
 docs/HTTP2_SERVICES_DOT_XML.md               |  16 +++-
 docs/userguide/deploy-localhost.sh           |   8 +-
 src/core/receivers/axis2_json_rpc_msg_recv.c | 120 ++++++++++++++++++++++-----
 5 files changed, 245 insertions(+), 29 deletions(-)


(axis-axis2-c-core) 01/03: Add Problems 9-10 to debug guide, fix deploy test operation name

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

robertlazarski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/axis-axis2-c-core.git

commit 398c626d01c5096d5bc7b76324c95c4477dbfffa
Author: Robert Lazarski <ro...@gmail.com>
AuthorDate: Wed Apr 8 05:46:26 2026 -1000

    Add Problems 9-10 to debug guide, fix deploy test operation name
    
    - Problem 9: NULL transport descriptor segfault on request path (distinct
      from Problem 4 init-time failure — both must be fixed)
    - Problem 10: "Operation Not Found" when URL operation doesn't match
      services.xml
    - Fix deploy-localhost.sh: use portfolioVariance (a real operation) instead
      of benchmark (doesn't exist in services.xml)
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <no...@anthropic.com>
---
 docs/HTTP2_JSON_DEBUG.md           | 71 ++++++++++++++++++++++++++++++++++++++
 docs/userguide/deploy-localhost.sh |  8 ++---
 2 files changed, 75 insertions(+), 4 deletions(-)

diff --git a/docs/HTTP2_JSON_DEBUG.md b/docs/HTTP2_JSON_DEBUG.md
index 42f7ddfb9..a839a49c4 100644
--- a/docs/HTTP2_JSON_DEBUG.md
+++ b/docs/HTTP2_JSON_DEBUG.md
@@ -315,6 +315,77 @@ tail -20 /var/log/axis2c/axis2.log    # look for loading errors before the crash
 
 ---
 
+## Problem 9: Request-Path Segfault — NULL Transport Descriptor
+
+**Symptom:** Worker init succeeds (axis2.log shows "Axis2 worker created")
+but Apache child crashes on the first incoming request.
+
+**Stack trace pattern (from `coredumpctl info`):**
+```
+#0  axis2_transport_in_desc_get_recv (libaxis2_engine.so)
+#1  axis2_apache2_worker_process_request (libmod_axis2.so)
+#2  axis2_handler (libmod_axis2.so)
+#3  ap_run_handler (apache2)
+```
+
+**Root cause:** In `apache2_worker.c`, the request processing path calls:
+```c
+in_desc = axis2_conf_get_transport_in(conf, env, AXIS2_TRANSPORT_ENUM_HTTP);
+// in_desc is NULL because transportReceiver is commented out in axis2.xml
+receiver = axis2_transport_in_desc_get_recv(in_desc, env);  // SEGFAULT
+```
+
+When `transportReceiver` is absent from `axis2.xml` (correct for HTTP/2
+mode), `axis2_conf_get_transport_in()` returns NULL. The code then passes
+NULL to `axis2_transport_in_desc_get_recv()` which dereferences it.
+
+**Fix:** NULL-guard the transport descriptor before use:
+```c
+if(in_desc)
+{
+    receiver = axis2_transport_in_desc_get_recv(in_desc, env);
+    if(receiver)
+        axis2_transport_receiver_set_server_ip(receiver, env, ...);
+}
+```
+
+**Key insight:** There are **two separate crash points** when removing
+transport config from axis2.xml — one during init (Problem 4: "Transport
+sender is NULL") and one during request handling (this problem). Fixing
+Problem 4 alone is not sufficient; the request path must also tolerate
+NULL transport descriptors.
+
+---
+
+## Problem 10: "Operation Not Found" for Valid Service
+
+**Symptom in axis2.log:**
+```
+Operation Not found. Endpoint reference is : /services/MyService/someOperation
+```
+
+**Symptom in response:**
+```json
+{"error":{"message":"Service processing failed","code":500}}
+```
+
+**What it means:** The service is loaded and running, but the operation
+name in the URL path doesn't match any `<operation name="...">` in
+`services.xml`.
+
+**Diagnosis:** Check what operations are actually registered:
+```bash
+grep '<operation name=' /usr/local/axis2c/services/MyService/services.xml
+```
+
+**Common causes:**
+- URL uses a different operation name than what's in `services.xml`
+- The test/deploy script uses a placeholder operation name (e.g., `benchmark`)
+  that was never defined
+- Case sensitivity mismatch
+
+---
+
 ## Packaged Apache vs Source-Built Apache
 
 Many issues stem from path differences between these two environments:
diff --git a/docs/userguide/deploy-localhost.sh b/docs/userguide/deploy-localhost.sh
index b022d9933..66f917cfc 100755
--- a/docs/userguide/deploy-localhost.sh
+++ b/docs/userguide/deploy-localhost.sh
@@ -196,13 +196,13 @@ echo "Port 443 (HTTPS):        HTTP $HTTP_CODE"
 H2_CHECK=$(curl -k -s --http2 -o /dev/null -w "%{http_version}" https://localhost/ 2>/dev/null || echo "?")
 echo "HTTP/2 negotiation:      version $H2_CHECK"
 
-# Test FinancialBenchmarkService
+# Test FinancialBenchmarkService — use portfolioVariance (a real operation)
 echo ""
-echo "Testing FinancialBenchmarkService..."
+echo "Testing FinancialBenchmarkService/portfolioVariance..."
 BENCH_RESPONSE=$(curl -k --http2 -s -w "\n%{http_code}" \
     -H "Content-Type: application/json" \
-    -d '{"benchmark":[{"arg0":{"portfolioSize":10,"iterations":100}}]}' \
-    https://localhost/services/FinancialBenchmarkService/benchmark 2>/dev/null)
+    -d '{"n_assets":3,"weights":[0.4,0.3,0.3],"covariance_matrix":[0.04,0.006,0.002,0.006,0.09,0.009,0.002,0.009,0.01]}' \
+    https://localhost/services/FinancialBenchmarkService/portfolioVariance 2>/dev/null)
 BENCH_HTTP=$(echo "$BENCH_RESPONSE" | tail -1)
 BENCH_BODY=$(echo "$BENCH_RESPONSE" | sed '$d')
 if [ "$BENCH_HTTP" = "200" ]; then


(axis-axis2-c-core) 02/03: Wire _invoke_json dispatch in JsonRpcMessageReceiver for server-side services

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

robertlazarski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/axis-axis2-c-core.git

commit 91a2e3be4135c569b061e0898b5ce2a985e18557
Author: Robert Lazarski <ro...@gmail.com>
AuthorDate: Wed Apr 8 06:29:10 2026 -1000

    Wire _invoke_json dispatch in JsonRpcMessageReceiver for server-side services
    
    The msg_recv loaded the service .so via axutil_class_loader_create_dll but
    never called its _invoke_json function — it returned a hardcoded "Service
    loaded correctly" placeholder instead. The dlsym-based dispatch
    (try_json_direct_service_loading) was only in the fallback path for when
    the class loader failed.
    
    Now when the class loader succeeds, the msg_recv uses dlsym(RTLD_DEFAULT)
    to find <serviceclass>_invoke_json and calls it with the 4-param server-side
    signature (svc, env, json_request, msg_ctx). Falls back to placeholder only
    if the function is not found.
    
    Update HTTP2_SERVICES_DOT_XML.md step 6 to document the actual dispatch
    mechanism (dlsym + 4-param signature).
    
    Update HTTP2_ANDROID.md to explain the 2-param (Android/json_object*) vs
    4-param (server-side/char*) invoke signature discrepancy and why each
    platform needs different signatures.
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <no...@anthropic.com>
---
 docs/HTTP2_ANDROID.md                        |  51 +++++++++++
 docs/HTTP2_SERVICES_DOT_XML.md               |  16 +++-
 src/core/receivers/axis2_json_rpc_msg_recv.c | 123 ++++++++++++++++++++++-----
 3 files changed, 165 insertions(+), 25 deletions(-)

diff --git a/docs/HTTP2_ANDROID.md b/docs/HTTP2_ANDROID.md
index 6dd486571..e8fed3058 100644
--- a/docs/HTTP2_ANDROID.md
+++ b/docs/HTTP2_ANDROID.md
@@ -219,6 +219,57 @@ json_service_invoke_func_t android_static_service_lookup(...) { }
 
 Static functions have internal linkage and may be excluded from static archives.
 
+## Android vs Server-Side: Two `_invoke_json` Signatures
+
+The `axis2_json_rpc_msg_recv` framework dispatches to service functions
+using **different signatures** depending on the platform:
+
+### Android (2-param, `json_object*`)
+
+```c
+json_object* camera_control_service_invoke_json(
+    const axutil_env_t *env,
+    json_object *json_request);
+```
+
+- Resolved via the **static service registry** (`android_static_service_lookup`)
+- Uses weak/strong symbol linking — no `dlopen`/`dlsym` at runtime
+- Works with `json_object*` (json-c object pointers)
+- The Kanaha app's `axis2_static_service_adapter.c` bridges this to the
+  app's `_impl()` functions which use plain `char*` strings
+
+### Server-side / Linux (4-param, `char*`)
+
+```c
+axis2_char_t* financial_benchmark_service_invoke_json(
+    axis2_svc_t *svc,
+    const axutil_env_t *env,
+    const axis2_char_t *json_request,
+    axis2_msg_ctx_t *msg_ctx);
+```
+
+- Resolved via `dlsym(RTLD_DEFAULT, "<serviceclass>_invoke_json")` after
+  the service `.so` is loaded by `axutil_class_loader_create_dll()`
+- Has access to the `axis2_svc_t` and `axis2_msg_ctx_t` for operation
+  routing, endpoint info, and MCP catalog generation
+- Works with `axis2_char_t*` (JSON strings), not `json_object*`
+
+### Why Two Signatures?
+
+Server-side services need `svc` and `msg_ctx` to:
+- Extract the operation name from the message context (URL path dispatch)
+- Access endpoint reference for MCP catalog intercepts
+- Get configuration context for multi-service deployments
+
+Android services don't need these because:
+- The static registry already routes by service name
+- Operations are identified by the `"action"` field in the JSON body
+- There is no multi-service deployment — one app, one service
+
+Services that want to work in both environments can export both:
+- `<serviceclass>_invoke_json(svc, env, json_str, msg_ctx)` for server-side
+- `<serviceclass>_process_json_only(env, json_str)` for simpler contexts
+
 ## Linking for Android
 
 ### Direct Linking Required
diff --git a/docs/HTTP2_SERVICES_DOT_XML.md b/docs/HTTP2_SERVICES_DOT_XML.md
index f929e599d..a208a5a53 100644
--- a/docs/HTTP2_SERVICES_DOT_XML.md
+++ b/docs/HTTP2_SERVICES_DOT_XML.md
@@ -74,10 +74,18 @@ status = axis2_msg_recv_receive(receiver, env, msg_ctx,
 
 ### 6. JSON Processing Execution
 The `axis2_json_rpc_msg_recv` receiver (`src/core/receivers/axis2_json_rpc_msg_recv.c`):
-1. **Bypasses AXIOM/SOAP**: Revolutionary AXIOM-free processing
-2. **Direct JSON Parsing**: Uses json-c library for pure JSON processing
-3. **Service Function Invocation**: Directly calls the C service function
-4. **JSON Response Generation**: Returns JSON response without XML conversion
+1. **Bypasses AXIOM/SOAP**: AXIOM-free processing
+2. **Loads service .so**: Uses `axutil_class_loader_create_dll()` via the `ServiceClass` parameter
+3. **Resolves invoke function**: Uses `dlsym(RTLD_DEFAULT, "<serviceclass>_invoke_json")` to find the service's JSON handler in the already-loaded .so
+4. **Calls service function**: Invokes the 4-param server-side signature:
+   ```c
+   axis2_char_t* <serviceclass>_invoke_json(
+       axis2_svc_t *svc, const axutil_env_t *env,
+       const axis2_char_t *json_request, axis2_msg_ctx_t *msg_ctx);
+   ```
+5. **JSON Response Generation**: Returns the service's JSON response string directly
+
+**Android path**: On Android (`__ANDROID__`), services are statically linked and use a 2-param signature via the static service registry instead of dlsym. See `docs/HTTP2_ANDROID.md`.
 
 ## Configuration Parameters in services.xml
 
diff --git a/src/core/receivers/axis2_json_rpc_msg_recv.c b/src/core/receivers/axis2_json_rpc_msg_recv.c
index 84f2c28cf..f12d5d793 100644
--- a/src/core/receivers/axis2_json_rpc_msg_recv.c
+++ b/src/core/receivers/axis2_json_rpc_msg_recv.c
@@ -707,32 +707,113 @@ axis2_json_rpc_msg_recv_invoke_business_logic_sync(
                 "JsonRpcMessageReceiver: Building JSON response for service: %s, operation: %s",
                 service_name ? service_name : "unknown", operation_name ? operation_name : "NULL");
 
-            // Revolutionary: Create JSON response (service-specific processing would go here)
-            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                "[JSON RPC MSG RECV] DEBUG: Starting JSON response generation for service='%s' operation='%s'",
-                service_name ? service_name : "unknown", operation_name ? operation_name : "NULL");
-
-            axis2_char_t* part1 = axutil_stracat(env, "{\"service\":\"", service_name ? service_name : "unknown");
-            AXIS2_LOG_INFO(env->log, "[JSON RPC MSG RECV] DEBUG: part1 created: %p", (void*)part1);
-
-            if (part1) {
-                axis2_char_t* part2 = axutil_stracat(env, part1, "\",\"operation\":\"");
-                AXIS2_LOG_INFO(env->log, "[JSON RPC MSG RECV] DEBUG: part2 created: %p", (void*)part2);
+            /* Service .so loaded via axis2_get_instance — now invoke its
+             * <serviceclass>_invoke_json() to get actual computed results.
+             *
+             * Server-side services (Linux/httpd) use a 4-param signature:
+             *   axis2_char_t* <svcclass>_invoke_json(svc, env, json_str, msg_ctx)
+             *
+             * Android services use a 2-param signature via the static registry
+             * (see #ifdef __ANDROID__ path above):
+             *   json_object* <svcname>_invoke_json(env, json_object*)
+             *
+             * The .so is already loaded by axutil_class_loader_create_dll above,
+             * so dlsym(RTLD_DEFAULT, ...) finds the symbol without another dlopen.
+             * See also: docs/HTTP2_SERVICES_DOT_XML.md (step 6)
+             */
+            {
+                /* ── Step 1: Function pointer type for server-side _invoke_json ── */
+                typedef axis2_char_t* (*invoke_json_4p_t)(
+                    axis2_svc_t*, const axutil_env_t*,
+                    const axis2_char_t*, axis2_msg_ctx_t*);
+                invoke_json_4p_t invoke_func = NULL;
+                axis2_char_t *func_name = NULL;
+                axutil_dll_desc_t *dll_desc = NULL;
+                const axis2_char_t *extracted_class = NULL;
+
+                /* ── Step 2: Extract service class name from the DLL descriptor ──
+                 *
+                 * The ServiceClass parameter was already transformed by svc_builder.c
+                 * into a dll_desc containing the full library path, e.g.:
+                 *   /usr/local/axis2c/services/FinancialBenchmarkService/libfinancial_benchmark_service.so
+                 *
+                 * We extract "financial_benchmark_service" from the basename by
+                 * stripping the "lib" prefix and ".so" suffix.
+                 */
+                dll_desc = (axutil_dll_desc_t *)axutil_param_get_value(impl_class_param, env);
+                if (dll_desc) {
+                    const char *dll_path = axutil_dll_desc_get_name(dll_desc, env);
+                    if (dll_path) {
+                        const char *base = strrchr(dll_path, '/');
+                        base = base ? base + 1 : dll_path;
+                        /* e.g. "libfinancial_benchmark_service.so" -> "financial_benchmark_service" */
+                        if (strncmp(base, "lib", 3) == 0 && strlen(base) > 6) {
+                            size_t len = strlen(base) - 6; /* minus "lib" (3) + ".so" (3) */
+                            char *name = (char *)AXIS2_MALLOC(env->allocator, len + 1);
+                            if (name) {
+                                strncpy(name, base + 3, len);
+                                name[len] = '\0';
+                                extracted_class = name;
+                            }
+                        }
+                    }
+                }
 
-                if (part2) {
-                    axis2_char_t* part3 = axutil_stracat(env, part2, operation_name ? operation_name : "unknown");
-                    AXIS2_LOG_INFO(env->log, "[JSON RPC MSG RECV] DEBUG: part3 created: %p", (void*)part3);
+                /* ── Step 3: Build function name: "<serviceclass>_invoke_json" ── */
+                if (extracted_class) {
+                    func_name = axutil_stracat(env, extracted_class, "_invoke_json");
+                    AXIS2_FREE(env->allocator, (void *)extracted_class);
+                }
 
-                    if (part3) {
-                        json_response = axutil_stracat(env, part3, "\",\"status\":\"success\",\"message\":\"Service loaded correctly\"}");
-                        AXIS2_LOG_INFO(env->log, "[JSON RPC MSG RECV] DEBUG: json_response created: %p", (void*)json_response);
+                /* ── Step 4: Look up and call the service's _invoke_json ──
+                 *
+                 * The .so was already loaded by axutil_class_loader_create_dll (line 699),
+                 * so its symbols are in the global scope. RTLD_DEFAULT searches all
+                 * loaded shared objects without needing another dlopen().
+                 *
+                 * Example: for FinancialBenchmarkService this resolves to
+                 * financial_benchmark_service_invoke_json(svc, env, json_request, msg_ctx)
+                 * which routes to the correct operation and returns computed JSON.
+                 */
+                if (func_name) {
+                    invoke_func = (invoke_json_4p_t)dlsym(RTLD_DEFAULT, func_name);
+                    if (invoke_func && json_request) {
+                        AXIS2_LOG_INFO(env->log,
+                            "JsonRpcMessageReceiver: Calling %s for operation %s",
+                            func_name, operation_name ? operation_name : "unknown");
+                        json_response = invoke_func(svc, env, json_request, in_msg_ctx);
+                    }
+                    if (!invoke_func) {
+                        AXIS2_LOG_WARNING(env->log, AXIS2_LOG_SI,
+                            "JsonRpcMessageReceiver: %s not found via dlsym, using fallback",
+                            func_name);
+                    }
+                    AXIS2_FREE(env->allocator, func_name);
+                }
 
-                        // Free intermediate strings
-                        AXIS2_FREE(env->allocator, part3);
+                /* ── Step 5: Fallback if _invoke_json not found or returned NULL ──
+                 *
+                 * This covers services that don't export _invoke_json (e.g., legacy
+                 * services or services that only implement the SOAP skeleton pattern).
+                 * Returns a generic JSON acknowledgment so the caller gets valid JSON
+                 * rather than an empty response or SOAP fault.
+                 */
+                if (!json_response) {
+                    axis2_char_t *p1 = axutil_stracat(env, "{\"service\":\"", service_name ? service_name : "unknown");
+                    if (p1) {
+                        axis2_char_t *p2 = axutil_stracat(env, p1, "\",\"operation\":\"");
+                        AXIS2_FREE(env->allocator, p1);
+                        if (p2) {
+                            axis2_char_t *p3 = axutil_stracat(env, p2, operation_name ? operation_name : "unknown");
+                            AXIS2_FREE(env->allocator, p2);
+                            if (p3) {
+                                json_response = axutil_stracat(env, p3,
+                                    "\",\"status\":\"success\",\"message\":\"Service loaded (no _invoke_json handler)\"}");
+                                AXIS2_FREE(env->allocator, p3);
+                            }
+                        }
                     }
-                    AXIS2_FREE(env->allocator, part2);
                 }
-                AXIS2_FREE(env->allocator, part1);
             }
         } else {
             AXIS2_LOG_WARNING(env->log, AXIS2_LOG_SI,


(axis-axis2-c-core) 03/03: Apply Gemini review: error fallback, doc return types, get_instance note

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

robertlazarski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/axis-axis2-c-core.git

commit da31a741cecbb49e25048a16ab4732df3d719095
Author: Robert Lazarski <ro...@gmail.com>
AuthorDate: Wed Apr 8 06:38:28 2026 -1000

    Apply Gemini review: error fallback, doc return types, get_instance note
    
    - Change _invoke_json fallback from 200 "Service loaded" to 500 error
      response with LOG_ERROR — prevents masking misconfigured services
    - Add explicit return types (axis2_char_t*) to _process_json_only
      signature in HTTP2_ANDROID.md
    - Add note to HTTP2_JSON_DEBUG.md Problem 5 that services can avoid the
      axis2_get_instance signature trap by not exporting it at all (like
      bigdata-h2-service, login-service, testws-service)
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <no...@anthropic.com>
---
 docs/HTTP2_ANDROID.md                        |  4 ++--
 docs/HTTP2_JSON_DEBUG.md                     |  8 ++++++++
 src/core/receivers/axis2_json_rpc_msg_recv.c | 23 ++++++++++-------------
 3 files changed, 20 insertions(+), 15 deletions(-)

diff --git a/docs/HTTP2_ANDROID.md b/docs/HTTP2_ANDROID.md
index e8fed3058..dcbb1dfaa 100644
--- a/docs/HTTP2_ANDROID.md
+++ b/docs/HTTP2_ANDROID.md
@@ -267,8 +267,8 @@ Android services don't need these because:
 - There is no multi-service deployment — one app, one service
 
 Services that want to work in both environments can export both:
-- `<serviceclass>_invoke_json(svc, env, json_str, msg_ctx)` for server-side
-- `<serviceclass>_process_json_only(env, json_str)` for simpler contexts
+- `axis2_char_t* <serviceclass>_invoke_json(svc, env, json_str, msg_ctx)` for server-side
+- `axis2_char_t* <serviceclass>_process_json_only(env, json_str)` for simpler contexts
 
 ## Linking for Android
 
diff --git a/docs/HTTP2_JSON_DEBUG.md b/docs/HTTP2_JSON_DEBUG.md
index a839a49c4..5b53571f8 100644
--- a/docs/HTTP2_JSON_DEBUG.md
+++ b/docs/HTTP2_JSON_DEBUG.md
@@ -244,6 +244,14 @@ axis2_remove_instance(void *inst, const axutil_env_t *env)
 }
 ```
 
+**Alternative approach:** Some services (e.g., `bigdata-h2-service`,
+`login-service`, `testws-service`) avoid this trap entirely by **not
+exporting `axis2_get_instance`**. They rely solely on the `ServiceClass`
+parameter in `services.xml` and the `_invoke_json` dlsym lookup path in
+the `JsonRpcMessageReceiver`. This sidesteps the `CREATE_FUNCT` signature
+requirement altogether. Only export `axis2_get_instance` / `axis2_remove_instance`
+if your service needs custom initialization during worker startup.
+
 ---
 
 ## Problem 6: Apache Module Not Found at Install Time
diff --git a/src/core/receivers/axis2_json_rpc_msg_recv.c b/src/core/receivers/axis2_json_rpc_msg_recv.c
index f12d5d793..84fcc288c 100644
--- a/src/core/receivers/axis2_json_rpc_msg_recv.c
+++ b/src/core/receivers/axis2_json_rpc_msg_recv.c
@@ -793,24 +793,21 @@ axis2_json_rpc_msg_recv_invoke_business_logic_sync(
 
                 /* ── Step 5: Fallback if _invoke_json not found or returned NULL ──
                  *
-                 * This covers services that don't export _invoke_json (e.g., legacy
-                 * services or services that only implement the SOAP skeleton pattern).
-                 * Returns a generic JSON acknowledgment so the caller gets valid JSON
-                 * rather than an empty response or SOAP fault.
+                 * This likely indicates a misconfiguration: the service .so loaded
+                 * but doesn't export <serviceclass>_invoke_json. Returns a JSON
+                 * error (not SOAP fault) so clients get a parseable response.
                  */
                 if (!json_response) {
-                    axis2_char_t *p1 = axutil_stracat(env, "{\"service\":\"", service_name ? service_name : "unknown");
+                    AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+                        "JsonRpcMessageReceiver: Service %s loaded but has no _invoke_json handler. "
+                        "Verify the service .so exports <serviceclass>_invoke_json().",
+                        service_name ? service_name : "unknown");
+                    axis2_char_t *p1 = axutil_stracat(env, "{\"error\":{\"message\":\"Service '", service_name ? service_name : "unknown");
                     if (p1) {
-                        axis2_char_t *p2 = axutil_stracat(env, p1, "\",\"operation\":\"");
+                        axis2_char_t *p2 = axutil_stracat(env, p1, "' has no _invoke_json handler\",\"code\":500}}");
                         AXIS2_FREE(env->allocator, p1);
                         if (p2) {
-                            axis2_char_t *p3 = axutil_stracat(env, p2, operation_name ? operation_name : "unknown");
-                            AXIS2_FREE(env->allocator, p2);
-                            if (p3) {
-                                json_response = axutil_stracat(env, p3,
-                                    "\",\"status\":\"success\",\"message\":\"Service loaded (no _invoke_json handler)\"}");
-                                AXIS2_FREE(env->allocator, p3);
-                            }
+                            json_response = p2;
                         }
                     }
                 }