I defined a service xml like this:
<service verb="targetExample">
<in-parameters><parameter name="testInput"/></in-parameters>
<out-parameters><parameter name="testOutput"/></out-parameters>
<actions>
<set field="testOutput" value="Input was: ${testInput}"/>
<log level="info" message="targetExample testOutput: '${testOutput}'"/>
</actions>
</service>
I was curious if there is a chance to call it without adding a transition to wrap it. I tried to respect the service naming ${path}.${verb}#${noun} but in vain, i cannot call it without defining the following transition.
<transition name="localExample">
<service-call name="moqui.example.ExampleServices.targetExample" web-send-json-response="true"/>
<default-response type="none"/>
</transition>
Also, I was also wondering if someone managed to implement a service in java instead of groovy (I read in the documentation that it is possible). What I ask for is a working example of test.java file in the following definition:
<service verb="targetJavaExample" type="java"
location="component://example/src/orq/moqui/example/test.java">
<in-parameters><parameter name="testInput"/></in-parameters>
<out-parameters><parameter name="testOutput"/></out-parameters>
</service>