Hello,
We are upgrading from PB19 --> PB2022.
I understand that we have to rewrite all code that uses Soup Connection to HTTP Client.
Can somebody, Please provide some examples.
Regards,
Marina
Hello,
We are upgrading from PB19 --> PB2022.
I understand that we have to rewrite all code that uses Soup Connection to HTTP Client.
Can somebody, Please provide some examples.
Regards,
Marina
Hi,
I fixed The 500 issue and moved to Error 400.
Do I understand correctly?:
I need to create an XML string (ls_body) with a reference to updatecustomer function (that inside customersupd WS).
Also, I need to provide the parameter that updatecustomer function gets.
This is the old code: luo_wsresult = p_customersupd.updatecustomer( auo_customerschema)
But in a new code I have to change parameter auo_customerschema into XML structure?
This is a complicated parameter (auo_customerschema) that includes arrays, strings, numbers....
Is there some function that can change it to XML structure?
Do I need to write an XML with complicated structure of parameters for every case that I need to rewrite because of the upgrade?
And what about the value that updatecustomer function returns (luo_wsresult)?
Thanks,
Marina
if I write it like this , I get li_statusCode = 500. what is incorrect?
lsp_Cnn = Create HttpClient
lsp_Cnn.SetRequestHeader("Content-Type", "text/xml")
ls_body = '<?xml version="1.0" encoding="utf-8"?>' + &
'<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ' + &
'xmlns:xsd="http://www.w3.org/2001/XMLSchema" ' + &
'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">' + &
'<soap:Body>' + &
'<updatecustomer xmlns="http://tempuri.org/">' + &
'</updatecustomer>' + &
'</soap:Body>' + &
'</soap:Envelope>'
li_rc = lsp_Cnn.SendRequest("POST", ls_location, ls_body)
li_statusCode = lsp_Cnn.GetResponseStatusCode()
li_rc = lsp_Cnn.GetResponseBody(ls_response)
If li_statusCode = 200 Then
MessageBox("Success", ls_response)
Else
MessageBox("Error", "HTTP Status Code: " + String(li_statusCode))
End If
Question:
For example (old code VS new code)
//SoapConnection lsp_Cnn -- old code
HttpClient lsp_Cnn -- new code
customersupd p_customersupd -- (customersupd - WS)
//lsp_Cnn = Create SoapConnection -- old code
lsp_Cnn = Create HttpClient -- new code
//lsp_Cnn.SetProxyServerOptions (ls_location) -- old code
li_rc = lsp_Cnn.SendRequest("GET", ls_location) -- new code - connects to the URL location
//ll_Ret = lsp_cnn.CreateInstance( p_customersupd, "customersupd") -- old code
//ll_Ret = lsp_cnn.GetContextService ( "customersupd" , p_customersupd ) -- tried this' but p_customersupd remains NULL -- what is the new code for this?
//luo_wsresult = p_customersupd.updatecustomer( auo_customerschema) -- old code - calls specific function updatecustomer of customersupd - WS
-- what is the new code for this?
Thanks in advance
Marina
Hi Marina;
HTH
Regards ... Chris
Sadly the answer to your question is no there is no function/tool to convert the complex XML for you. You will have to prepare this XML yourself. Likewise you will need to parse the XML received too. It's a real PIA, pbdom is so clunky to use but dies work.
I feel your pain.
All the best
David