1. Toan Nguyen
  2. PowerBuilder
  3. Friday, 13 December 2024 20:29 PM UTC

Hello All,

We have converted all our SOAP web service calls using EasySoap to use HttpClient object.

The issue we have is when the response return code is something other than 200 meaning unsuccessful response.

For example, we get 500 for the response status code and the message is a generic 'Internal Server Error'.

Is there a way to get more details in the case of bad responses? 

The SOAP web service calls using EasySoap would give more information if we call the SetSoapLogFile() to have all information written to the log file.

In my example, the logged error in EasySoap is 'ORA-12570: TNS:packet reader failure'. 

If anyone can provide any information on this topic would be greatly appreciated.

Thanks,

Tony Nguyen

Log file sample from EasySoap:

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<soap:Body>

<soap:Fault>

<faultcode>

soap:Server

</faultcode>

<faultstring>ORA-12570: TNS:packet reader failure

https://docs.oracle.com/error-help/db/ora-12570/

</faultstring>

<faultactor>

CCDWSRunPkg

</faultactor>

<detail>

<Error xmlns="http://cadata.ca.state.gov/CCDWS/">

<ErrorNumber>1001</ErrorNumber>

<ErrorMessage>ORA-12570: TNS:packet reader failure

https://docs.oracle.com/error-help/db/ora-12570/

</ErrorMessage>

<ErrorSource>

CCDWSRunPkg

</ErrorSource>

</Error></detail>

</soap:Fault>

</soap:Body>

</soap:Envelope>

Connection Disconnected

Toan Nguyen Accepted Answer Pending Moderation
  1. Monday, 16 December 2024 03:39 AM UTC
  2. PowerBuilder
  3. # 1

Hi Daryl,

I didn’t think to check the getResponseBody() since the getResponseStatusCode() and getResponseStatusTest() functions return 500 and “Internal Server Error”. 

Upon reading your reply, I added the call to getResponseBody() function and saw it returned the “ORA-12570: TNS:Packet Reader Error” string in the body.

Thank you very much for help resolving my issue!

Have a great week!

Regards, 

Tony

 

 

 

 
Comment
There are no comments made yet.
Daryl Foster Accepted Answer Pending Moderation
  1. Sunday, 15 December 2024 23:25 PM UTC
  2. PowerBuilder
  3. # 2

Hi Tony,

Have you got a copy of your code you can share?  What function is returning the "Internal Server Error"string?  These three functions should give you all the stuff you need.

integer li_ResponseStatusCode 
string ls_ResponseStatusMessage 
string ls_ResponseBody

// This should return the http status code e.g. 500
li_ResponseStatusCode = lnv_HttpClient.GetResponseStatusCode()

// This should return the http status messages e.g. Internal Server Error
ls_ResponseStatusMessage = lnv_HttpClient.GetResponseStatusText()

// This should return the body of the response (if any) e.g. the soap:Fault xml
li_rc = lnv_HttpClient.GetResponseBody(ls_ResponseBody, EncodingUTF8!) 

 

If the GetResponseBody call isn't returning anything then it might be an actual Internal Server Error which bypasses the soap handling on the server

Comment
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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.