Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with data update from external system rule

Highlighted
Jan Gunnar Helg
Senior Member

Problem with data update from external system rule

I have created a small webbased script

http://someserver.com/script/UpdateACtivityLog.aspx?U=xxx

I have tried various vays to add this to an UI rule using the Data Update From External System method but I always end up with the following error message when it executes:

java.lang.StringIndexOutOfBoundsException: String index out of range: -1

Any tips?
13 REPLIES
Vasily Kamenev
Honored Contributor

Re: Problem with data update from external system rule

HI
As I remember this error come if you received fields more then exist, example: return one value, but like receive 2.

Vasily
Ruth Porter
Honored Contributor

Re: Problem with data update from external system rule

Can you post a screen shot of how you have the action up?

Regards, Ruth
http://www.teamultra.net
Jan Gunnar Helg
Senior Member

Re: Problem with data update from external system rule

Attached.

I have tried making this as a DB rule aswell, and also tried adding other parameteres both to the url and the rest of the form withouth sucess (same error always)

Note that the script is executed as I can see it in the log file it produces, but the information entered is blank.
Ruth Porter
Honored Contributor

Re: Problem with data update from external system rule

Hi there,

You do not seem to have specified anywhere for as response from your script to be put.

Does your script send anything back?

Regards, ruth
http://www.teamultra.net
Jan Gunnar Helg
Senior Member

Re: Problem with data update from external system rule

Nope, it is just a small test script that adds the paramater specified in a log file.
Jan Gunnar Helg
Senior Member

Re: Problem with data update from external system rule

Have any of you guys been sucessful in creating an asp script that lets you provide parameters withough getting the dreaded error "String index out of range: -1"
?
Vasily Kamenev
Honored Contributor

Re: Problem with data update from external system rule

Did you try return the "n_fields=0" as answer? Perhaps a help.

Vasily
Vasily Kamenev
Honored Contributor

Re: Problem with data update from external system rule

wait, some time before I use IIS for this task, and problem was in IIS, they not correctly understood the request and do as GET, but need as POST. Check the IIS configurations!

Vasily
Jan Gunnar Helg
Senior Member

Re: Problem with data update from external system rule

Vasily, where do I set this in IIS?

I think I found it, check my screenshot.

What should I set it to?
Vasily Kamenev
Honored Contributor

Re: Problem with data update from external system rule

In IIS properties where extensions link with commands: POST,GET .. ALL.

Vasily
Jan Gunnar Helg
Senior Member

Re: Problem with data update from external system rule

If you see my screenshot I already have them all: GET,HEAD,POST,TRACE

I also tried "All verbs" aswell. It didnt work.
Vasily Kamenev
Honored Contributor

Re: Problem with data update from external system rule

hm, on your pictire .asp, but in line .aspx. -> http://someserver.com/script/UpdateACtivityLog.aspx?U=xxx

Vasily
Jan Gunnar Helg
Senior Member

Re: Problem with data update from external system rule

yeah I tried with both. everything after the "?" is the parameter. Adding a "?" in the url does not work.
//Add this to "OnDomLoad" event