Hey,
i did everything as it is explained above but if i trie to call the webservice from php i get the following error.
Warning: file_get_contents(
http://myIP/RA/public_process/Use_Modells_NaiveBayes?) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in /myPath/index.php on line 9
Array (
- => HTTP/1.1 403 Forbidden [1] => Server: Apache-Coyote/1.1 [2] => Set-Cookie: JSESSIONID=0136055020702B60B2D87BA002376E50; Path=/RA [3] => Content-Type: text/html;charset=utf-8 [4] => Content-Length: 1124 [5] => Date: Fri, 17 Jun 2011 13:45:34 GMT [6] => Connection: close ) Ungueltiger Aufruf des Web Services.
If i call it directly from the browser no problems the service returns an html table.
If i call it without
/public_process/
i get a response 200 OK but if i trie to show the result i get the rapidanalytics screen to enter username and password. If i do so, i get an error
Not Found The requested URL /my/path/j_security_check was not found on this server.
_________________________
The way i call the service from php is as follow
$webservice = 'http://myIP/RA/public_process/Update_Modells_NaiveBayes?';
// WebService aufrufen
$xml = file_get_contents($webservice);
// HTTP Status auslesen
if(isset($http_response_header[0])) {
list($version,$status_code,$msg) = explode(' ',$http_response_header[0], 3);
}
print_r($http_response_header);
// HTTP Status ueberpruefen
if($status_code != 200) {
die('Ungueltiger Aufruf des Web Services.');
}
Please could someone help me :-) as i need to call the service from PHP
Greetings