- Ashok Kumar Pattanaik
- PowerBuilder
- Tuesday, 16 April 2019 15:30 PM UTC
Hello Sir,
My organisation has a plan to upgrade existing PowerBuilder application from 12.5.2 to PowerBuilder 2017 version in order to communicate to webserver secured with TLS 1.2 and Window 10 compatible.
Our application has around 289 web services using easysoap engine to call webserver . Due to lots of efforts and lack of funding we don't want to convert existing SOAP to restful webservice. Can you please advice/suggest without making any change to existing soap service how can we communicate to webserver secured with TLS 1.2?
I would appreciate if you could provide some sample codes.
Thanks,
Ashok
- Page :
- 1
There are no replies made for this question yet.
However, you are not allowed to reply to this question.
However, you are not allowed to reply to this question.
And - FYI: PB2019R2 should give us TLS 1.3
Regards ... Chris
I am finding difficult using PBDOM to parse XML data contain huge data. My requirement is to read few tags data, Can you please help me with sample XML parser that would help me to load XML string data and read the value.
Thanks,
Ashok
Function of_xmltag
Call this function passing the XML and the tag you require, this will return the first occurrence of the tag in the XML chunk passed in. Call the function with a boolean flag of TRUE to remove that Tag Chuck from the source XML. In this way you can read successive values for the same tag in the source XML.
===========================================================================================
public function string of_xmltag (ref string as_xml, string as_tag, boolean ab_removexml);// Get the tag from the XML
string ls_response
long ll_pos1, ll_pos2, ll_pos3
ls_response = of_xmltag( as_xml, as_tag ) // Get the XML
if NOT ab_removexml then return ls_response
// Cut the chunc of XML out of the source
if len(ls_response ) > 0 then
ll_pos1 = pos (as_xml, ls_response) // Find this bit
// Now work backwards to find the tag
ll_pos2 = pos(reverse(left(as_xml, ll_pos1)), reverse(as_tag)) + len(as_tag) - 1 // no of characters back from pos 1
ll_pos3 = pos(mid(as_xml, ll_pos1 + len(ls_response)), '')
if ll_pos3 = 0 then
ll_pos3 = pos(mid(as_xml, ll_pos1 + len(ls_response)), '/>') + ll_pos1+ len(ls_response)
else
ll_pos3 += ll_pos1+ len(ls_response) + len(as_tag) + 1 // length of peice to remove
end if
ll_pos1 = ll_pos1 - ll_pos2 // adjust pos1 to be actual start postition.
as_xml = trim(replace(as_xml, ll_pos1, ll_pos3,' ') ) // Cut ls_response out of the source XML
end if
return ls_response
=================================================================================
public function string of_xmltag (string as_xml, string as_tag);// Get the tag from the XML
string ls_response
long ll_pos1, ll_pos2
ls_response = ''
// Find tag
ll_pos1 = pos(as_xml,'')
if ll_pos1 = 0 then
// Tag with attributes?
ll_pos1 = pos(as_xml,' 0 then
ll_pos1 += (2 + len(as_tag))
ll_pos2 = pos(as_xml,'')
if ll_pos2 = 0 then
ll_pos2 = pos(mid(as_xml, ll_pos1), '/>' )
ls_response = mid(as_xml, ll_pos1, ll_pos2 -1)
else
ls_response = mid(as_xml, ll_pos1, ll_pos2 - ll_pos1)
end if
end if
==========================================================================================
Hope this helps
David