1. Amna Khalid
  2. PowerBuilder
  3. Thursday, 26 September 2024 17:10 PM UTC

Hi Everyone,

I am using PB2022 R2 3391 build. I am attaching code file and xml sting which i got in debug mode. PDOM 220.pbd  is already imported.

 


lpbdom_Doc = lpbdom_Builder.BuildFromString(ls_xml_request)

When above line is getting executed then below pop up message occurs "Error calling method of PBNI Object".I am attaching the function and ls-xml_request  file which i get it  in debug mode In attachement section.

 

Please help to resolve this issue.Its very urgent.Need quick feedback from you guys. Thanks in Advance.

 

John Fauss Accepted Answer Pending Moderation
  1. Thursday, 26 September 2024 17:32 PM UTC
  2. PowerBuilder
  3. # 1

Hi, Amna -

Are you debugging the app in 64-bit? If so, try 32-bit to see if it works and report back.

Best regards, John

Comment
  1. Amna Khalid
  2. Thursday, 26 September 2024 17:37 PM UTC
I am debugging the App in 32 bit.
  1. Helpful
There are no comments made yet.
Amna Khalid Accepted Answer Pending Moderation
  1. Thursday, 26 September 2024 17:39 PM UTC
  2. PowerBuilder
  3. # 2

Yes i am debugging it in 32 bit.

Comment
There are no comments made yet.
Amna Khalid Accepted Answer Pending Moderation
  1. Thursday, 26 September 2024 18:29 PM UTC
  2. PowerBuilder
  3. # 3

Yes i am debugging in 32 bit. Below is the function when this line lpbdom_Doc = lpbdom_Builder.BuildFromString(ls_xml_request) execucte then "Error calling method of PBNI Object" occurs.ls_xml_equest is too large.

 

 

TRY
IF gb_createqueue = FALSE THEN
//[Start] Added by Muhammad Asim on 07/Sep/2022
httpClient lhc_client
integer li_StatusCode
string ls_url,ls_xml_request, ls_ret, ls_data,ls_value
Constant Integer SECURE_PROTOCOL_TLS2 = 5

ls_url= "http://"+gs_server_name+"/WKFQueueManager.svc/Queue"
ls_xml_request ='<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/"><soapenv:Header/><soapenv:Body><tem:GetCMSWorkQueue><!--Optional:--><tem:userName>'+gnv_session.is_loginname+'</tem:userName></tem:GetCMSWorkQueue></soapenv:Body></soapenv:Envelope>'

lhc_client = Create httpClient
lhc_client.SetRequestHeader("Accept-Encoding","gzip,deflate")
lhc_client.SetRequestHeader("Content-Type", "text/xml;charset=utf-8")
lhc_client.SetRequestHeader("SOAPAction","http://tempuri.org/IQueueManager/GetCMSWorkQueue")
//lhc_client.Timeout = 120
lhc_client.SecureProtocol = SECURE_PROTOCOL_TLS2
li_ret = lhc_client.sendrequest("POST", ls_url,ls_xml_request )
li_StatusCode = lhc_client.GetResponseStatusCode()
ls_ret = lhc_client.GetResponseStatusText( )
li_ret = lhc_client.getresponsebody(ls_xml_request)

PBDOM_Builder lpbdom_builder
pbdom_document lpbdom_doc
lpbdom_builder = CREATE PBDOM_BUILDER
lpbdom_doc = CREATE PBDOM_DOCUMENT
PBDOM_OBJECT pbdom_obj_array[]
boolean lb_response

TRY
// generate XML Document
lpbdom_Doc = lpbdom_Builder.BuildFromString(ls_xml_request)

try
lb_response = lpbdom_Doc.GetRootElement().&
GetChildElement("Body", "s","http://schemas.xmlsoap.org/soap/envelope/").&
GetChildElement("GetCMSWorkQueueResponse","","http://tempuri.org/").&
GetChildElement("GetCMSWorkQueueResult","","http://tempuri.org/").&
GetContent(pbdom_obj_array)
IF lb_response THEN
ls_value = pbdom_obj_array[1].gettext()
ll_len = long( pbdom_obj_array[2].gettext())
ELSE
MessageBox( "WORKQUEUE", "Something went wrong While Retrieving WorkQueue")
END IF
CATCH (runtimeerror err)
MessageBox( "PBDOM_Exception", err.getMessage())
end try

CATCH (PBDOM_Exception lpbdom_Except)
MessageBox( "PBDOM_Exception", lpbdom_Except.GetExceptionCode())
END TRY

DESTROY lpbdom_Builder
if (isnull(ls_value) or ls_value = '') and ll_len = 0 then
RETURN
end if
CoderObject lnv_CoderObject
lnv_CoderObject = Create CoderObject
lblb_data = lnv_CoderObject.Base64Decode(ls_value)
DESTROY lnv_CoderObject



CATCH(RunTimeError er)
messagebox('Error',er.text)
HALT CLOSE
END TR

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 26 September 2024 19:26 PM UTC
  2. PowerBuilder
  3. # 4

Hi Amna;

  FWIW:  Having the PBDOM220.pbd in your library list is the proper way to handle the DOM feature. It is possible though that another developer may have imported older DOM objects into your existing PBL(s) of your application. If that is the case, then your App crashing is certainly possibility. To be on the safe side, check out the object names in the PBDOM PBD and then perform a search for these names in your App's PBLs. If they are found in a PBL - then you must delete them.  HTH

Regards .. Chris

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.