In server one I user soapclient
$GLOBALS['params'] = [
"where" => $fldpar,
];
$client1 = new soapclient('http://**.**.**.**:3000/Service1.svc?wsdl');
$res = $client1->Read_1522($GLOBALS['params']);
$arr = json_decode(json_encode($res), True);
$xml = simplexml_load_string($arr['Read_1522Result']['any']);
$json = json_encode($xml);
$array = json_decode($json,TRUE);
config server one is:centos , directadmin,php56
and in server to i have ssl and install soap but when use soapcliene this has error:
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://**.**.**.**:3000/Service1.svc?wsdl' : failed to load external entity "http://**.**.**.**:3000/Service1.svc?wsdl" in /home/ht2net/domains/****/public_html/ab/index.php:26 Stack trace: #0 /home/ht2net/domains/******/public_html/ab/index.php(26): SoapClient-
whats the problem?
Related
i use this PHP Code :
<?php
ini_set("soap.wsdl_cache_enabled", "0");
$AccountShabaCode = "123456789012345678900000";
$WorkTitle = "Example";
$GuildCode = "48160000";
$PardakhtYarTitle = "Xxxa";
$soapclient = new SoapClient('http://87.107.134.111:8021/PardakhtYar.asmx?wsdl');
$add_new_request = $soapclient->AddNewRequest(array('AccountShabaCode' => $AccountShabaCode, 'Password' => $Password, 'WorkTitle' => $WorkTitle, 'GuildCode' => $GuildCode, 'PardakhtYarTitle' => $PardakhtYarTitle));
print_r($add_new_request);
?>
and get this error :
Fatal error: Uncaught SoapFault exception: [soap:Server] Server was unable to process request. ---> Object reference not set to an instance of an object. in C:\WAMP\home\example.tld\public_html\test.php:11
Stack trace:
#0 C:\WAMP\home\example.tld\public_html\test.php(11): SoapClient->__call('AddNewRequest', Array)
#1 {main}
thrown in C:\WAMP\home\example.tld\public_html\test.php on line 11
How can I fix this error?
i need call "AddNewRequest" ( http://87.107.134.111:8021/PardakhtYar.asmx?op=AddNewRequest )
i'm trying to make a test with wsdl , soap and php , and i'm gettin the error :
Fatal error: Uncaught SoapFault exception [wsdl] SOAP-ERROR
I have for now 2 files , one is a given wsdl , and client.php just for test:
<?php
$sClient = 'http://localhost/test/service/wbs.wsdl';
$wsdl = new SoapClient ( '$sClient') ;
echo "test";
?>
and i'm getin this error :
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing
WSDL: Couldn't load from ' hp://localhost/test/service/wbs.wsdl' :
failed to load external entity " hp://localhost/test/service/wbs.wsdl"
in C:\wamp\www\Outbound\client.php:4 Stack trace: #0
C:\wamp\www\test\client.php(4): SoapClient->SoapClient('
hp://localh...') #1 {main} thrown in C:\wamp\www\test\client.php on
line 4
I did change the extension of soap in php.ini , i did all the modification posted in other posts , but nothing works .
$wsdl = new SoapClient ( '$sClient') ;
This would not work. Use:
$wsdl = new SoapClient ( "$sClient") ;
Or - better:
$wsdl = new SoapClient ( $sClient) ;
Try it
$client = new SoapClient("http://{$_SERVER['HTTP_HOST']}/test/service/wbs.wsdl");
I have the following error:
"PHP SOAP : Fatal error: Uncaught SoapFault exception: [HTTP] An
Authentication object was not found in the SecurityContext"
I have tried to set up soap headers but it is not working:
$authvalues = array("username"=>"####","password"=>"EEEEE");
$header = new SoapHeader("SoapBaseNameSpace","ReqHeader", $authvalues, true);
$client->__setSoapHeaders(array($header));
Have you tried setting it in the options array?
$options = array(
"login" => 'login',
"password" => 'pass'
);
$client = new SoapClient($wsdl, $options);
I'm trying to call a webservice that I've created, but the server is returning the following error:
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://www.savepoints.com.br/server.php?WSDL' : Premature end of data in tag html line 2 in /home/storage/a/39/1c/site1365816459/public_html/cliente.php:5 Stack trace: #0 /home/storage/a/39/1c/site1365816459/public_html/cliente.php(5): SoapClient->SoapClient('http://www.save...') #1 {main} thrown in /home/storage/a/39/1c/site1365816459/public_html/cliente.php on line 5
Here I show my two scripts:
server.php (it's the WSDL server)
<?php
require('classes/nusoap/nusoap.php');
$server = new soap_server();
$server->configureWSDL('stockserver', 'urn:stockquote');
$server->register('getStockQuote',
array('symbol' => 'xsd:string'),
array('return' => 'xsd:decimal'),
'urn:stockquote',
'urn:stockquote#getStockQuote');
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$server->service($HTTP_RAW_POST_DATA);
?>
cliente.php
<?php
require('classes/nusoap/nusoap.php');
$c = new SoapClient('http://www.savepoints.com.br/server.php?WSDL');
$stockprice = $c->call('getStockQuote',array('symbol' => 'ABC'));
echo "The stock price for 'ABC' is ".$stockprice.".";
?>
With server NuSOAP and client PHP-SOAP.
Use:
$c = new SoapClient('http://www.savepoints.com.br/server.php?wsdl');
Instead of:
$c = new SoapClient('http://www.savepoints.com.br/server.php?WSDL');
I do not know why, but it works for me.
I need your help
I have to use PHP functions from a web service SOAP
The request XML is as follows
<OTA_HotelDescriptiveInfoRQ xmlns="http://www.opentravel.org/OTA/2003/05" Version="1">
<POS>
<Source AgentSine="user" AgentDutyCode="pass" />
</POS>
<HotelDescriptiveInfos>
<HotelDescriptiveInfo ChainCode="H4U" HotelCode="696"/>
</HotelDescriptiveInfos>
</OTA_HotelDescriptiveInfoRQ>
Here is my PHP code:
$soapClient = new SoapClient("http://otatest.apixml.com/dispatcher.asmx?WSDL");
$header = new SOAPHeader('http://xmlota.wspan.com/webservice/', 'authentication', array('username' => 'user', 'password' => 'pass'));
$soapClient->__setSoapHeaders($header);
$param['POS']['Source']['AgentSine'] = 'user';
$param['POS']['Source']['AgentDutyCode'] = 'pass';
$param['HotelDescriptiveInfos']['HotelDescriptiveInfo']['ChainCode'] = 'H4U';
$param['HotelDescriptiveInfos']['HotelDescriptiveInfo']['HotelCode'] = '696';
$response = $soapClient->sendOTAHotelDescriptiveInfo($param);
And here is the error I'm trying for several days but I can not resolve it
Fatal error: Uncaught SoapFault exception: [soap:Server] System.Web.Services.Protocols.SoapException: Server was unable to process request.
---> System.NullReferenceException: Object reference not set to an instance of an object. at H4U.Webservices.OTA.SoapDispatcher.sendOTAHotelDescriptiveInfo(OTA_HotelDescriptiveInfoRQ OTA_HotelDescriptiveInfoRQ)
--- End of inner exception stack trace ---
in /home/dimavoya/public_html/soap/soap.php:43
Stack trace:
#0 /home/dimavoya/public_html/soap/soap.php(43): SoapClient->__call('sendOTAHotelDes...', Array)
#1 /home/dimavoya/public_html/soap/soap.php(43): SoapClient->sendOTAHotelDescriptiveInfo(Object(SoapVar))
#2 {main} thrown in
I remain at your disposal for more information
Thank you in advance