Dear Team ,
Can any one share the sytax of the GetAll and getBy Id in soap Api...
I have a syntax for get all.but its not working...
integer li_ret
integer li_StatusCode
string ls_url,ls_soap_action
string ls_data
string ls_body
string ls_ret
// Create an HTTP client object
httpClient lo_client
// Set the URL for the SOAP GET request
ls_url = "https://localhost:44339/McDonaldsSoapService.asmx"
ls_body ='<?xml version="1.0" encoding="utf-8"?>'
ls_body +='<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/">'
ls_body +="<soap:Body>"
ls_body +='<GetAllMcDonalds xmlns="http://tempuri.org/">'
ls_body += ' <requestDTO />'
ls_body += '</GetAllMcDonalds>'
ls_body += '</soap:Body>'
ls_body +='</soap:Envelope>'
lo_client = Create httpClient
// Set the request headers for a SOAP GET request
lo_client.SetRequestHeader("Content-Type","text/xml; charset=utf-8") // "text/xml")
lo_client.SetRequestHeader("SOAPAction","http://tempuri.org/GetAllMcDonalds")
lo_client.SetRequestHeader("Content-Length", ls_body)
//// Send the SOAP GET request
lo_client.sendrequest('GET', ls_url, ls_body)
li_StatusCode = lo_client.GetResponseStatusCode()
ls_ret = lo_client.GetResponseStatusText()
li_ret = lo_client.getresponsebody(ls_data)
destroy lo_client
messagebox("Service response", ls_data)
Messabox : error