RegisterRegister    Log inLog in    SearchSearch   

Post new topic   Reply to topic
 
View previous topic :: View next topic  
Author Message
oVi



PostPosted: Fri Jan 09, 2009 6:01 am    Post subject: PHP SOAP Client problem... Reply with quote

Here is the code:

Code:
<?php
error_reporting(E_ALL);
ini_set('error_reporting', E_ALL);
ini_set("display_errors", 1);

include('core/soap/nusoap.php');

$client = new soapclient('http://****.eu.gamecreate.com/admin/Remote.asmx?wsdl');
 
$result = $client->call('GetSubDomainList', array('actorUsername'=>'******','actorPassword'=>'******','domainId'=>******));

echo "<pre>";
print_r($result);
echo "</pre>";

// Display the request and response
echo '<h2>Request</h2>';
echo '<pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';
echo '<h2>Response</h2>';
echo '<pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';
?>


And here is the request:


Code:
Array
(
    [faultcode] => soap:Client
    [faultstring] => Server did not recognize the value of HTTP header SOAPAction: ""
)

Request

POST /admin/Remote.asmx?wsdl HTTP/1.0
Host: ****.eu.gamecreate.com
User-Agent: NuSOAP/0.7.2 (1.94)
Content-Type: text/xml; charset=ISO-8859-1
SOAPAction: ""
Content-Length: 650

<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns2847:GetSubDomainList xmlns:ns2847="http://tempuri.org"><actorUsername xsi:type="xsd:string">********</actorUsername><actorPassword xsi:type="xsd:string">********</actorPassword><domainId xsi:type="xsd:int">********</domainId></ns2847:GetSubDomainList></SOAP-ENV:Body></SOAP-ENV:Envelope>

Response

HTTP/1.1 500 Internal Server Error
Date: Thu, 08 Jan 2009 19:51:26 GMT
Server: Apache/2.2.3 (Debian) PHP/5.2.0-8+etch13 mod_mono/1.2.1
Content-Length: 396
Cache-Control: private
Connection: close
Content-Type: text/xml; charset=utf-8

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>Server did not recognize the value of HTTP header SOAPAction: ""</faultstring></soap:Fault></soap:Body></soap:Envelope>


Mhh... what did i make wrong ?
My external authentication service responds me all without problems...
Back to top
View user's profile Send private message
adbot



PostPosted: Thu Mar 31, 2011 3:57 am 

Andrew
Mammoth


PostPosted: Fri Jan 09, 2009 9:20 am    Post subject: Reply with quote

Try:
$params = new stdClass();

// Default params
$params->actorUsername = "actorUsername";
$params->actorPassword = "actorPassword";

// Method params
$params->domainId = 123;

Then: $result = $client->GetSubDomainList($params);

var_dump($result);
Back to top
View user's profile Send private message
oVi



PostPosted: Fri Jan 09, 2009 9:32 am    Post subject: Reply with quote

ok thx, but i cannot test it... the gamecreate webservice (EU) is currently unavailable Sad


but... i use NuSoap an that throws the following error:

Code:
...

$client = new soapclient('http://****.eu.gamecreate.com/admin/Remote.asmx');
$result = $client->GetSubDomainList($params);

...

Fatal error: Call to undefined method soapclient::GetSubDomainList() in /var/www/vhosts/*****/httpdocs/test.php on line 20


What SOAP function/framework did you use ?

and the following line throws: 'params must be array or string'
Code:
$result = $client->call('GetSubDomainList', $params);
Back to top
View user's profile Send private message
Andrew
Mammoth


PostPosted: Fri Jan 09, 2009 10:30 am    Post subject: Reply with quote

That's using the PHP5 in built SoapClient, so give that a go.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum powered by phpBB © 2001, 2005 phpBB Group
GameCreate Service Terms | Privacy Policy | © Copyright Mammoth Media 2001-2007
GameCreate™ is a trademark of Mammoth Media Pty Ltd. GameCreate® is a registered trademark in Australia.