tag:blogger.com,1999:blog-5874979429188093780.post3344361611009448856..comments2024-03-18T06:46:54.352+01:00Comments on Andrej Baranovskij Blog: Workaround for ADF BC REST Custom Method ConfigurationAndrej Baranovskijhttp://www.blogger.com/profile/04468230464412457426noreply@blogger.comBlogger12125tag:blogger.com,1999:blog-5874979429188093780.post-34988221733278330812018-04-11T14:56:45.382+02:002018-04-11T14:56:45.382+02:00Hi Andrejus,
Thank you. Worked like a charm.
Rega...Hi Andrejus,<br />Thank you. Worked like a charm.<br /><br />Regards,<br />SarahSarah Justinahttps://www.blogger.com/profile/00096679432815650745noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-23465011745169637702018-04-10T13:42:26.605+02:002018-04-10T13:42:26.605+02:00Hi,
You cant call custom REST method through oj.C...Hi,<br /><br />You cant call custom REST method through oj.Collection. You should use Ajax POST call to do this. In this example I'm calling custom ADF BC REST method through POST: http://andrejusb.blogspot.lt/2016/10/oracle-jet-and-adf-bc-rest-security.html<br /><br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-45919945625778157462018-04-10T13:36:35.106+02:002018-04-10T13:36:35.106+02:00Hi Andrejus,
How do I invoke a custom VO method ex...Hi Andrejus,<br />How do I invoke a custom VO method exposed in REST from JET?<br />I'm using an oj.Collection. How do I set the method name and parameters before I call collection.refresh()?<br />Assume my parameters are like<br />{<br /> "name" : "execEmpSearch",<br /> "parameters" : [<br /> {<br /> "firstName" : "Steven"<br /> },<br /> {<br /> "lastName" : "King"<br /> }<br /> ]<br />}<br />Could you help me or point me to some documentation?<br /><br />Regards,<br />SarahSarah Justinahttps://www.blogger.com/profile/00096679432815650745noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-82229105499759896162017-05-02T07:37:25.928+02:002017-05-02T07:37:25.928+02:00No, ADF BC REST is available from 12.2.1
Regards,...No, ADF BC REST is available from 12.2.1<br /><br />Regards,<br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-43076066751305138272017-05-02T06:20:19.421+02:002017-05-02T06:20:19.421+02:00Can you please let me know whether this is support...Can you please let me know whether this is supported in 11g (Studio Edition Version 11.1.1.9.0).Kiran Knoreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-92317858710633982017-03-23T18:21:39.735+01:002017-03-23T18:21:39.735+01:00Hi Andrejus,
All work fine but I'm having an ...Hi Andrejus,<br /><br />All work fine but I'm having an issue with the returned JSON format, since I'm returning a toString of a JSONArray Object.<br /><br />Before returning to the consumer the result format is correct when printed on the console: <br /><br />{"Salary":3000,"Email":"KFEENEY","FirstName":"Kevin","CommissionPct":null,"DepartmentsVO":oracle.jbo.server.ViewRowSetImpl@4f54f346,"PhoneNumber":"650.507.9822","HireDate":2006-05-23 00:00:00.0,"LastName":"Feeney","DepartmentId":50,"EmployeesVO":oracle.jbo.server.ViewRowSetImpl@30375970,"EmployeeId":197,"JobId":"SH_CLERK","ManagerId":124}<br /><br /><br /><br />After returning to the consumer(using Potsman) the result format is not correct(presence of escapes backslashes):<br /><br />{<br /> "result" : "{\"Salary\":3000,\"Email\":\"KFEENEY\",\"FirstName\":\"Kevin\",\"CommissionPct\":null,\"DepartmentsVO\":oracle.jbo.server.ViewRowSetImpl@22889d95,\"PhoneNumber\":\"650.507.9822\",\"HireDate\":2006-05-23 00:00:00.0,\"LastName\":\"Feeney\",\"DepartmentId\":50,\"EmployeesVO\":oracle.jbo.server.ViewRowSetImpl@59a60685,\"EmployeeId\":197,\"JobId\":\"SH_CLERK\",\"ManagerId\":124}"<br />}<br /><br />Thank you very much.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-46056555036503627342017-01-18T16:29:09.649+01:002017-01-18T16:29:09.649+01:00Something must be corrupted in your app - try to c...Something must be corrupted in your app - try to create again and follow step by step example from my post.<br /><br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-35475022603248205032017-01-18T14:45:41.749+01:002017-01-18T14:45:41.749+01:00Hi Andrejus, I cannot find the XML (I send a JSON ...Hi Andrejus, I cannot find the XML (I send a JSON text and not XML).<br /><br />I didn't write any xml file (except the xml in your post, but I have already checked it)<br /><br />Is there a way to find the corrupted xml (JDeveloper doesn't display errors)?Giuseppenoreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-58952801954077582582017-01-17T20:50:07.350+01:002017-01-17T20:50:07.350+01:00Yes, this is possible - we can use VO Bind Variabl...Yes, this is possible - we can use VO Bind Variables in ADF BC REST call. I will explain it in my next posts.<br /><br />Regards,<br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-8447771627714973792017-01-17T19:01:28.942+01:002017-01-17T19:01:28.942+01:00Hi Andrejus,
Good job! it's very useful. I wo...Hi Andrejus,<br /><br />Good job! it's very useful. I would like if is possible call to service that's a view with bind variable and return row? I don't know if it's possible directly or by method. In my case query it takes a lot of time and I need pass a parameter.<br /><br />Regards,<br />Alfre.Alfredo Rodríguezhttps://www.blogger.com/profile/01937564477311163164noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-3280306362144833012017-01-17T08:13:04.159+01:002017-01-17T08:13:04.159+01:00Yes, you should search for the mistype in your XML...Yes, you should search for the mistype in your XML code.<br /><br />Regards,<br />AndrejusAndrej Baranovskijhttps://www.blogger.com/profile/04468230464412457426noreply@blogger.comtag:blogger.com,1999:blog-5874979429188093780.post-32450399269726879532017-01-16T18:45:28.103+01:002017-01-16T18:45:28.103+01:00I followed your instructions, I created a simple H...I followed your instructions, I created a simple HelloWorld method exposed througth a VO. I pasted the following string in pageDefinition (xml at AM level)<br /><br /> MethodName="halloWord" IsViewObjectMethod="true" DataControl="RestServicesAMDataControl"<br /> InstanceName="data.RestServicesAMDataControl.TaskTreeLevelVO"<br /> ReturnName="data.RestServicesAMDataControl.methodResults.halloWord_RestServicesAMDataControl_TaskTreeLevelVO_halloWord_result"<br /> IterBinding="TaskTreeLevelVOIter" ><br /> <br /> <br /><br />My method is <br /><br /> public String halloWord(String name){<br /> System.out.println("sono entrato");<br /> <br /> return "hallo "+ name; <br /> }<br /><br />And i call it with a POST like this<br /><br />POST /SimpleRestServices-RESTWebService-context-root/rest/v1/TaskTreeLevel HTTP/1.1<br />HOST: 127.0.0.1:7101<br />content-type: application/x-www-form-urlencoded<br />content-length: 108<br /><br />{<br /> "name": "halloWord",<br /> "parameters": [<br /> {<br /> "name": "John"<br /> }<br /> ]<br />}<br /><br />But I got the following exception<br /><br />WatchData: MESSAGE = [ServletContext@2006521797[app:SimpleRestServices module:SimpleRestServices-RESTWebService-context-root path:null spec-version:3.1]] Servlet failed with an Exception<br />oracle.jbo.JboException: JBO-29114 ADFContext is not setup to process messages for this exception. Use the exception stack trace and error code to investigate the root cause of this exception. Root cause error code is JBO-29000. Error message parameters are {0=oracle.xml.parser.v2.XMLParseException, 1=Expected name instead of .}<br /> at oracle.jbo.uicli.mom.CpxUtils.getCpxListFromMetadata(CpxUtils.java:512)<br /> at oracle.jbo.uicli.mom.JUMetaObjectManager.loadCpx(JUMetaObjectManager.java:915)<br /> at oracle.adf.model.BindingContext.initialize(BindingContext.java:469)<br />...<br />Caused By: oracle.xml.parser.v2.XMLParseException; lineNumber: 4; columnNumber: 22; Expected name instead of .<br /> at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:326)<br /> at oracle.xml.parser.v2.XMLReader.scanNameChars(XMLReader.java:1313)<br /><br />But I cannot find the corrupted xml. Is there a solution to this problem?Giuseppenoreply@blogger.com