Tools plugin 1.7 (improved zip & unzip)

Questions and answers on developing, deploying and using plugins and JavaBeans

Postby john.allen » Wed Jun 16, 2004 9:55 pm

Hi Paul,

I'm working on a Dynamic WebService Invoker plugin for Servoy.


I was wondering if this might be applicable to our situation here. As a cancer center we track survival of patients (different disease stages, treatments, etc.) to help find cures. If a patient has been lost to follow up, there is a website (the social security death index) in which one can enter the patient's social security number to see if their death has been reported. I developed a way within FileMaker to have it automatically query the website with the patient's SSN although I never developed a way to extract the date of death if there was one. In moving to Servoy do you think your bean might help with this? This website is subscription based. If you think it might be possible could I copy what I think are the relevant html pages and the relevant data within them to further explore this? A bean such as you are describing, combined with a method to place extracted data from the web page within the solution would be a huge step up in our efforts to track this in a timely fashion.

John
John Allen
Stanford University
john.allen
 
Posts: 515
Joined: Wed Jul 02, 2003 10:07 pm
Location: Stanford CA USA

Postby pbakker » Thu Jun 17, 2004 11:20 am

John,

It depends if the information can be accessed through webservices, based on the SOAP protocol.

Your best bet is to check with the party that hosts the service. If it is SOAP webservice based, it will be easy to implement in Servoy.

Paul
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Postby tweetie » Fri Jun 25, 2004 10:11 pm

Guys I'm kinda new to the bean thing concept.....
I put it2be_tools bean in the folder Servoy\beans.....and restarted Servoy 2 times

When i use this code I get NO
Code: Select all
if (!plugins.it2be_tools)
   application.output("no");
So...does this mean the bean is not installed....if not...what am I missing.

Another question....if i use getMaxDay would this be the correct syntax to use it?
Code: Select all
var lastday=plugins.it2be_tools.getMaxDay (globals.datum)
or
Code: Select all
var lastday=plugins.it2be_tools.getMaxDay (year, month)
User avatar
tweetie
 
Posts: 345
Joined: Thu Jan 08, 2004 11:32 am
Location: Rotterdam, Netherlands

Postby IT2Be » Fri Jun 25, 2004 10:58 pm

wow, I thought I had developed a plugin but I was wrong all along... It is a bean :D

But, tweetie, what happens when you throw the bean in the plugin folder. Does it work then?

And, the right syntax for getMaxDay is
Code: Select all
plugins.it2be_tools.getMaxDay(number [month], number [year])
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Postby Jan Aleman » Sat Jun 26, 2004 5:23 pm

Clive Sanders wrote:Meanwhile, do you have any other suggestions for an address lookup web service for the UK that would work with your plugin.


http://www.postcodeanywhere.co.uk/products/default.aspx

If the webservice doesnt work well I have a method that uses stringparsing to get the data out. Not as nice and error proof as a SOAP service I have to say.
Jan Aleman
Servoy
Jan Aleman
 
Posts: 2083
Joined: Wed Apr 23, 2003 9:49 pm
Location: Planet Earth

Postby tweetie » Sat Jun 26, 2004 8:39 pm

IT2BE wrote:wow, I thought I had developed a plugin but I was wrong all along... It is a bean :D
VEWY FUNNY

Ehm....yeah....well.....what can i say....like I said before....I'm kinda new at beans :shock:

Excellent plugin by the way
User avatar
tweetie
 
Posts: 345
Joined: Thu Jan 08, 2004 11:32 am
Location: Rotterdam, Netherlands

Problem using numberFormat

Postby SteveInLA » Wed Nov 17, 2004 12:47 am

When I attempt to use the numberFormat function on a number with a decimal, I get an error. For instance where 'price' = 1.1:

Code: Select all
return plugins.it2be_tools.numberFormat(price.toString(), '0.00');


I get this error:

java.lang.NumberFormatException: For input string: "1.1"

If the number is a whole number, there is no error.

Any ideas?
SteveInLA
 
Posts: 233
Joined: Thu Jul 29, 2004 12:00 am
Location: Southern Oregon, USA

Postby IT2Be » Wed Nov 17, 2004 10:38 am

Ah, now I see...

Why don't you do this:
Code: Select all
return plugins.it2be_tools.numberFormat(price, '0.00');
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Postby SteveInLA » Thu Nov 18, 2004 12:40 am

That's close, but not quite 100%. What confused me was the usage example that reads:
plugins.it2be_tools.numberFormat(String number, String formatString)

Now, I no longer get an error, but when the number is less than 1, the result is not formatted. For example,
Code: Select all
plugins.it2be_tools.numberFormat(1.2, '0.00');

returns $1.20 but
Code: Select all
plugins.it2be_tools.numberFormat(.12, '0.00');
returns 0.12 (no currency symbol) and
Code: Select all
plugins.it2be_tools.numberFormat(.0001, '0.####');
returns 1.0E-4. This is not a theoretical case. My application needs to return thousandths of a dollar.
SteveInLA
 
Posts: 233
Joined: Thu Jul 29, 2004 12:00 am
Location: Southern Oregon, USA

Postby IT2Be » Thu Nov 18, 2004 9:32 am

Strange but you are right. I'll have to dive into the code to see what I can find. Althought, it's a straight Java implementation.

I'll try to find some time in the next few days.
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Postby xtsr » Thu Dec 02, 2004 10:42 pm

Hi Marcel
I'd love to try your plugin, but how/where can I download? Is this just the settings of my browser or is the link missing?
Thanks,
Reto
xtsr
 
Posts: 101
Joined: Wed Jan 21, 2004 11:47 am

Postby IT2Be » Thu Dec 30, 2004 10:50 pm

Hai SteveInLA,

It took a while before I was able to renew my efforts for the tools plugin but the issue is solved.

When you want I can release it over the weekend with 4 new added functions additionally:

getClientIP()
getClientHostName()
getServerIP()
getServerHostName()

Please let me know...
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Postby Westy » Fri Dec 31, 2004 4:48 pm

This sounds very good. Looking forward to it.
Westy
 
Posts: 852
Joined: Fri Feb 13, 2004 5:27 am
Location: Lynnfield, Massachusetts USA

Previous

Return to Plugins and Beans

Who is online

Users browsing this forum: No registered users and 29 guests