Customization of Service

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

Customization of Service

G.Venkata Phanindra
Hi..
     I want to make few changes with SurveyServices.xml file and i want to
move the files into my own application so as to the entire ofbiz will not be
getting effected but when i call the service in controller.xml file as
bellow
    <request-map uri="minipoll">
        <security https="false" auth="false"/>
         <event type="service" invoke="createSurveyResponse"/>
        <response name="success" type="view" value="surveyresponse"/>
        <response name="error" type="view" value="surveyresponse"/>
        <response name="asyncSuccess" type="view" value="surveyresponse"/>
    </request-map>

by default  it will go to service_servey,xml file in
applications/content/servicedef/services_servey.xml file and from there it
will look at SurveyServices.xml file in
applications/content/script/org/ofbiz/content/survey/SurveyServices.xml file
but i want to move into different location how can i change it.


--
G.Venkata Phanindra
Mob:: 9849852989
Reply | Threaded
Open this post in threaded view
|

Re: Customization of Service

Ashish Vijaywargiya-2
Hi,
 
 With the help of path attribute you can easily specify location to redirect.
 For eg :    
 <event type="simple" path="org/ofbiz/order/customer/CustomerEvents.xml" invoke="createCustomer"/>
 
 I hope this would be helpful for you.
 
 Regards
 Ashish Vijaywargiya

"G.Venkata Phanindra" <[hidden email]> wrote: Hi..
     I want to make few changes with SurveyServices.xml file and i want to
move the files into my own application so as to the entire ofbiz will not be
getting effected but when i call the service in controller.xml file as
bellow
   
       
         
       
       
       
   

by default  it will go to service_servey,xml file in
applications/content/servicedef/services_servey.xml file and from there it
will look at SurveyServices.xml file in
applications/content/script/org/ofbiz/content/survey/SurveyServices.xml file
but i want to move into different location how can i change it.


--
G.Venkata Phanindra
Mob:: 9849852989


 
---------------------------------
Do you Yahoo!?
 Next-gen email? Have it all with the  all-new Yahoo! Mail Beta.
Reply | Threaded
Open this post in threaded view
|

Re: Customization of Service

subhradeep bhatacharya
Hi Ashish/Venkata,
   
  In OfBiz a service is visible to all applications deployed. So in all the applications scope in total you cannot have two services with same name. As far my experience it will not give any exception but you cannot guarantee which service will get called when. Whenever you made any change in any service, it will be visible for all
  applications.
   
  Also according to me, we can use path attribute for event type java or simple and not for service.
   
  Bug me if I'm wrong.
   
  But sorry I have no solution for the problem. May be you can use something like wrapper service. Hope you will get workaround for it soon.
   
  Regards,
  Subhra

Ashish Vijaywargiya <[hidden email]> wrote:
  Hi,

With the help of path attribute you can easily specify location to redirect.
For eg :


I hope this would be helpful for you.

Regards
Ashish Vijaywargiya

"G.Venkata Phanindra"
wrote: Hi..
I want to make few changes with SurveyServices.xml file and i want to
move the files into my own application so as to the entire ofbiz will not be
getting effected but when i call the service in controller.xml file as
bellow








by default it will go to service_servey,xml file in
applications/content/servicedef/services_servey.xml file and from there it
will look at SurveyServices.xml file in
applications/content/script/org/ofbiz/content/survey/SurveyServices.xml file
but i want to move into different location how can i change it.


--
G.Venkata Phanindra
Mob:: 9849852989



---------------------------------
Do you Yahoo!?
Next-gen email? Have it all with the all-new Yahoo! Mail Beta.

 
---------------------------------
Do you Yahoo!?
 Next-gen email? Have it all with the  all-new Yahoo! Mail Beta.
Reply | Threaded
Open this post in threaded view
|

Re: Customization of Service

Ashish Vijaywargiya-2
Yeah you are correct subhra,
 I didn't noticed that event type is service.
 Your suggesstion is correct.
 
 Regards
 Ashish Vijaywargiya
subhradeep bhatacharya <[hidden email]> wrote: Hi Ashish/Venkata,
   
 In OfBiz a service is visible to all applications deployed. So in all the applications scope in total you cannot have two services with same name. As far my experience it will not give any exception but you cannot guarantee which service will get called when. Whenever you made any change in any service, it will be visible for all
  applications.
   
  Also according to me, we can use path attribute for event type java or simple and not for service.
   
  Bug me if I'm wrong.
   
 But sorry I have no solution for the problem. May be you can use something like wrapper service. Hope you will get workaround for it soon.
   
  Regards,
  Subhra

Ashish Vijaywargiya  wrote:
  Hi,

With the help of path attribute you can easily specify location to redirect.
For eg :


I hope this would be helpful for you.

Regards
Ashish Vijaywargiya

"G.Venkata Phanindra"
wrote: Hi..
I want to make few changes with SurveyServices.xml file and i want to
move the files into my own application so as to the entire ofbiz will not be
getting effected but when i call the service in controller.xml file as
bellow








by default it will go to service_servey,xml file in
applications/content/servicedef/services_servey.xml file and from there it
will look at SurveyServices.xml file in
applications/content/script/org/ofbiz/content/survey/SurveyServices.xml file
but i want to move into different location how can i change it.


--
G.Venkata Phanindra
Mob:: 9849852989



---------------------------------
Do you Yahoo!?
Next-gen email? Have it all with the all-new Yahoo! Mail Beta.

   
---------------------------------
Do you Yahoo!?
 Next-gen email? Have it all with the  all-new Yahoo! Mail Beta.

 
---------------------------------
Do you Yahoo!?
 Get on board. You're invited to try the new Yahoo! Mail Beta.
Reply | Threaded
Open this post in threaded view
|

Re: Customization of Service

G.Venkata Phanindra
In reply to this post by G.Venkata Phanindra
Hi..
      I have created a new service defination and i have created respective
xml files in my respective folder but i am getting the Exception that
     [java] 1186168 (http-0.0.0.0-8080-Processor4) [
RequestHandler.java:282:ERROR]
Request minipoll caused an error with the following message: Error calling
event: org.ofbiz.webapp.event.EventHandlerException: Problems getting the
service model (Cannot locate service by name (gniCreateSurveyResponse))
     [java] 1187026 (http-0.0.0.0-8080-Processor4) [         EntityExpr.java:60
:ERROR]
     [java] ---- exception report
----------------------------------------------------------
     [java] EntityExpr called with lhs as a String; consider recompiling
     [java] Exception: java.lang.Exception
     [java] Message: null
     [java] ---- stack trace
---------------------------------------------------------------


Do i need to configure my service else where.....
Regards,

Phani

On 7/24/06, G.Venkata Phanindra <[hidden email]> wrote:

>
> Hi..
>      I want to make few changes with SurveyServices.xml file and i want to
> move the files into my own application so as to the entire ofbiz will not be
> getting effected but when i call the service in controller.xml file as
> bellow
>     <request-map uri="minipoll">
>         <security https="false" auth="false"/>
>          <event type="service" invoke="createSurveyResponse"/>
>         <response name="success" type="view" value="surveyresponse"/>
>         <response name="error" type="view" value="surveyresponse"/>
>         <response name="asyncSuccess" type="view" value="surveyresponse"/>
>     </request-map>
>
> by default  it will go to service_servey,xml file in
> applications/content/servicedef/services_servey.xml file and from there it
> will look at SurveyServices.xml file in
> applications/content/script/org/ofbiz/content/survey/SurveyServices.xml file
> but i want to move into different location how can i change it.
>
>
> --
> G.Venkata Phanindra
> Mob:: 9849852989
>



--
G.Venkata Phanindra
Mob:: 9849852989
Reply | Threaded
Open this post in threaded view
|

Re: Customization of Service

subhradeep bhatacharya
Hi Phani,
   
  What I guess is that you have added a new service defination file in your application and you have missed to mount it by adding its entry in ofbiz-component.xml.
   
  For e.g.:
      <service-resource type="model" loader="main" location="servicedef/services_club.xml"/>
   
  Hope this will work for you.
   
  Regards,
  Subhra
 
"G.Venkata Phanindra" <[hidden email]> wrote:
  Hi..
I have created a new service defination and i have created respective
xml files in my respective folder but i am getting the Exception that
[java] 1186168 (http-0.0.0.0-8080-Processor4) [
RequestHandler.java:282:ERROR]
Request minipoll caused an error with the following message: Error calling
event: org.ofbiz.webapp.event.EventHandlerException: Problems getting the
service model (Cannot locate service by name (gniCreateSurveyResponse))
[java] 1187026 (http-0.0.0.0-8080-Processor4) [ EntityExpr.java:60
:ERROR]
[java] ---- exception report
----------------------------------------------------------
[java] EntityExpr called with lhs as a String; consider recompiling
[java] Exception: java.lang.Exception
[java] Message: null
[java] ---- stack trace
---------------------------------------------------------------


Do i need to configure my service else where.....
Regards,

Phani

On 7/24/06, G.Venkata Phanindra
wrote:

>
> Hi..
> I want to make few changes with SurveyServices.xml file and i want to
> move the files into my own application so as to the entire ofbiz will not be
> getting effected but when i call the service in controller.xml file as
> bellow
>
>
>
>
>
>
>
>
> by default it will go to service_servey,xml file in
> applications/content/servicedef/services_servey.xml file and from there it
> will look at SurveyServices.xml file in
> applications/content/script/org/ofbiz/content/survey/SurveyServices.xml file
> but i want to move into different location how can i change it.
>
>
> --
> G.Venkata Phanindra
> Mob:: 9849852989
>



--
G.Venkata Phanindra
Mob:: 9849852989


 
---------------------------------
How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call rates.
Reply | Threaded
Open this post in threaded view
|

Re: Customization of Service

G.Venkata Phanindra
Hi subhradeep,

Thanks allot it worked out for me........
I missed in Hurry and was strugling from last 2 hours.....

Regards
Phani

On 7/24/06, subhradeep bhatacharya <[hidden email]> wrote:

>
> Hi Phani,
>
>   What I guess is that you have added a new service defination file in
> your application and you have missed to mount it by adding its entry in
> ofbiz-component.xml.
>
>   For e.g.:
>       <service-resource type="model" loader="main"
> location="servicedef/services_club.xml"/>
>
>   Hope this will work for you.
>
>   Regards,
>   Subhra
>
> "G.Venkata Phanindra" <[hidden email]> wrote:
>   Hi..
> I have created a new service defination and i have created respective
> xml files in my respective folder but i am getting the Exception that
> [java] 1186168 (http-0.0.0.0-8080-Processor4) [
> RequestHandler.java:282:ERROR]
> Request minipoll caused an error with the following message: Error calling
> event: org.ofbiz.webapp.event.EventHandlerException: Problems getting the
> service model (Cannot locate service by name (gniCreateSurveyResponse))
> [java] 1187026 (http-0.0.0.0-8080-Processor4) [ EntityExpr.java:60
> :ERROR]
> [java] ---- exception report
> ----------------------------------------------------------
> [java] EntityExpr called with lhs as a String; consider recompiling
> [java] Exception: java.lang.Exception
> [java] Message: null
> [java] ---- stack trace
> ---------------------------------------------------------------
>
>
> Do i need to configure my service else where.....
> Regards,
>
> Phani
>
> On 7/24/06, G.Venkata Phanindra
> wrote:
> >
> > Hi..
> > I want to make few changes with SurveyServices.xml file and i want to
> > move the files into my own application so as to the entire ofbiz will
> not be
> > getting effected but when i call the service in controller.xml file as
> > bellow
> >
> >
> >
> >
> >
> >
> >
> >
> > by default it will go to service_servey,xml file in
> > applications/content/servicedef/services_servey.xml file and from there
> it
> > will look at SurveyServices.xml file in
> > applications/content/script/org/ofbiz/content/survey/SurveyServices.xml
> file
> > but i want to move into different location how can i change it.
> >
> >
> > --
> > G.Venkata Phanindra
> > Mob:: 9849852989
> >
>
>
>
> --
> G.Venkata Phanindra
> Mob:: 9849852989
>
>
>
> ---------------------------------
> How low will we go? Check out Yahoo! Messenger's low  PC-to-Phone call
> rates.
>



--
G.Venkata Phanindra
Mob:: 9849852989