Help to Access a Generic Service Definition

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Help to Access a Generic Service Definition

Aravind_RP
Hi all

I have written a generic service definition with header as follows.

public static String retriveCateogaryId(String productStoreId,String userLoginId);

main intension is to publish and access the internal cateogary ids through rmi.

on accessing the service via rmi it shows an exception:

 Service method does not exist (org.ofbiz.hello3.CateogaryId.retriveCateogaryId(org.ofbiz.service.DispatchContext, java.util.Map))
org.ofbiz.service.GenericServiceException: Service method does not exist (org.ofbiz.hello3.CateogaryId.retriveCateogaryId(org.ofbiz.service.DispatchContext, java.util.Map))
        at org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:100)
        at org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:54)
        at org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:384)
        at org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:213)
        at org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:149)
        at org.ofbiz.service.rmi.RemoteDispatcherImpl.runSync(RemoteDispatcherImpl.java:52)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
        at sun.rmi.transport.Transport$1.run(Transport.java:153)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
        at java.lang.Thread.run(Thread.java:595)
        at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
        at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
        at org.ofbiz.service.rmi.RemoteDispatcherImpl_Stub.runSync(Unknown Source)
        at Hello3Client.main(Hello3Client.java:56)
java.lang.NoSuchMethodException: org.ofbiz.hello3.CateogaryId.retriveCateogaryId(org.ofbiz.service.DispatchContext, java.util.Map)
        at java.lang.Class.getMethod(Class.java:1581)
        at org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:95)
        at org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:54)
        at org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:384)
        at org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:213)
        at org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:149)
        at org.ofbiz.service.rmi.RemoteDispatcherImpl.runSync(RemoteDispatcherImpl.java:52)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
        at sun.rmi.transport.Transport$1.run(Transport.java:153)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
        at java.lang.Thread.run(Thread.java:595)
java.lang.NoSuchMethodException: org.ofbiz.hello3.CateogaryId.retriveCateogaryId(org.ofbiz.service.DispatchContext, java.util.Map)
        at java.lang.Class.getMethod(Class.java:1581)
        at org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:95)
        at org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:54)
        at org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:384)
        at org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:213)
        at org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:149)
        at org.ofbiz.service.rmi.RemoteDispatcherImpl.runSync(RemoteDispatcherImpl.java:52)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
        at sun.rmi.transport.Transport$1.run(Transport.java:153)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
        at java.lang.Thread.run(Thread.java:595)

my service description and definition as follows:

<service name="retriveCateogaryId" engine="java" auth="false" export="true"
        location="org.ofbiz.hello3.CateogaryId" invoke="retriveCateogaryId">
        <description>Retrives all Cateogary Id</description>
        <attribute name="productStoreId" mode="IN" type="String" optional="true"/>
         <attribute name="userLoginId" mode="IN" type="String" optional="true"/>
        <attribute name="cateogaryId" mode="OUT" type="String" optional="false"/>
        </service>
Please help me as soon as possible as i am stuck on this for quite a few days now.