- Ashok Kumar Pattanaik
- PowerBuilder
- Tuesday, 21 May 2019 04:42 PM UTC
Hello Team,
We are migrating our application from PB12.5.2 to PB2017 R3 version to support TLS12. using existing SOAP service. Due to budjetc and other factors, we are not migrating from SOAP to RestFul service.
I have mentioned below the codes in PB12.5 and codes after migrated to PB2017 R3.
PB12.5.2
In PB12.5.2 version we were passing input to WSDL generated structure objects to the method and response data from webservice was writing to the structure contain list of data.
After a success proxy objects generated from WSDL, it list out all objects in the specified PBL.
Ex...
intf__genericparmvalueINPUT[] contain list of variables along with type
intf__genericparmvalueOUTPUT[] contain list of output data returned by the method
intf__genericparmvalueOUTPUT[] = webservice.retrievegenericparamdetails( intf__genericparmvalueINPUT[])
PB2017 R3
lnv_HttpClient = Create httpClient
lnv_HttpClient.SecureProtocol = SECURE_PROTOCOL_TLS12
lnv_HttpClient.SetRequestHeader("Connection", "Keep-Alive")
//lnv_HttpClient.SetRequestHeader("User-Agent", "Keep-Alive")
lnv_HttpClient.SetRequestHeader("Content-Type", "text/xml; charset=utf-8")
lnv_HttpClient.SetRequestHeader("SOAPAction", ls_methodName[i])
lnv_HttpClient.SetRequestHeader("Content-Length", string(len(ls_body)))
li_rc = lnv_HttpClient.sendrequest('POST',ls_url, ls_body)
li_ret = lnv_HttpClient.getresponsebody( ls_data)
//////////////////////////////////////////////////////////////////
Issue here, it returning string data where I am expecting it should set value to intf__genericparmvalueOUTPUT[].
My question, how will I send structure data to HTTPClient sendRequest method and how will I read the response long list XML data from service?
Thanks,
Ashok
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.