Skip to main content



      Home
Home » Archived » BIRT » Accessing POST data in Scripted Data Source
Accessing POST data in Scripted Data Source [message #252390] Tue, 14 August 2007 13:34 Go to next message
Eclipse UserFriend
So I've come across a need to allow an XML string to be "sent" to the BIRT
runtime engine and be used as a datasource. Seems like it is not possible
using the current set of datasource types, so I thought perhaps a Scripted
Data Source would be possible.

Not being a Java programmer, I need some help in going the right direction.
I looked at the example of creating a new Java class for use as a new
Scripted Datasource and it seemed pretty straightforward. Guess my biggest
problem is how will I access the POST data in that class? Any other help you
can provide will be appreciated.

~Dave
Re: Accessing POST data in Scripted Data Source [message #252411 is a reply to message #252390] Tue, 14 August 2007 15:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vencat.b.gmail.com

Create a report parameter with same name as the name you are posting from
web page and access this parameter in your scripted datasource open or any
method as params["YOURPARAM"]




"Dave Greco" <dgreco3917@yahoo.com> wrote in message
news:f9sp43$r46$1@build.eclipse.org...
> So I've come across a need to allow an XML string to be "sent" to the BIRT
> runtime engine and be used as a datasource. Seems like it is not possible
> using the current set of datasource types, so I thought perhaps a Scripted
> Data Source would be possible.
>
> Not being a Java programmer, I need some help in going the right
> direction. I looked at the example of creating a new Java class for use as
> a new Scripted Datasource and it seemed pretty straightforward. Guess my
> biggest problem is how will I access the POST data in that class? Any
> other help you can provide will be appreciated.
>
> ~Dave
>
>
>
>
Re: Accessing POST data in Scripted Data Source [message #252579 is a reply to message #252411] Wed, 15 August 2007 15:10 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for the pointer, it got me going in the right direction. I've created
the scripted datasource and a Java class for doing the XML parsing. Works
fine on my desktop in the report designer. Now, where do I put it on the app
server (birt runtime)?



"venc" <vencat.b@gmail.com> wrote in message
news:f9svho$ee2$1@build.eclipse.org...
> Create a report parameter with same name as the name you are posting from
> web page and access this parameter in your scripted datasource open or any
> method as params["YOURPARAM"]
>
>
>
>
> "Dave Greco" <dgreco3917@yahoo.com> wrote in message
> news:f9sp43$r46$1@build.eclipse.org...
>> So I've come across a need to allow an XML string to be "sent" to the
>> BIRT runtime engine and be used as a datasource. Seems like it is not
>> possible using the current set of datasource types, so I thought perhaps
>> a Scripted Data Source would be possible.
>>
>> Not being a Java programmer, I need some help in going the right
>> direction. I looked at the example of creating a new Java class for use
>> as a new Scripted Datasource and it seemed pretty straightforward. Guess
>> my biggest problem is how will I access the POST data in that class? Any
>> other help you can provide will be appreciated.
>>
>> ~Dave
>>
>>
>>
>>
>
>
Re: Accessing POST data in Scripted Data Source [message #252794 is a reply to message #252579] Thu, 16 August 2007 13:36 Go to previous message
Eclipse UserFriend
Figured it out. Had to create a JAR file of the Java class, and place in
birt.war/scriptlib



"Dave Greco" <dgreco3917@yahoo.com> wrote in message
news:f9vj2l$344$1@build.eclipse.org...
> Thanks for the pointer, it got me going in the right direction. I've
> created the scripted datasource and a Java class for doing the XML
> parsing. Works fine on my desktop in the report designer. Now, where do I
> put it on the app server (birt runtime)?
>
>
>
> "venc" <vencat.b@gmail.com> wrote in message
> news:f9svho$ee2$1@build.eclipse.org...
>> Create a report parameter with same name as the name you are posting from
>> web page and access this parameter in your scripted datasource open or
>> any method as params["YOURPARAM"]
>>
>>
>>
>>
>> "Dave Greco" <dgreco3917@yahoo.com> wrote in message
>> news:f9sp43$r46$1@build.eclipse.org...
>>> So I've come across a need to allow an XML string to be "sent" to the
>>> BIRT runtime engine and be used as a datasource. Seems like it is not
>>> possible using the current set of datasource types, so I thought perhaps
>>> a Scripted Data Source would be possible.
>>>
>>> Not being a Java programmer, I need some help in going the right
>>> direction. I looked at the example of creating a new Java class for use
>>> as a new Scripted Datasource and it seemed pretty straightforward. Guess
>>> my biggest problem is how will I access the POST data in that class? Any
>>> other help you can provide will be appreciated.
>>>
>>> ~Dave
>>>
>>>
>>>
>>>
>>
>>
>
>
Previous Topic:HELP: show only groups in the generated report
Next Topic:Deploying BIRT runtime as a part of other web app
Goto Forum:
  


Current Time: Wed May 14 12:40:34 EDT 2025

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

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

Back to the top