1. Pbuser12 Ateikon
  2. PowerBuilder
  3. Monday, 23 October 2023 09:50 AM UTC

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

 

John Fauss Accepted Answer Pending Moderation
  1. Monday, 23 October 2023 13:27 PM UTC
  2. PowerBuilder
  3. # 1

I agree with Kevin. Repeatedly asking a question is rude and inconsiderate. Contrary to what you may think, posting the same issue/question multiple times actually decreases the likelihood that you will receive an answer because you aggravate the very people that could potentially help you.

Please also recognize that this is a Question/Answer forum, not a support portal. Most of the responders here are unpaid volunteers who have a desire to help people.

If I recall correctly from one of the other threads you've created on this subject, you are using an out-of-service, unsupported, end-of-life, old version of PowerBuilder (version 12.5). Using an obsolete version of PB is, of course, your choice, but you have to recognize the risks that accompany that choice. Not having vendor support is one of those risks, and having few developers in the world that use or even remember such an old version is another.

Comment
  1. Armeen Mazda @Appeon
  2. Tuesday, 24 October 2023 08:56 AM UTC
Adding to what John said, most questions are not going to receive a response immediately and some never do. If you have an issue that cannot wait or you try to get free help from community but your issue is not resolved, then please consider getting paid consulting help: https://www.appeon.com/consultants/consulting-partners
  1. Helpful 2
  1. Pbuser12 Ateikon
  2. Wednesday, 25 October 2023 09:15 AM UTC
Thanks armeen..iam a fresher of the power builder,,,
  1. Helpful
There are no comments made yet.
Kevin Ridley Accepted Answer Pending Moderation
  1. Monday, 23 October 2023 12:27 PM UTC
  2. PowerBuilder
  3. # 2

Please don't make multiple posts for the same issue.  This is the 2nd or 3rd post for this issue.

Comment
  1. Pbuser12 Ateikon
  2. Monday, 23 October 2023 13:53 PM UTC
okay..next time it wont repeat
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.