A small correction, "Suppose, if we want to create a wrapper for *finding a party / listing parties from Party module,* then we don’t have a proper service that satisfies the requirement" The example which I was referring is finding invoice / listing invoice from Accounting module.
On Wed, Apr 10, 2019 at 10:18 PM Rahul Utkoor <[email protected]> wrote: > Hello Jacques, > > Thanks for pointing to that issue. I had gone through the responses and > understood few of the trials made. However, I have couple of questions: > > > 1. > > In some of the mid comments people are talking about writing a wrapper > for OFBIZ services, why can’t we use it directly and extend it which is > considered to be less effort than writing everything from > scratch?(Temporary solution for the current developers) > 2. > > Since the work is still in progress, if someone wants to build REST > APIs for non-services, then what could be best way to achieve it?(As far as > I see converting non-services functionalities to services seems to be the > only possible solution, please correct me if i am wrong) > > > Similar to the approach as mentioned by Adrian > <https://issues.apache.org/jira/browse/OFBIZ-4274?focusedCommentId=13031517&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13031517> > , we followed the below approach to write wrappers to the services. > > - > > We collected all the services and its respective parameters/attributes > and generated the api structure for each and every service > - > > We are able to smoothly use the REST APIs for the services (no > authentication integration yet) > > > We are facing the below issues while trying to create REST Wrappers for > the non-services, > > - > > Suppose, if we want to create a wrapper for finding a party / listing > parties from Party module, then we don’t have a proper service that > satisfies the requirement > - > > Currently we followed a crude approach by writing a service for > it(which is not working properly, facing some parameter matching issues, > since it involves internal calls to multiple entities) > > > We felt the above approach to be apt. Welcome feedback and comments on the > approach. > > Is it possible to automate for writing the wrappers to OFBIZ non-services? > > > > > On Tue, Apr 9, 2019 at 12:11 PM Jacques Le Roux < > [email protected]> wrote: > >> Hi Rahul, >> >> Are you aware of the effort at >> https://issues.apache.org/jira/browse/OFBIZ-4274 ? >> >> Thanks >> >> Jacques >> >> Le 08/04/2019 à 20:01, Rahul Utkoor a écrit : >> > Hello Smits, >> > >> > I apologise for the late reply, I was busy with my exams and projects. >> > >> > *Our Approach :* >> > We referred to the Services list provided by ofbiz and generated a >> template >> > API wrapper for the services. This wrapper is working for Post calls. We >> > are currently working on the REST APIs and our ultimate goal is to >> > contribute back to the Community. >> > >> > *Project Git link* : >> > https://github.com/sbv-solutions-private-limited/ofbiz-framework >> > >> > You may find the wrappers written in the below link, >> > >> https://github.com/sbv-solutions-private-limited/ofbiz-framework/blob/trunk/hot-deploy/rest/src/main/java/org/cfbiz/rest/custom/PingResource.java >> > >> > Please feel free to ask questions/queries related to our approach. >> > >> > On Thu, Mar 21, 2019 at 9:42 PM Pierre Smits <[email protected]> >> wrote: >> > >> >> Hi Rahul, >> >> >> >> I would say that many of our (potential) adopters and contributors >> would >> >> interested to learn how you have achieved the implementations of the >> REST >> >> functionalities on services. >> >> >> >> Can you explain your approach a bit more? >> >> >> >> Maybe, when explaining a bit more, this will trigger other >> contributors to >> >> share their insights/approached to help you move forward. While at the >> same >> >> time, have the community come up with an acceptable approach to have >> such >> >> in play in the code base. >> >> >> >> >> >> Best regards, >> >> >> >> Pierre Smits >> >> >> >> *Apache Trafodion <https://trafodion.apache.org>, Vice President* >> >> *Apache Directory <https://directory.apache.org>, PMC Member* >> >> Apache Incubator <https://incubator.apache.org>, committer >> >> *Apache OFBiz <https://ofbiz.apache.org>, contributor (without >> privileges) >> >> since 2008* >> >> Apache Steve <https://steve.apache.org>, committer >> >> >> >> >> >> On Thu, Mar 21, 2019 at 1:29 PM Rahul Utkoor >> >> <[email protected]> wrote: >> >> >> >>> Hi smits, >> >>> >> >>> We are able to write the rest api's for the services(for >> adding/updating >> >>> the data) provided by ofbiz. Right now we are facing the difficulty >> with >> >>> non-service functionalities(mostly for listing and getting the data). >> >>> >> >>> On Thu, Mar 21, 2019 at 4:42 PM Pierre Smits <[email protected]> >> >>> wrote: >> >>> >> >>>> That would suggest a rest >> >>>> >> >>>> On Thu, 21 Mar 2019 at 12:05 Rahul Utkoor <[email protected] >> >>>> .invalid> >> >>>> wrote: >> >>>> >> >>>>> Hi Girish, >> >>>>> >> >>>>> Thanks for the reply. >> >>>>> Yes, In our case an external system wants to interact with Ofbiz and >> >>> get >> >>>>> information. >> >>>>> >> >>>>> On Wed, Mar 20, 2019 at 5:49 PM Girish Vasmatkar < >> >>>>> [email protected]> wrote: >> >>>>> >> >>>>>> Hi Rahul >> >>>>>> >> >>>>>> Do you have an external system that wants to talk to OFBiz and thus >> >>>>> require >> >>>>>> an interface/wrapper/web service to extract data from OFBiz? >> >>>>>> >> >>>>>> Best - >> >>>>>> Girish >> >>>>>> >> >>>>>> On Wed, Mar 20, 2019 at 1:24 PM Rahul Utkoor >> >>>>>> <[email protected]> wrote: >> >>>>>> >> >>>>>>> Hello all, >> >>>>>>> >> >>>>>>> We are having a requirement of writing a wrapper for >> >>> listing/getting >> >>>>> the >> >>>>>>> data for the functionalities in accounting module of Ofbiz. For >> >>> some >> >>>> of >> >>>>>> the >> >>>>>>> listing functionalities, Ofbiz UI is tightly coupled with the >> >>> backend >> >>>>>>> implementation. In a crude way we can rewrite all the >> >>> functionalities >> >>>>>> using >> >>>>>>> entityquery method, but it involves lot of effort to redo it for >> >>> all >> >>>> of >> >>>>>>> them. Is there any optimal way to make use of existing methods? >> >>>>>>> Any suggestions are most welcome. >> >>>>>>> >> >>>>>>> -- >> >>>>>>> >> >>>>>>> *Thanks & Regards,* >> >>>>>>> *Rahul.* >> >>>>>>> >> >>>>> >> >>>>> -- >> >>>>> >> >>>>> *Thanks & Regards,* >> >>>>> *Rahul.* >> >>>>> >> >>>> -- >> >>>> Sent from my phone >> >>>> >> >>> >> >>> -- >> >>> >> >>> *Thanks & Regards,* >> >>> *Rahul.* >> >>> >> > >> > > > -- > > *Thanks & Regards,* > *Rahul.* > -- *Thanks & Regards,* *Rahul.*
