Skip to Content
1

PB 12.5 Soap Connection, Bad Runtime Function Reference

Mar 06, 2017 at 09:56 AM

275

avatar image
Former Member

Dear All Masters,

- My email is thomas_leungwk@yahoo.com

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

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

http://powerbuilderworld.blogspot.hk/2012/09/calling-web-service-from-powerbuilder.html#.WLwy-jizmUk

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.

https://archive.sap.com/discussions/thread/3546330

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

myuser.id = sle_id.text

myuser.age = integer(sle_age.text)

myuser.name = sle_name.text

myuser.remark = sle_remark.text

//Sample input parameter

//myuser.id = '2'

//myuser.age = 1

//myuser.name = 'alex'

//myuser.remark = 'test'

conn = create soapconnection

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

// ERROR IN THE ABOVE LINE!!!

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

try

mycar = lnv_webservice.buycar(myuser)

s_color=mycar.owner.name

s_id = mycar.licenseplateno

mle_result.text = s_color + " " + s_id

catch (soapexception e)

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

finally

destroy conn

end try

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

avatar image
Former Member
Mar 06, 2017 at 02:15 PM
0

Hi,

Did you deploy the librairies

pbwsclient125.pbd or pbsoapclient125.pbd

depending on if you use .Net engine or Soap Engine.


Regards.


Abdallah.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Mar 17, 2017 at 03:10 AM
0

Dear Abdallah,

Thank you for your prompt response. pbwsclient125.pbx is imported. I follow the steps in

http://powerbuilderworld.blogspot.hk/2012/09/calling-web-service-from-powerbuilder.html#.WLwy-jizmUk

and https://blogs.sap.com/2015/04/09/consuming-a-web-service-with-powerbuilder-125-classic/

I successfully run my web service client in standalone. However I do not know how to put my standalone web service client into my other PB program. I named it, AAA_DEV

I tried to re-produce the steps in AAA_DEV under my Thomas pbl. Because AAA_DEV has its own Workspace. I only create Project | Web Service Proxy Wizard | ..... I only ignore the creation of Workspace and Project step.

I successfully save it. However when run it. The system generates the error.

Line 26:

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


4pxfn.png (24.5 kB)
hnzyf.png (113.2 kB)
Show 1 Share
10 |10000 characters needed characters left characters exceeded

You said "pbwsclient125.pbx is imported". That just created wrapper objects in the PBL. You still need to deploy pbwsclient125.pbx with your application.

0
avatar image
Former Member May 14 at 12:41 PM
0

Dear Wing,

I have the same problem that you describe here...

I've created a web service project in a standalone application and it works fine.

But when I tried to implement it to my real application, i got the "Bad runtime error"...

Your code is exactely like mine.

Did you manage to solve the problem?

If you did, can you tell me how?

Thank you,

Sharon.

Share
10 |10000 characters needed characters left characters exceeded