Wednesday, 15 July 2015

xml - SOAP Authentication Through cURL PHP Returns "HTTP GET method not implemented" 500 error -


So I am using PHP cURL on SOAP request. I want to start the operation, but before I want to test the authentication part. Below is my code:

  $ username = 'myusername'; $ Password = 'mypassword'; $ Host = 'http: //xx.xx.xx.xx: xxxxx'; $ Process = curl_init ($ host); Curl_setopt ($ process, CURLOPT_HTTPAUTH, CURLAUTH_ANY); Curl_setopt ($ process, CURLOPT_HEADER, true); Curl_setopt ($ process, CURLOPT_HTTPHEADER, array ('content-type: text / xml', "authorization: original". Base64_encode ($ user name. ":". $ Password))); Curl_setopt ($ process, CURLOPT_USERAGENT, 'xxxxx / x.x'); Curl_setopt ($ process, CURLOPT_RETURNTRANSFER, 1); Curl_setopt ($ process, CURLOPT_VERBOSE, 1); Curl_setopt ($ process, CURLOPT_FAILONERROR, incorrect); $ Return = curl_xax ($ process); Print_r ($ return); Curl_close ($ process);  

I need to use the base64 username / password I found out how to do this on any other question. But when I receive print_r ($ return)

  HTTP / 1.1 500 internal server error server: xxxxx / x.x content-type: text / xml; Charset = utf-8 Content-Length: 883 Connection: Stop SOAP-ENV: Customer HTTP GET Method Not Applicable  

I'm not sure what this error is and I do not have any more questions Could this kind of error be found that someone could explain to me what is happening here? Thank you in advance.

The error is telling that the service you are trying to reach does not have The HTTPGET functionality has been implemented with the error without knowing about the API you are trying to reach or the one you are trying to access to describe who you are trying to access. There is no way to help.

Generally an error 500 is for an internal server error and not an error that is not applied to the response code below the parameters or details.


No comments:

Post a Comment