Hello all,

Over the past few weeks we have spent some time migrating our corba
services to webservices using Axis2. We managed to enable JSON support
using the Badgerfish convention and, since it does not require any
additional configuration, it worked as expected just by following the
documentation. However, due to the enhanced readability of the Mapped
convention in our use-case it would be preferrable - but we are facing some
issues.

I have tried following the documentation: update axis2.xml, then add the
following to the "SysM.xml" file (which corresponds to the "SysM.idl" file):
<mappings>
    <mapping xmlNamespace="http://SM/xsd <http://sm/xsd>" jsonNamespace=""/>
</mappings>

But this does not seem to have any effect, since on this request:
$ curl -H 'Content-Type: application/json' -d '{"geMgrIPs":{"MgrIPs":""}}'
https://<ip>/AXIS/services/SysM

I am getting this error (see full error at the end of this email):
{"Fault":"<soapenv:Fault xmlns:soapenv=\"
http://schemas.xmlsoap.org/soap/envelope/\
"><faultcode>soapenv:Server<\/faultcode><faultstring>*namespace mismatch
require http://SM/xsd <http://sm/xsd> found none*
<\/faultstring><detail>...<\/detail><\/soapenv:Fault>"}

I notice that the error is related to the namespace and is returned in JSON
format - to me this would mean that JSON Mapped convention handling is
enabled, however the namespace is not mapped accordingly. It seems that the
SysM.xml file is not an equivalent of the "services.xml" file - does it
only handle the corba-specific fields? Is there a way to enable the Mapped
convention on corba services?

Any insight on this issue would be much appreciated.

Thank you,
Serban

Maybe useful:
*Working example with Badgerfish convention:*
Request:
$ curl -H 'Content-Type: text/json' -d '{"xsl:getMgrIPs": {"@xmlns":
{"xsl": "http://SM/xsd <http://sm/xsd>"}, "MgrIPs": {"$":""}}}' https://
<ip>/AXIS/services/SysM

Response:
{"ns:getMgrIPsResponse":{"@xmlns":{"ns":"http://SM/xsd <http://sm/xsd>
"},"return":{"$":"0"},"MgrIPs":{"item":[{"@xmlns":{"$":"http://SM/xsd
<http://sm/xsd>"},"$":"<ip0>"},{"$":"<ip1>"},{"$":"<ip2>"}]}}}

*The full error taken from the logs:*
ERROR [2025-06-23 14:28:48,614] [org.apache.axis2.util.OnDemandLogger] -
processAxisFault() on error message: namespace mismatch require
http://SM/xsd <http://sm/xsd> found none , found a null HTTP status
from the MessageContext instance, setting HttpServletResponse status to
HttpServletResponse.SC_INTERNAL_SERVER_ERROR
org.apache.axis2.AxisFault: namespace mismatch require http://SM/xsd
<http://sm/xsd> found none
        at
org.apache.axis2.corba.receivers.CorbaMessageReceiver.invoke(CorbaMessageReceiver.java:102)
~[axis2-corba-2.0.0.jar:2.0.0]
        at
org.apache.axis2.corba.receivers.CorbaMessageReceiver.invokeBusinessLogic(CorbaMessageReceiver.java:53)
~[axis2-corba-2.0.0.jar:2.0.0]
        at
org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
~[axis2-kernel-2.0.0.jar:2.0.0]
        at
org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:106)
~[axis2-kernel-2.0.0.jar:2.0.0]
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:169)
~[axis2-kernel-2.0.0.jar:2.0.0]
        at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:181)
~[axis2-transport-http-2.0.0.jar:2.0.0]
        at
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:175)
[axis2-transport-http-2.0.0.jar:2.0.0]
        at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:590)
[tomcat-servlet-6.0-api.jar:6.0]
        at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658)
[tomcat-servlet-6.0-api.jar:6.0]
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:195)
[catalina.jar:10.1.34]
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
[catalina.jar:10.1.34]
        at
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
[tomcat-websocket.jar:10.1.34]
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
[catalina.jar:10.1.34]
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
[catalina.jar:10.1.34]
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)
[catalina.jar:10.1.34]
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
[catalina.jar:10.1.34]
        at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:483)
[catalina.jar:10.1.34]
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115)
[catalina.jar:10.1.34]
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
[catalina.jar:10.1.34]
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
[catalina.jar:10.1.34]
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)
[catalina.jar:10.1.34]
        at
org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:431)
[tomcat-coyote.jar:10.1.34]
        at
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
[tomcat-coyote.jar:10.1.34]
        at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:905)
[tomcat-coyote.jar:10.1.34]
        at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741)
[tomcat-coyote.jar:10.1.34]
        at
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
[tomcat-coyote.jar:10.1.34]
        at
org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190)
[tomcat-util.jar:10.1.34]
        at
org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
[tomcat-util.jar:10.1.34]
        at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
[tomcat-util.jar:10.1.34]
        at java.base/java.lang.Thread.run(Thread.java:858) [?:?]

Reply via email to