Skip to Content
Former Member
Mar 06, 2017 at 09:56 AM

PB 12.5 Soap Connection, Bad Runtime Function Reference


Dear All Masters,

- My email is

- Using PB12.5 in Windows 7 32 bit platform.

- I develop a simple program consume a web service following the below steps.

I successfully run when it is alone. However I try to rewrite the code and implement it into one production program. I got this error message.

"E3181- Error Number 21

Error text = Bad runtime function reference at line 29 in clicked event of object cb_retrieve of w_nvs009_maintain_case_q01.

Window/Menu/Object = w_nvs009_maintain_case_q01

Error Object/Control = cb_retrieve

Script = clicked."

- A gentleman asked similar question before in here.

However I do not know how to do and how to check. Also how to add in if missing.

- My senior tried to link my successful one into the production program. It also comes out the above error. My code is listed below for reference.

long l_rc

soapconnection conn

oponlinesoapservice lnv_webservice

opcar mycar //web service field

opuser myuser //web service field

strings_color, s_id

lnv_webservice= Create oponlinesoapservice

mycar = create opcar

myuser = Create opuser = sle_id.text

myuser.age = integer(sle_age.text) = sle_name.text

myuser.remark = sle_remark.text

//Sample input parameter

// = '2'

//myuser.age = 1

// = 'alex'

//myuser.remark = 'test'

conn = create soapconnection

l_rc = conn.createinstance( lnv_webservice, "oponlinesoapservice")


messagebox("Connection ready?", l_rc)//0=ok, 100=invalid proxy name, 101=fail to create proxy


mycar = lnv_webservice.buycar(myuser)

s_id = mycar.licenseplateno

mle_result.text = s_color + " " + s_id

catch (soapexception e)

messagebox("error", e.getmessage())


destroy conn

end try