Hi Girish,
did some more tests and it works well with strings as in- and output,
how about Maps and Lists?
i tried the following input: {"input":{"test":"just testing"}}
and the service definition: <attribute name="input" type="Map" mode="IN"/>
then the ofbiz log below
can you have a look?
Regards,
Hans
2020-09-27 18:56:26,801 |jsse-nio-8443-exec-6
|ObjectType |W| Exception thrown while converting type:
org.apache.ofbiz.base.conversion.ConversionException: Could not convert
just testing to Map:
at
org.apache.ofbiz.base.conversion.CollectionConverters$StringToMap.convert(CollectionConverters.java:172)
~[main/:?]
at
org.apache.ofbiz.base.conversion.CollectionConverters$StringToMap.convert(CollectionConverters.java:164)
~[main/:?]
at
org.apache.ofbiz.base.util.ObjectType.simpleTypeOrObjectConvert(ObjectType.java:350)
~[main/:?]
at
org.apache.ofbiz.service.ModelService.makeValid(ModelService.java:1589)
~[main/:?]
at
org.apache.ofbiz.service.ModelService.makeValid(ModelService.java:1516)
~[main/:?]
at
org.apache.ofbiz.service.ModelService.makeValid(ModelService.java:1503)
~[main/:?]
at
org.apache.ofbiz.service.DispatchContext.makeValidContext(DispatchContext.java:190)
~[main/:?]
at
org.apache.ofbiz.service.DispatchContext.makeValidContext(DispatchContext.java:162)
~[main/:?]
at
org.apache.ofbiz.ws.rs.ServiceRequestProcessor.process(ServiceRequestProcessor.java:64)
~[main/:?]
at
org.apache.ofbiz.ws.rs.resources.OFBizServiceResource.doGet(OFBizServiceResource.java:120)
~[main/:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
~[?:1.8.0_265]
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
~[?:1.8.0_265]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[?:1.8.0_265]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_265]
at
org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:52)
~[jersey-server-2.31.jar:?]
at
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:124)
[jersey-server-2.31.jar:?]
at
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:167)
[jersey-server-2.31.jar:?]
at
org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:176)
[jersey-server-2.31.jar:?]
at
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:79)
[jersey-server-2.31.jar:?]
at
org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:469)
[jersey-server-2.31.jar:?]
at
org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:391)
[jersey-server-2.31.jar:?]
at
org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:80)
[jersey-server-2.31.jar:?]
at
org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:253)
[jersey-server-2.31.jar:?]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:248)
[jersey-common-2.31.jar:?]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:244)
[jersey-common-2.31.jar:?]
at org.glassfish.jersey.internal.Errors.process(Errors.java:292)
[jersey-common-2.31.jar:?]
at org.glassfish.jersey.internal.Errors.process(Errors.java:274)
[jersey-common-2.31.jar:?]
at org.glassfish.jersey.internal.Errors.process(Errors.java:244)
[jersey-common-2.31.jar:?]
at
org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:265)
[jersey-common-2.31.jar:?]
at
org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:232)
[jersey-server-2.31.jar:?]
at
org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:680)
[jersey-server-2.31.jar:?]
at
org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:394)
[jersey-container-servlet-core-2.31.jar:?]
at
org.glassfish.jersey.servlet.ServletContainer.serviceImpl(ServletContainer.java:386)
[jersey-container-servlet-core-2.31.jar:?]
at
org.glassfish.jersey.servlet.ServletContainer.doFilter(ServletContainer.java:561)
[jersey-container-servlet-core-2.31.jar:?]
at
org.glassfish.jersey.servlet.ServletContainer.doFilter(ServletContainer.java:502)
[jersey-container-servlet-core-2.31.jar:?]
at
org.glassfish.jersey.servlet.ServletContainer.doFilter(ServletContainer.java:439)
[jersey-container-servlet-core-2.31.jar:?]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
[tomcat-catalina-9.0.37.jar:9.0.37]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
[tomcat-catalina-9.0.37.jar:9.0.37]
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
[tomcat-catalina-9.0.37.jar:9.0.37]
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
[tomcat-catalina-9.0.37.jar:9.0.37]
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
[tomcat-catalina-9.0.37.jar:9.0.37]
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
[tomcat-catalina-9.0.37.jar:9.0.37]
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
[tomcat-catalina-9.0.37.jar:9.0.37]
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
[tomcat-catalina-9.0.37.jar:9.0.37]
at
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690)
[tomcat-catalina-9.0.37.jar:9.0.37]
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
[tomcat-catalina-9.0.37.jar:9.0.37]
at
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373)
[tomcat-coyote-9.0.37.jar:9.0.37]
at
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
[tomcat-coyote-9.0.37.jar:9.0.37]
at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
[tomcat-coyote-9.0.37.jar:9.0.37]
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1589)
[tomcat-coyote-9.0.37.jar:9.0.37]
at
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
[tomcat-coyote-9.0.37.jar:9.0.37]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[?:1.8.0_265]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[?:1.8.0_265]
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
[tomcat-util-9.0.37.jar:9.0.37]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_265]
2020-09-27 18:56:26,808 |jsse-nio-8443-exec-6
|ModelService |W| [ModelService.makeValid] : Type
conversion of field [input] to type [Map] failed for value "just
testing": org.apache.ofbiz.base.util.GeneralException: Could not convert
just testing to Map: (Could not convert just testing to Map: )
2020-09-27 18:56:26,808 |jsse-nio-8443-exec-6
|ObjectType |W| Exception thrown while converting type:
org.apache.ofbiz.base.conversion.ConversionException: Could not convert
just testing to Map:
at
org.apache.ofbiz.base.conversion.CollectionConverters$StringToMap.convert(CollectionConverters.java:172)
~[main/:?]
at
org.apache.ofbiz.base.conversion.CollectionConverters$StringToMap.convert(CollectionConverters.java:164)
~[main/:?]
at
org.apache.ofbiz.base.util.ObjectType.simpleTypeOrObjectConvert(ObjectType.java:350)
~[main/:?]
at
org.apache.ofbiz.service.ModelService.makeValid(ModelService.java:1589)
~[main/:?]