goruki
July 22, 2016, 9:31pm
1
Hello people ! [SIZE=9px](First of all, sorry for my bad english …)[/SIZE]
I have few trouble with using SOAP in 6.2.4
I tried something like this :
[FONT=‘courier new’]05. $client = new SoapClient(NULL, array(
06. ‘location’ => “http://127.0.0.1:7878/ ”,
07. ‘uri’ => ‘urn:TC’,
08. ‘style’ => ‘SOAP_RPC’,
09. ‘login’ => ‘[email protected] ’,
10. ‘password’ => ‘mypass’
11. )); [/FONT]
[FONT=‘courier new’]12. $client->executeCommand(new SoapParam(‘server info’, ‘command’)); [/FONT]
It gives me an 401 error.
Return looks like :
PHP Fatal error: Uncaught SoapFault exception: [SOAP-ENV:Client] HTTP Error: 401 Unauthorized in /var/www/html/SOAP/index.php:12
Stack trace:
#0 /var/www/html/SOAP/index.php(12): SoapClient->__call(‘executeCommand’, Array)
#1 /var/www/html/SOAP/index.php(12): SoapClient->executeCommand(Object(SoapParam))
#2 {main}
thrown in /var/www/html/SOAP/index.php on line 12
I already granted gmlevel 3 and activated SOAP in the worldserver.conf
Is login corresponding to the Email I created ? Or to the ID like 10#1 ? Or did I missed something else ?
Thanks for answers and sorry for disturbing you ! :mellow:
Edit : I’ve already checked and it keeps returning errors.
Its the account (not battlenet_account) name, so 10#1, not email
goruki
July 22, 2016, 10:15pm
3
It’s give me a 403 with the ID
PHP Fatal error: Uncaught SoapFault exception: [SOAP-ENV:Client] HTTP Error: 403 Forbidden in /var/www/html/SOAP/index.php:12
Stack trace:
#0 /var/www/html/SOAP/index.php(12): SoapClient->__call(‘executeCommand’, Array)
#1 /var/www/html/SOAP/index.php(12): SoapClient->executeCommand(Object(SoapParam))
#2 {main}
thrown in /var/www/html/SOAP/index.php on line 12
Edit : Is it possible that it’s related to ports ? Even on localhost ?
goruki
July 26, 2016, 11:18am
4
– UPDATE –
I’ve tried severals things …
For now here what I’ve got :
An account 10#1 (I tried to connect with this account InGame, it worked, and I successfully created an account with bnet create account )
A client on GAMEBUILD 21742
a SOAP module activated (I guess, because SOAP is returning errors)
[ul][li]php -i | grep -i soap [/li]
[/ul]
soap
Soap Client => enabled
Soap Server => enabled
soap.wsdl_cache => 1 => 1
soap.wsdl_cache_dir => /tmp => /tmp
soap.wsdl_cache_enabled => 1 => 1
soap.wsdl_cache_limit => 5 => 5
soap.wsdl_cache_ttl => 86400 => 86400
[ul][li]Worldserver.conf [/li]
[/ul]
SOAP.Enable
SOAP.Enabled = 1
# SOAP.IP
# Description: Bind SOAP service to IP/hostname.
SOAP.IP = “127.0.0.1”
# SOAP.Port
# Description: TCP port to reach the SOAP service.
SOAP.Port = 7878
[ul][li]Account Access [/li]
[/ul]
id gmlevel RealmID
10 3 -1
I even tried this :
[ul][li]rbac_account_permissions [/li]
[/ul]
[ol][li]accountId permissionId granted realmId [/li]
[/ol]
9 207 1 -1
9 208 1 -1
9 219 1 -1
9 228 1 -1
9 196 1 -1
(The account is 10#1 but has the ID 9)
And it keep returning me a 403 error …
So here’s my questions :
[ol][li]What did I do wrong ? [/li]
[li]Is it possible that my Core Version has SOAP bugged ? If yes, how can I clone the last version of Trinity Core that worked with the GAMEBUILD 21742 ? [/li]
[/ol]
(I don’t want to upgrade my client to 7.X, I prefer staying at 6.2.4 if it’s possible …)