Hi Craig,
(Excuse my bad english)
I am integrating your API SOAP in our internal customer area.
First, in your documentation :
http://www.craigbrasssystems.com/forum/ind...postTicketReply
You have forgot to put $login/$password in the constructor
Second I have a "bug" using postTicketReply : using the "SOAP" constructeur, the function never end, so my php code timeout.
Using the non-soap constructor (over-SOAP) it is running very well.
But the _real_ problem is that submitTicket has the same problem, using the soap/nonsoap constructor...
An idea ?
If i do not solve this problem quickly i will have to use email queues...
Page 1 of 1
submitTicket never end...
#2
Posted 02 October 2008 - 11:37 AM
QUOTE (DaviXX @ Oct 2 2008, 12:31 PM) <{POST_SNAPBACK}>
First, in your documentation :
http://www.craigbrasssystems.com/forum/ind...postTicketReply
You have forgot to put $login/$password in the constructor
http://www.craigbrasssystems.com/forum/ind...postTicketReply
You have forgot to put $login/$password in the constructor
Fixed this now. Thanks
QUOTE (DaviXX @ Oct 2 2008, 12:31 PM) <{POST_SNAPBACK}>
Second I have a "bug" using postTicketReply : using the "SOAP" constructeur, the function never end, so my php code timeout.
Using the non-soap constructor (over-SOAP) it is running very well.
But the _real_ problem is that submitTicket has the same problem, using the soap/nonsoap constructor...
Using the non-soap constructor (over-SOAP) it is running very well.
But the _real_ problem is that submitTicket has the same problem, using the soap/nonsoap constructor...
I'll look into this, but the whole API was tested thoroughly using both SOAP and "native PHP" before we released it, and both postTicketReply() and submitTicket() worked fine in our tests.
Andrew Gillard
Lead Developer - Craig Brass Systems
Lead Developer - Craig Brass Systems
#3
Posted 02 October 2008 - 12:03 PM
QUOTE (Andrew Gillard @ Oct 2 2008, 01:37 PM) <{POST_SNAPBACK}>
I'll look into this, but the whole API was tested thoroughly using both SOAP and "native PHP" before we released it, and both postTicketReply() and submitTicket() worked fine in our tests.
I am using SupportSuite v 3.20.02
I i can help you, please ask...
#4
Posted 02 October 2008 - 12:14 PM
Okay, a couple of questions: firstly, are you attempting to submit any attached files when you call submitTicket or postTicketReply? And secondly, what sort of code are you using for those function calls? Those two methods have to handle file attachments, so are quite complicated - both on the API side and with the code required to use the API.
Additionally, do the other API methods work fine? Knowledgebase methods and listing tickets or ticket statuses, etc.? I'm just trying to work out if the entire API is not working for you, or if it's just submitTicket() and postTicketReply().
Thanks.
Additionally, do the other API methods work fine? Knowledgebase methods and listing tickets or ticket statuses, etc.? I'm just trying to work out if the entire API is not working for you, or if it's just submitTicket() and postTicketReply().
Thanks.
Andrew Gillard
Lead Developer - Craig Brass Systems
Lead Developer - Craig Brass Systems
#5
Posted 02 October 2008 - 01:58 PM
QUOTE (Andrew Gillard @ Oct 2 2008, 02:14 PM) <{POST_SNAPBACK}>
are you attempting to submit any attached files when you call submitTicket or postTicketReply?
No.
Just plain text in the message body.
QUOTE (Andrew Gillard @ Oct 2 2008, 02:14 PM) <{POST_SNAPBACK}>
what sort of code are you using for those function calls?
I am using the following test code :
CODE
<?php
// Connection
$soap = null;
$kklogin = 'xxx';
$kkpass = 'xxx';
$kkwsdl = 'https://xxx/index.php?wsdl';
try
{
$soap = new SoapClient($kkwsdl, array('timeout' => 500, 'trace' => 1, 'soap_version' => SOAP_1_1));
}
catch(Exception $fault)
{
$soap=null;
var_dump($fault);
}
if(is_null($soap)) die('$soap is null');
// Go
try
{
$res = null;
$res = $soap->submitTicket(
$kklogin,
$kkpass,
'a.fake.user@notexist.ew',
7,
3,
'John Smith',
'ping down on srv9867',
'my dedicated server is not asnwering to the ping',
array(),
true,
0,
null
);
}
catch(Exception $fault)
{
$res=null;
var_dump($fault);
}
if(is_null($res)) die ('$res is null');
var_dump($res);
?>
// Connection
$soap = null;
$kklogin = 'xxx';
$kkpass = 'xxx';
$kkwsdl = 'https://xxx/index.php?wsdl';
try
{
$soap = new SoapClient($kkwsdl, array('timeout' => 500, 'trace' => 1, 'soap_version' => SOAP_1_1));
}
catch(Exception $fault)
{
$soap=null;
var_dump($fault);
}
if(is_null($soap)) die('$soap is null');
// Go
try
{
$res = null;
$res = $soap->submitTicket(
$kklogin,
$kkpass,
'a.fake.user@notexist.ew',
7,
3,
'John Smith',
'ping down on srv9867',
'my dedicated server is not asnwering to the ping',
array(),
true,
0,
null
);
}
catch(Exception $fault)
{
$res=null;
var_dump($fault);
}
if(is_null($res)) die ('$res is null');
var_dump($res);
?>
Other functions such as :
# getTotalSubmittedTickets
# getSubmittedTickets
# getSubmittedTicket
Are running very well
May i have some clues, wait for my next post in few minutes...
#6
Posted 02 October 2008 - 02:10 PM
QUOTE (DaviXX @ Oct 2 2008, 03:58 PM) <{POST_SNAPBACK}>
May i have some clues, wait for my next post in few minutes...
Running PHP-5.1.6 on this host, i have first think that i was front of an already knowned/solved bug of, PHP, so i have upgraded to PHP-5.2.6.
So i have made :
CODE
strace -s 64 -f php-v5 -q testkk.php5
CODE
[ begin of the useless output truncated by davixx ]
read(3, "<?php\n\n// Connection\n$soap = null;\n\n$kklogin = \'admin\';\n$kkpass "..., 4096) = 833
_llseek(3, 0, [0], SEEK_SET) = 0
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfb102e8) = -1 ENOTTY (Inappropriate ioctl for device)
read(3, "<?php\n\n// Connection\n$soap = null;\n\n$kklogin = \'admin\';\n$kkpass "..., 8192) = 833
read(3, "", 4096) = 0
read(3, "", 8192) = 0
close(3) = 0
munmap(0xb776f000, 4096) = 0
time(NULL) = 1222955974
time(NULL) = 1222955974
open("/tmp/wsdl-910d1c97da8a042e8fa7d058734fbf47", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=32065, ...}) = 0
read(3, "wsdl\16\0007\321\344HM\0\0\0https://xxxxxxx.xxxxxxxx.xx:443/xxxxxxxxxxxxxx_200"..., 32065) = 32065
close(3)
read(3, "<?php\n\n// Connection\n$soap = null;\n\n$kklogin = \'admin\';\n$kkpass "..., 4096) = 833
_llseek(3, 0, [0], SEEK_SET) = 0
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfb102e8) = -1 ENOTTY (Inappropriate ioctl for device)
read(3, "<?php\n\n// Connection\n$soap = null;\n\n$kklogin = \'admin\';\n$kkpass "..., 8192) = 833
read(3, "", 4096) = 0
read(3, "", 8192) = 0
close(3) = 0
munmap(0xb776f000, 4096) = 0
time(NULL) = 1222955974
time(NULL) = 1222955974
open("/tmp/wsdl-910d1c97da8a042e8fa7d058734fbf47", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=32065, ...}) = 0
read(3, "wsdl\16\0007\321\344HM\0\0\0https://xxxxxxx.xxxxxxxx.xx:443/xxxxxxxxxxxxxx_200"..., 32065) = 32065
close(3)
The previous ouput has take less than 1 second...
Now the ouput display nothing during 47 seconds,
And finally display :
CODE
--- SIGPROF (Profiling timer expired) @ 0 (0) ---
setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={30, 0}}, NULL) = 0
rt_sigaction(SIGPROF, {0x836d040, [PROF], SA_RESTART}, {0x836d040, [PROF], SA_RESTART}, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [PROF], NULL, 8) = 0
write(1, "object(SoapFault)#2 (9) {\n", 26object(SoapFault)#2 (9) {
) = 26
write(1, " [\"message", 11 ["message) = 11
write(1, ":protected", 10:protected) = 10
write(1, "\"]=>\n", 5"]=>
) = 5
write(1, " ", 2 ) = 2
write(1, "string(45) \"", 12string(45) ") = 12
write(1, "Maximum execution time of 30 seconds exceeded", 45Maximum execution time of 30 seconds exceeded) = 45
[ output truncated by davixx ]
write(1, " ", 2 ) = 2
write(1, "string(45) \"", 12string(45) ") = 12
write(1, "Maximum execution time of 30 seconds exceeded", 45Maximum execution time of 30 seconds exceeded) = 45
write(1, "\"\n", 2"
) = 2
write(1, " [\"", 4 [") = 4
write(1, "faultcode", 9faultcode) = 9
write(1, "\"]=>\n", 5"]=>
) = 5
write(1, " ", 2 ) = 2
write(1, "string(6) \"", 11string(6) ") = 11
write(1, "Client", 6Client) = 6
write(1, "\"\n", 2"
) = 2
write(1, " [\"", 4 [") = 4
write(1, "faultcodens", 11faultcodens) = 11
write(1, "\"]=>\n", 5"]=>
) = 5
write(1, " ", 2 ) = 2
write(1, "string(41) \"", 12string(41) ") = 12
write(1, "http://schemas.xmlsoap.org/soap/envelope/", 41http://schemas.xmlsoap.org/soap/envelope/) = 41
write(1, "\"\n", 2"
) = 2
write(1, "}\n", 2}
) = 2
write(1, "$res is null", 12$res is null) = 12
setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
exit_group(255) = ?
Process 25472 detached
setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={30, 0}}, NULL) = 0
rt_sigaction(SIGPROF, {0x836d040, [PROF], SA_RESTART}, {0x836d040, [PROF], SA_RESTART}, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [PROF], NULL, 8) = 0
write(1, "object(SoapFault)#2 (9) {\n", 26object(SoapFault)#2 (9) {
) = 26
write(1, " [\"message", 11 ["message) = 11
write(1, ":protected", 10:protected) = 10
write(1, "\"]=>\n", 5"]=>
) = 5
write(1, " ", 2 ) = 2
write(1, "string(45) \"", 12string(45) ") = 12
write(1, "Maximum execution time of 30 seconds exceeded", 45Maximum execution time of 30 seconds exceeded) = 45
[ output truncated by davixx ]
write(1, " ", 2 ) = 2
write(1, "string(45) \"", 12string(45) ") = 12
write(1, "Maximum execution time of 30 seconds exceeded", 45Maximum execution time of 30 seconds exceeded) = 45
write(1, "\"\n", 2"
) = 2
write(1, " [\"", 4 [") = 4
write(1, "faultcode", 9faultcode) = 9
write(1, "\"]=>\n", 5"]=>
) = 5
write(1, " ", 2 ) = 2
write(1, "string(6) \"", 11string(6) ") = 11
write(1, "Client", 6Client) = 6
write(1, "\"\n", 2"
) = 2
write(1, " [\"", 4 [") = 4
write(1, "faultcodens", 11faultcodens) = 11
write(1, "\"]=>\n", 5"]=>
) = 5
write(1, " ", 2 ) = 2
write(1, "string(41) \"", 12string(41) ") = 12
write(1, "http://schemas.xmlsoap.org/soap/envelope/", 41http://schemas.xmlsoap.org/soap/envelope/) = 41
write(1, "\"\n", 2"
) = 2
write(1, "}\n", 2}
) = 2
write(1, "$res is null", 12$res is null) = 12
setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
exit_group(255) = ?
Process 25472 detached
It is weird, php does not make anything after reading the cached wsdl...
I also tried to delete the cached wsdl (/tmp/wsdl-910d1c97da8a042e8fa7d058734fbf47)
re-running the strace show PHP rebuilding this cache file and "pausing" just after rewriting it... :
CODE
open("/tmp/wsdl-910d1c97da8a042e8fa7d058734fbf47", O_WRONLY|O_CREAT|O_EXCL, 0666) = 3
write(3, "wsdl\16\0\204\325\344HM\0\0\0https://xxxxxxxxxxxxxxxxxxx:443/integrationapi_200"..., 32065) = 32065
close(3)
write(3, "wsdl\16\0\204\325\344HM\0\0\0https://xxxxxxxxxxxxxxxxxxx:443/integrationapi_200"..., 32065) = 32065
close(3)
So i am going to search on an other way...
Have you an idea Andrew ?
#7
Posted 02 October 2008 - 02:13 PM
QUOTE (DaviXX @ Oct 2 2008, 04:10 PM) <{POST_SNAPBACK}>
So i am going to search on an other way...
Adding :
CODE
ini_set('soap.wsdl_cache_enabled',0);
does not solve anything... (i saw that php is not reading/writing cache on /tmp/wsdl-xxxx with strace)
Searching...
#8
Posted 02 October 2008 - 02:20 PM
QUOTE (DaviXX @ Oct 2 2008, 04:13 PM) <{POST_SNAPBACK}>
Searching...
May the bug is http://bugs.php.net/bug.php?id=43464
Checking...
#9
Posted 02 October 2008 - 02:29 PM
QUOTE (DaviXX @ Oct 2 2008, 04:20 PM) <{POST_SNAPBACK}>
May the bug is http://bugs.php.net/bug.php?id=43464
Yes it is !
Incredible bug http://bugs.php.net/bug.php?id=43464
What i have done :
CODE
wget "https://xxxxxxxxxxxxxxxxxxxx:443/integrationapi_xxxxxxxxxxxxxxx/index.php?wsdl" -O kkapi.wsdl
i have updated in testkk.php5 :
CODE
$kkwsdl = 'kkapi.wsdl';
Same problem.
so :
CODE
perl -pi -e "s/SOAP-ENC:array/SOAP-ENC:Array/g;" kkapi.wsdl
It's running...
Thanks Andrew... Thanks me
I have corrected my first error (not blocking)
#10
Posted 02 October 2008 - 02:34 PM
I don't have time to read through that for a couple of hours (though I assure you I will do so when I get back), but in the meantime have you tried using NuSOAP instead of PHP's native SOAP library? The API itself is using NuSOAP, and our testing was done with NuSOAP as the client, so there might be an issue somewhere that prevents non-NuSOAP clients working.
I admit that if that is the case, it's a bug that needs fixing, because the whole point of open protocols like SOAP is that the client used doesn't matter as long as they follow the protocol, but trying NuSOAP would help us find and fix this problem
Thank you for providing such a lot of debugging information, too. That makes my job so much easier
I admit that if that is the case, it's a bug that needs fixing, because the whole point of open protocols like SOAP is that the client used doesn't matter as long as they follow the protocol, but trying NuSOAP would help us find and fix this problem
Thank you for providing such a lot of debugging information, too. That makes my job so much easier
Andrew Gillard
Lead Developer - Craig Brass Systems
Lead Developer - Craig Brass Systems
#11
Posted 02 October 2008 - 02:36 PM
Ah, so the problem was a bug in the client you were using? If so, that's good news for us
Is there likely to be anything that we can change on the server end to work around that bug?
Andrew Gillard
Lead Developer - Craig Brass Systems
Lead Developer - Craig Brass Systems
#12
Posted 02 October 2008 - 05:42 PM
QUOTE (DaviXX @ Oct 2 2008, 03:29 PM) <{POST_SNAPBACK}>
CODE
perl -pi -e "s/SOAP-ENC:array/SOAP-ENC:Array/g;" kkapi.wsdl
Having re-read this, I realised that all I really had to do was change the code we use to generate the WSDL file so that it uses "Array" instead of "array".
As such, I've uploaded a new version 1.0.1 on our download thread. I've already confirmed that the new version works with NuSOAP, but if you have time, please can you make sure it works with PHP's native SOAP client in your set-up? Thanks
Andrew Gillard
Lead Developer - Craig Brass Systems
Lead Developer - Craig Brass Systems
#13
Posted 03 October 2008 - 05:52 AM
QUOTE (Andrew Gillard @ Oct 2 2008, 07:42 PM) <{POST_SNAPBACK}>
I've already confirmed that the new version works with NuSOAP, but if you have time, please can you make sure it works with PHP's native SOAP client in your set-up? Thanks 
First, thanks for your update :
CODE
- $server->wsdl->addComplexType($arrayName, 'complexType', 'array', '', 'SOAP-ENC:array', array(), array(
- array('ref'=>'SOAP-ENC:arrayType', 'wsdl:arrayType'=>"tns:{$arrayType}[]")
+ $server->wsdl->addComplexType($arrayName, 'complexType', 'array', '', 'SOAP-ENC:Array', array(), array(
+ array('ref'=>'SOAP-ENC:ArrayType', 'wsdl:arrayType'=>"tns:{$arrayType}[]")
- array('ref'=>'SOAP-ENC:arrayType', 'wsdl:arrayType'=>"tns:{$arrayType}[]")
+ $server->wsdl->addComplexType($arrayName, 'complexType', 'array', '', 'SOAP-ENC:Array', array(), array(
+ array('ref'=>'SOAP-ENC:ArrayType', 'wsdl:arrayType'=>"tns:{$arrayType}[]")
Second,
It's OK with PHP-5.2.6 SOAP Native client.
Thanks Andrew,
#14
Posted 15 May 2009 - 01:57 PM
I've released an update that will break this unless you take some very minor action, as I've detailed in my update details post. Please let me know if you need more information or this update causes further problems for you.
Andrew Gillard
Lead Developer - Craig Brass Systems
Lead Developer - Craig Brass Systems
Share this topic:
Page 1 of 1
Sign In »
Register Now!
Help

Back to top








