Using RestServiceAdapter in ADF Mobile 11.1.2.4.0 - oracle-adf

After migrating to ADF Mobile 11.1.2.4 , the RestServiceAdapter library cannot connect to URL, or load the page that calls URL.
RestServiceAdapter restServiceAdapter = Model.createRestServiceAdapter();
restServiceAdapter.clearRequestProperties();
restServiceAdapter.setConnectionName("twitter");
restServiceAdapter.setRequestType(RestServiceAdapter.REQUEST_TYPE_GET);
restServiceAdapter.setRetryLimit(0);
restServiceAdapter.setRequestURI("/search.json?q=OC_WIRE");
String response = "";
try {
response = restServiceAdapter.send("");
} catch (Exception e) {
System.out.println("Error...");
}
This code works fine in ADF Mobile 11.1.2.3.
Thanks for the replies

Since ADF 11.1.2.3 is using Phonegap and the latest is using Cordova, i think the best way to recreate the project back in ADF 11.1.2.4

Related

How to embed/render SSRS report in a ReactJS + .Net core Web API application

I have an application developed in .Net core 5 for backend and React JS for front end. I also have some existing SSRS reports which needs to be rendered in the application. How can I embed/render these SSRS reports in ReactJS application?
I have addressed this problem by generating URL Access urls and linking to them. You can also put them in iframes.
const makeReportLink = (reportPath, reportParams = {}, zoom = 100) => {
const reportViewerUrl = 'http://report-server-host/ReportServer_SSRS/Pages/ReportViewer.aspx';
const reportParamDefaults = {
'rs:Command': 'Render',
'rc:Parameters' : 'false',
'rc:Zoom': zoom,
};
let reportSP = new URLSearchParams({...reportParamDefaults, ...reportParams});
return `${reportViewerUrl}?${reportPath}&${reportSP.toString()}`;
}
I have done following to achieve this
Created One POST API, it saves dictionary of Report params in txt file with Unique GUID.
Sent Iframe request like http://servername/reportviewer.aspx?reportid= from React app to .Net Application Report Viewer aspx page (Microsoft.ReportViewer.WebForms) with unique GUID, that page gets all params from txt file , sets Authentication , Get Repprt Data from SSRS and show Report Data.
Since SSRS opens in IFrame, on refresh it will look for session, which will not be found in React App, for that below web.config additon is required in .net application:
<sessionState cookieless="true" mode="InProc" sqlConnectionString="data source=127.0.0.1;user id=sa;password=" stateConnectionString="tcpip=127.0.0.1:42424" timeout="8000"/>
cookieless="true" is important other wise you will get "asp.net session has expired or could not be found" Error.

How to Create Webview in Laravel or ReactJS (WebApplication)

I want to open another web page in my single page. I try iframe,embed ,httprequest but not safely and not working. How can I create this page ? I develop winform application before and use cefsharp. This very basicly. But web application not supported this operation. I found Laravel Dusk but not this was not what I was looking for. Laravel Dusk run background and automation system. I think, I should use javascript framework but I can't open antoher webpage inside. I tryed use HttpRequest, download web page download and parse html but not work functions.

Automate Adobe PDF web forms (XFA) using selenium web driver

How to automate Adobe PDF web forms (XFA) using selenium web driver ? How to inspect elements in order to input text or click submit button in PDF forms ? These pdf forms are only supported by IE and no other browsers
Selenium Webdriver can only perform operations on DOM.
Can you right click on the form and see if view source option is coming?If not,then i don't think you can input anything on your Adobe PDF using Selenium Webdriver.
You can't automate PDF file but yes you can verify any text any content in PDF file. You can try below code if it met your requirement
Try below code:-
public void ReadPDF() throws Exception {
URL TestURL = new URL("http://www.axmag.com/download/pdfurl-guide.pdf");
BufferedInputStream TestFile = new BufferedInputStream(TestURL.openStream());
PDFParser TestPDF = new PDFParser(TestFile);
TestPDF.parse();
String TestText = new PDFTextStripper().getText(TestPDF.getPDDocument());
Assert.assertTrue(TestText.contains("Open the setting.xml, you can see it is like this"));
}
Download libraries :- https://pdfbox.apache.org/index.html
Hope it will help you :)

skybound.geckofx offline browsing C# .net 4.0 winforms

I am using skybound.geckofx .net wrapper to show stored web content in my winforms app. Some of this pages has links and js refers to online content. Is any simple way to disable downloading online content in geckofx wrapper ?
browser.Navigating += (sender, args) => { if (IsLinkOnLine(sender.Uri)) args.Cancel = true; };
Where IsLinkOnLine is a function that returns true if Uri referees to 'online content'.
browser is a GeckoWebBrowser instance.
I would also recommend using a newer version of geckofx https://bitbucket.org/geckofx/ if you've not already.

web browser content changing event windows phone

I am using a web browser in my windows phone app to display an advertisement. I used iframe to load the advertisement link in web browser. After every 10 sec a new advertisement will load.
How can I get the event when the content in web browser changing ?.. ie when the time the new advertisement is loading.
Because I need to parse an xml each time when the content in the web browser changes.
Thanks
Arun
You need to write a bit of JavaScript that will send a notification to your C# code. When you IFrame loads the next advert, send a notification:
window.external.notify("Advert changed");
Then handle the ScriptNotify event on the brwsoer control:
void Browser_ScriptNotify(object sender, NotifyEventArgs e)
{
if (e.Value == ""Advert changed")
{
// do something!
}
}
See a worked example on MSDN here.

Resources