Tell difference between using the application vs SOAP/server

Ok, I have a bunch of scrapes that take parameters. That's cool.

But if I "run" the scrape from within the screen-scraper application, the parameters aren't set, since I'm not passing them. That's fine, I have a script that will set a default parameter if one is lacking.

But this means if someone forgets/mistypes a parameter on the SOAP call, they get the default.

Is there some way I can (in the script) tell I'm in the app vs being called as a server/SOAP call?

R

(obligatory "you guys rock" statement here)

Tell difference between using the application vs SOAP/server

Great ideas. I think either of those options could do the trick.

Best,

Todd

Tell difference between using the application vs SOAP/server

I'm considering putting a configuration file on the filesystem of the dev boxes, which if present, will indicate debug mode/defaults should be on.

Or maybe even a webservice which provides configuration information that the scrape can hit for config info.

And that'll all happen in my "__globaldefault" script that I run before all scrapes.

R

Tell difference between using the application vs SOAP/server

Hi,

In the past we've handled this type of situation by setting (or not setting) some kind of "DEBUG" session variable to indicate if the default values should be used, or if it should rely on them being passed in. You probably have some kind of initialization script that gets run when your scraping session starts. In that script you could just include some kind of "if" block that checks for the "DEBUG" value. If the value is there it uses the default session variables; if not, it doesn't.

Another way we've handled this is to use a special initialization script only when we're developing/debugging. Once we're ready to deploy the scraping session we simply disable that script before exporting.

Does that help? Feel free to reply back, if not.

Kind regards,

Todd Wilson