I am calling a Web Service in PB 12.5. The proxy builder says that the web service returns type "any."
I used SoapUI to see what it really returns, and the web service is returning XML.
I don't know how to convert the return of type any into something that Powerbuilder can work worth.
If tried using ClassName() to determine the type but PB crashes on that statement.
Here is the code that I am using:
************************************************************
SoapConnection Conn
Long ll_rc
String ls_URL, ls_return, ls_Type, ls_Array[]
any lany_return
n_stopcriteria ln_stopcriteria
ln_stopcriteria = Create n_stopcriteria
ln_stopcriteria.ordernumber = sle_order_no.text
ln_stopcriteria.regionid = sle_regionid.text
n_routeinforetrieveoptions ln_routeinforetrieveoptions
ln_routeinforetrieveoptions = Create n_routeinforetrieveoptions
n_region ln_region
ln_region = CREATE n_region
ls_URL=sle_1.text
n_transportationwebservice lnv_transportationwebservice
Conn = Create SoapConnection
ll_rc = Conn.CreateInstance(lnv_transportationwebservice, 'n_transportationwebservice', ls_URL)
If ll_rc = 0 then
//Ok
Else
MessageBox("Bad Return code: ll_rc", String(ll_rc))
end if
Try
lany_Return = lnv_transportationwebservice.retrievestopsbycriteria( ln_stopcriteria, ln_routeinforetrieveoptions )
MessageBox("Web service Call OK", ls_return)
If isNull(lany_Return) Then
MessageBox("Return", "Return is Null")
End IF
ls_Type = Classname(lany_Return)
Choose Case ls_Type
Case "string"
MessageBox("Return Type", "String")
Case "number"
MessageBox("Return Type", "Number")
Case Else
MessageBox("Return Type", ls_Type)
End Choose
Catch (soapexception e)
MessageBox("Error", e.getmessage())
Finally
Destroy Conn
End try
******************