weird behaviour on webservice (using the OpenEdge.Net.pl library) call (progress 11.6) - Forum - OpenEdge General - Progress Community

weird behaviour on webservice (using the OpenEdge.Net.pl library) call (progress 11.6)

 Forum

weird behaviour on webservice (using the OpenEdge.Net.pl library) call (progress 11.6)

This question is not answered

Hi,

 

We are trying to call a webservice using the OpenEdge.Net.pl library.

The following code works except for one production environnement where we have a weird behaviour.

There are no error, we have a valid oResponse object but it is empty.

oResponse:StatusReason is empty and oResponse:StatusCode = 0 ?

 

When does StatusCode=0 ? and why ?

How should we handle such return value ?

 

 

oResponse = ClientBuilder:Build()

:Client

                :Execute(oRequest)

                no-error.

if error-status:error

then do :

                put stream debug-log unformatted "ERROR ClientBuilder " skip.

                do ix = 1 to error-status:num-messages :

                               put stream debug-log unformatted "ERROR " error-status:get-number(ix) error-status:get-message(ix) skip.

                end.

                return.

end.

 

if not valid-object ( oResponse )

then do:

                put stream debug-log unformatted "ERROR sending POST request to URI : " + x-uri + " invalid response object " skip.

end.

else do :

                put stream debug-log unformatted "Request response " oResponse:StatusReason " - " oResponse:StatusCode skip.

end.

All Replies
  • You will always see a message body  (except for non-HEAD requests in 11.7.1+)

    Are you seeing errors? Also, you can enable more logging via the LOG-MANAGER, with code similar to the below. It might give you a clue.

    log-manager:logfile-name = session:temp-dir + 'http_client.log'. 
    log-manager:logging-level = 5.
    log-manager:clear-log ().