|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2012-05-04 09:30 UTC] nicola dot riva at emiliainformatica dot it
Description:
------------
Hello,
I'm not so skilled with SOAP but I need to use it for a specific request and I'm
in trouble with a SOAP call to an existing WSDL.
The web service provider has recently changed its environment from PHP to
ASP.NET and from SOAP 1.1 to SOAP 1.2. Since then I can't use the service I
need, and I'm getting this Error fetching HTTP heders.
I'm pretty sure that's my client error because another user (they said), that
uses .NET client, is going well.
I found in many sites and forums that can be a bug in versions below 5.2.6 but,
as I said, I'm using >5.3 version.
How can I fix it?
Thanks in advance!
Test script:
---------------
<?php
ini_set("soap.wsdl_cache_enabled","0");
$cli=new SoapClient("http://www.infonetsrl.it/Dev/infonetwcf/WsRapportiService.svc?wsdl",array("soap_version"=>SOAP_1_2,"trace"=>1));
$auth=array("user"=>"xxx","password"=>"xxx");
$params=array(
"CF"=>"xxx",
"Report"=>"PGA",
"ExportHTML"=>"true"
);
try{
$content=$cli->RichiestaNuovoRapporto(array_merge($auth,$params));
}catch(Exception $e){
$debug='<h2>Exception</h2><pre>'.htmlspecialchars($e, ENT_QUOTES).'</pre>';
$debug .='<h2>getLastRequest</h2><pre>'.htmlspecialchars($cli->__getLastRequest(), ENT_QUOTES).'</pre>';
$debug .='<h2>getLastResponse</h2><pre>'.htmlspecialchars($cli->__getLastResponse(), ENT_QUOTES).'</pre>';
}
echo $debug;
?>
The WSDL file is found here: http://www.infonetsrl.it/Dev/infonetwcf/WsRapportiService.svc?wsdl
Actual result:
--------------
***Exception***
SoapFault exception: [HTTP] Error Fetching http headers in C:\Program
Files\xampp\htdocs\spotter\classes\SOAP_functions.php:160
Stack trace:
#0 [internal function]: SoapClient->__doRequest('<?xml version="...',
'http://www.info...', 'http://tempuri....', 2, 0)
#1 [internal function]: SoapClient->__call('RichiestaNuovoR...', Array)
#2 C:\Program Files\xampp\htdocs\spotter\classes\SOAP_functions.php(160):
SoapClient->RichiestaNuovoRapporto(Array)
#3 C:\Program Files\xampp\htdocs\spotter\transactioner.php(202): SOAP_functions-
>buyDocument(Object(MySQL_functions), Object(Generic_functions), Array, '1',
'1_nsordyll_shoe...', 0, Array)
#4 {main}
***getLastRequest***
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"
xmlns:ns1="http://tempuri.org/"><env:Body><ns1:RichiestaNuovoRapporto>
<ns1:password>WSRAPPORTI</ns1:password></ns1:RichiestaNuovoRapporto></env:Body>
</env:Envelope>
***getLastResponse***
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 08:00:02 2025 UTC |
Hi, Am also receive same problem. could you tell the problem on windows 7 ultimate? Regards, Raju.B