[OFBiz] Dev - New Service Method not found...

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

[OFBiz] Dev - New Service Method not found...

Michael Irving

I created a new service (Java).  I’ve compiled it and moved it to the OFBiz install.  I bounced OFBiz and saw that the service was loaded.  When I use the service, I get “Service method does not exist”.  What am I forgetting to do???

 

 

My service is defined as follows:

 

<service name="createEmployee" engine="java" default-entity-name="Person"

        location="com.aztec.hrms.employee.HrmsServices" invoke="createEmployee" auth="false">

    <description>Create an Employee</description>

    <auto-attributes mode="INOUT" include="pk" optional="true"/>

    <auto-attributes mode="IN" include="nonpk" optional="true"/>

    <override name="firstName" optional="false"/>

    <override name="lastName" optional="false"/>

</service>

 

 

My request map is as follows:

 

<!--  Service Requests -->   

<request-map uri="createEmployee">

    <security https="true" auth="true"/>

    <event type="service" invoke="createEmployee"/>

    <response name="success" type="request" value="viewprofile"/>

    <response name="error" type="view" value="error"/>

</request-map>

 

I verified that the service was loaded by looking in ofbiz.log:

11891[ ModelServiceReader.java:243:INFO ] Loaded 1 Service definitions from file:/E:/ofbiz_5521/applications/aztec-hrms/servicedef/services.xml

 

….and I looked at the service in Web Tools and I can see the service definition.

 

 

When I use createEmployee, I see the following in ofbiz.log:

 

66828[  ServiceDispatcher.java:381:DEBUG] [[Sync service failed...- total:0.0,since last(Begin):0.0]] - 'aztec-hrms / createEmployee'

66828[  ServiceDispatcher.java:384:ERROR]

---- exception report ----------------------------------------------------------

Service [createEmployee] threw an unexpected exception/error

Exception: org.ofbiz.service.GenericServiceException

Message: Service method does not exist (com.aztec.hrms.employee.HrmsServices.createEmployee(org.ofbiz.service.DispatchContext, java.util.Map))

 

-----------------------------------------

Michael Irving

Keynetx, Inc. - Building Solutions for Success

Mobile: (267)474.3564

Fax: (425) 871-2838

email: [hidden email]

 

* * * Visit Our Web Site: http://www.keynetx.net * * *

 

--------------------------------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited.

 


 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: [OFBiz] Dev - New Service Method not found...

David E. Jones

This appears to be a pretty basic Java issue. It is saying that the  
Java method name you specified (ie "createEmployee") in the class you  
specified does not exist. If it does exist in your .java file, make  
sure you have compiled that into a .class file and that the .class  
file is properly put on the classpath, either directly or in a .jar  
file.

I don't know if this is the case or not, but for anyone that doesn't  
have a Java background if you try to write code for OFBiz in Java you  
should probably get some help that is as local as possible for this.  
There are lots of ways of going about the above mentioned, and  
deciding on the least intrusive to the work you are trying to do can  
be tricky. It might be best to look at the build.xml files (ant build  
files) and the ofbiz-component.xml files where OFBiz actually builds  
up the classpath.

-David


On Sep 4, 2005, at 1:19 PM, Michael Irving wrote:

> I created a new service (Java).  I’ve compiled it and moved it to  
> the OFBiz install.  I bounced OFBiz and saw that the service was  
> loaded.  When I use the service, I get “Service method does not  
> exist”.  What am I forgetting to do???
>
>
>
>
>
> My service is defined as follows:
>
>
>
> <service name="createEmployee" engine="java" default-entity-
> name="Person"
>
>         location="com.aztec.hrms.employee.HrmsServices"  
> invoke="createEmployee" auth="false">
>
>     <description>Create an Employee</description>
>
>     <auto-attributes mode="INOUT" include="pk" optional="true"/>
>
>     <auto-attributes mode="IN" include="nonpk" optional="true"/>
>
>     <override name="firstName" optional="false"/>
>
>     <override name="lastName" optional="false"/>
>
> </service>
>
>
>
>
>
> My request map is as follows:
>
>
>
> <!--  Service Requests -->
>
> <request-map uri="createEmployee">
>
>     <security https="true" auth="true"/>
>
>     <event type="service" invoke="createEmployee"/>
>
>     <response name="success" type="request" value="viewprofile"/>
>
>     <response name="error" type="view" value="error"/>
>
> </request-map>
>
>
>
> I verified that the service was loaded by looking in ofbiz.log:
>
> 11891[ ModelServiceReader.java:243:INFO ] Loaded 1 Service  
> definitions from file:/E:/ofbiz_5521/applications/aztec-hrms/
> servicedef/services.xml
>
>
>
> ….and I looked at the service in Web Tools and I can see the  
> service definition.
>
>
>
>
>
> When I use createEmployee, I see the following in ofbiz.log:
>
>
>
> 66828[  ServiceDispatcher.java:381:DEBUG] [[Sync service failed...-  
> total:0.0,since last(Begin):0.0]] - 'aztec-hrms / createEmployee'
>
> 66828[  ServiceDispatcher.java:384:ERROR]
>
> ---- exception report  
> ----------------------------------------------------------
>
> Service [createEmployee] threw an unexpected exception/error
>
> Exception: org.ofbiz.service.GenericServiceException
>
> Message: Service method does not exist  
> (com.aztec.hrms.employee.HrmsServices.createEmployee
> (org.ofbiz.service.DispatchContext, java.util.Map))
>
>
>
> -----------------------------------------
> Michael Irving
> Keynetx, Inc. - Building Solutions for Success
> Mobile: (267)474.3564
> Fax: (425) 871-2838
> email: [hidden email]
>
> * * * Visit Our Web Site: http://www.keynetx.net * * *
>
> ----------------------------------------------------------------------
> ----------
> NOTICE: If received in error, please destroy and notify sender.  
> Sender does not waive confidentiality or privilege, and use is  
> prohibited.
>
>
>
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

RE: [OFBiz] Dev - New Service Method not found...

Michael Irving
In reply to this post by Michael Irving

Please ignore this….I was being stupid

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Michael Irving
Sent: Sunday, September 04, 2005 8:20 AM
To: [hidden email]
Subject: [OFBiz] Dev - New Service Method not found...

 

I created a new service (Java).  I’ve compiled it and moved it to the OFBiz install.  I bounced OFBiz and saw that the service was loaded.  When I use the service, I get “Service method does not exist”.  What am I forgetting to do???

 

 

My service is defined as follows:

 

<service name="createEmployee" engine="java" default-entity-name="Person"

        location="com.aztec.hrms.employee.HrmsServices" invoke="createEmployee" auth="false">

    <description>Create an Employee</description>

    <auto-attributes mode="INOUT" include="pk" optional="true"/>

    <auto-attributes mode="IN" include="nonpk" optional="true"/>

    <override name="firstName" optional="false"/>

    <override name="lastName" optional="false"/>

</service>

 

 

My request map is as follows:

 

<!--  Service Requests -->   

<request-map uri="createEmployee">

    <security https="true" auth="true"/>

    <event type="service" invoke="createEmployee"/>

    <response name="success" type="request" value="viewprofile"/>

    <response name="error" type="view" value="error"/>

</request-map>

 

I verified that the service was loaded by looking in ofbiz.log:

11891[ ModelServiceReader.java:243:INFO ] Loaded 1 Service definitions from file:/E:/ofbiz_5521/applications/aztec-hrms/servicedef/services.xml

 

….and I looked at the service in Web Tools and I can see the service definition.

 

 

When I use createEmployee, I see the following in ofbiz.log:

 

66828[  ServiceDispatcher.java:381:DEBUG] [[Sync service failed...- total:0.0,since last(Begin):0.0]] - 'aztec-hrms / createEmployee'

66828[  ServiceDispatcher.java:384:ERROR]

---- exception report ----------------------------------------------------------

Service [createEmployee] threw an unexpected exception/error

Exception: org.ofbiz.service.GenericServiceException

Message: Service method does not exist (com.aztec.hrms.employee.HrmsServices.createEmployee(org.ofbiz.service.DispatchContext, java.util.Map))

 

-----------------------------------------

Michael Irving

Keynetx, Inc. - Building Solutions for Success

Mobile: (267)474.3564

Fax: (425) 871-2838

email: [hidden email]

 

* * * Visit Our Web Site: http://www.keynetx.net * * *

 

--------------------------------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited.

 


 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev