Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » EGL Development Tools » HTTP Request(How to in EGL)
HTTP Request [message #926573] Fri, 28 September 2012 19:41 Go to next message
Nathan Reed is currently offline Nathan ReedFriend
Messages: 74
Registered: June 2012
Member
I am integrating some BIRT report function.

I need to post a URL to initiate the creation of a PDF.

Is there a simple way to load a URL in EGL?

There is no web page in this case but now I realize I have not had the need to just load a web page while in EGL. I assume there is a way but I am just not finding it.

Thx,

Nathan Reed
Re: HTTP Request [message #926579 is a reply to message #926573] Fri, 28 September 2012 19:46 Go to previous messageGo to next message
Richard Moulton is currently offline Richard MoultonFriend
Messages: 92
Registered: August 2011
Location: Devon, UK
Member
Hi Nathan,

Not complete sure what you mean. Do you mean something like this post?

http://www.eclipse.org/forums/index.php/m/895672/#msg_895672

Richard
Re: HTTP Request [message #926599 is a reply to message #926579] Fri, 28 September 2012 20:11 Go to previous messageGo to next message
Nathan Reed is currently offline Nathan ReedFriend
Messages: 74
Registered: June 2012
Member
Richard:

I do not want to show the URL on a page. I want to actually execute the http request based on the url.

In this particular case I will be causing the BIRT application to generate a PDF. The http request in this case will not return anything. It will just fire off a BIRT function.

But this has also caused me to wonder how do I simply navigate to some web page from within EGL (no user involved).

I will need to do this from a service program in batch. I will also need to do it from RichUI but could call a service to cause it to happen.

It would seem that this would be simple but I am just not seeing it.

I am able to cause it to occur via an Iframe using src=urlurlurlurl. But I do not want any graphic interface in this case. I simply need to fire the request.

Hope I am making sense.

thx,

Nate......



Re: HTTP Request [message #928680 is a reply to message #926599] Sun, 30 September 2012 22:08 Go to previous messageGo to next message
Richard Moulton is currently offline Richard MoultonFriend
Messages: 92
Registered: August 2011
Location: Devon, UK
Member
Hi Nathan,

I don't think I'm going to be able to help with this one. It sounds as though you need to perform an http post as an RPC service. I presume this is performed in a similar method to the http get method shown in the link I previously mentioned, though I have no experience of this. I've also no experience of executing these services from the server though I'm sure I read somewhere that you call a service from a server function in the same manner as a client, though on the server the call is synchronous.

The method outlined in the forum post I linked to returned a web page. Although in the post you saw this being loaded to a widget in practice I'm using the method to return the web page content to a string variable and then analyse it to extract the data I'm interested in.

Richard
Re: HTTP Request [message #929182 is a reply to message #928680] Mon, 01 October 2012 09:28 Go to previous messageGo to next message
Nathan Reed is currently offline Nathan ReedFriend
Messages: 74
Registered: June 2012
Member
Richard:

I misunderstood the first post you supplied. I believe this probably does do what I need. I am out of time right now but will get back to this.

I misspoke on the return of data in my particular example. I thought BIRT could be told not to return data when building a PDF but now realize that is probably not the case and now that I understand the method you referenced it would not be an issue. I have redesigned my approach and am now just using a render to my screen to accomplish the PDF building.

I am not sure on the server side but believe you are correct. I am going to wait till I have time to work it out in detail.

Sorry for being so slow. Have too many new issues at once going on.

Thanks much for taking the time.

Do you do any formal printing function from EGL? And if so what tool/approach are you using? I stumbled onto BIRT via RBD. Easy to learn and use and now have an approach worked out for a rudimentary interface in EDT.

Thx again,

Nathan Reed



Re: HTTP Request [message #929402 is a reply to message #929182] Mon, 01 October 2012 12:29 Go to previous messageGo to next message
Richard Moulton is currently offline Richard MoultonFriend
Messages: 92
Registered: August 2011
Location: Devon, UK
Member
Nathan,

No problem, I spend a lot of my time in the 'more problems, than answers' zone, so know exactly how you feel.

I've not used EGL/EDT to produce any form of reports, yet. I've read with interest various posts on the subject of using BIRT but have not as yet tried it out. One of these days.

Anyway, I'm glad you've solved your problem.

Richard
Re: HTTP Request [message #929703 is a reply to message #929182] Mon, 01 October 2012 17:26 Go to previous messageGo to next message
Dan Darnell is currently offline Dan DarnellFriend
Messages: 145
Registered: November 2011
Location: Arkansas
Senior Member

Using BiRT here with EGL in RBD and it works very well. We're not actually using the interface that allows you to code EGL as a means of providing data to BiRT reports. Rather, we just design BiRT reports using its own tools but invoke those reports out of EGL as desired. I haven't tried doing background report creation though (ours always pop up the generated report on the client system).

Here's our RBD implementation:
Property used to somewhat soft-code the server reference...
reportRoot=http://www.myserver.com/birt/frameset?__report=

External type used to launch report in new window...
launch Launch {};
launch.openWindow(Properties.reportRoot, reportName);

External type details...
externalType Launch extends Widget type JavaScriptObject {
	relativePath = "com/xxxxxx/custom/widgets",
	javaScriptName = "Launch" }
	
	function openWindow(host string in, path string in) returns(boolean);
	
end

egl.defineClass(
'com.xxxxxx.custom.widgets', 'Launch',							
{	
	"openWindow" : function (host, path) {
		var windowUrl=host+escape(path);
		m = window.open(windowUrl,'newwindow','resizable=yes'); 
		return true;
	}
});
Re: HTTP Request [message #930580 is a reply to message #929703] Tue, 02 October 2012 12:59 Go to previous message
Nathan Reed is currently offline Nathan ReedFriend
Messages: 74
Registered: June 2012
Member
Dan:

Thx much. I spent a lot of time in RBD getting the EGL interface working and did not get much out of it. Nice to know what others are doing.

Nathan Reed
Previous Topic:Extending the RUI widget set
Next Topic:EGL test program part encounters error during "JNDI lookup"
Goto Forum:
  


Current Time: Sat Oct 05 20:56:22 GMT 2024

Powered by FUDForum. Page generated in 0.04869 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top