Bug #43910 [Com]: Error when parsing Akamain SOAP

2012-01-23 Thread pritiatwork at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=43910&edit=1

 ID: 43910
 Comment by: pritiatwork at gmail dot com
 Reported by:vbrodsky at tremormedia dot com
 Summary:Error when parsing Akamain SOAP
 Status: No Feedback
 Type:   Bug
 Package:SOAP related
 Operating System:   CentOS release 5 (Final)
 PHP Version:5.2.5
 Block user comment: N
 Private report: N

 New Comment:

PHP : 5.2.11
OS:RedHat5

Error Received:
string(192) "Exception: class com.idoox.soap.DemarshallException: Type in 
schema differs from type in SOAP message - expected 
string@http://www.w3.org/1999/XMLSchema; got Map@http://xml.apache.org/xml-soap";


Previous Comments:

[2010-02-26 22:05:00] hrad...@php.net

This works for me:

https://ccuapi.akamai.com/ccuapi-axis.wsdl');

$username = 'example';
$password = 'secret';
$url = 'http://www.example.com/foo.php';

try {
$purgeResult = $client->purgeRequest($username, $password, '', array(), 
array($url));
}
catch(SoapFault $e){
echo "Exception\n";
var_dump($e);
echo "\n";

}
var_dump($purgeResult);
?>


[2008-02-05 01:00:02] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".


[2008-01-28 23:13:21] tony2...@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.




[2008-01-22 17:50:54] vbrodsky at tremormedia dot com

Description:

I am trying to access Akamai Cache Control Service using SOAP Client. Since 
Akamai officially does not support PHP, I am using Java wsdl 
https://ccuapi.akamai.com/ccuapi-axis.wsdl.

I have created various tests, but no matter what I do I get PHP SOAP exception 
(see below). Is there is something wrong with the array of strings passed as a 
parameter? 

There apparently used to be idoox interoperatbility issue with an array of 
strings (http://aspn.activestate.com/ASPN/Mail/Message/soapbuilders/761488) but 
it is fixed, supposedly.



BTW my php version is 1.5.6 (comes CentOS distribution)

Reproduce code:
---
echo "**";
echo "Example1: call using array() to pass ArrayOfString";
$client = new SoapClient("https://ccuapi.akamai.com/ccuapi-axis.wsdl";);
var_dump($client->__getFunctions());
var_dump($client->__getTypes()); 

$params = array('xxx', 'yyy', NULL, NULL, 
"http://objects.dev.tremormedia.com/xml/val.xml";);

try {
$purgeResult = $client->purgeRequest($params);
}
catch(SoapFault $e){
echo "Exception ";
var_dump($e);
echo "";

}
var_dump($purgeResult);

echo "**";
echo "Example7: call using associative array() to pass parameters; 
ArrayOfString is passed as php array()" . "";
$client = new SoapClient("https://ccuapi.akamai.com/ccuapi-axis.wsdl";);
var_dump($client->__getFunctions());
var_dump($client->__getTypes()); 

$params = array(
"name" => "xxx", 
"pwd" => "yyy", 
"network" => array(''), 
"opt" => array("action=remove"), 
"uri"=> array("http://objects.dev.tremormedia.com/xml/val.xml";) 
);

try {
$purgeResult = $client->purgeRequest($params);
}
catch(SoapFault $e){
echo "Exception ";
var_dump($e);
echo "";

}
var_dump($purgeResult);

Expected result:

should return something... perhaps an Akamai error (url does not existetc.). 
Should not cause a php exce

Bug #43910 [Com]: Error when parsing Akamain SOAP

2012-01-24 Thread pritiatwork at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=43910&edit=1

 ID: 43910
 Comment by: pritiatwork at gmail dot com
 Reported by:vbrodsky at tremormedia dot com
 Summary:Error when parsing Akamain SOAP
 Status: No Feedback
 Type:   Bug
 Package:SOAP related
 Operating System:   CentOS release 5 (Final)
 PHP Version:5.2.5
 Block user comment: N
 Private report: N

 New Comment:

To resolve this issue one can type cast the parameter.


Previous Comments:

[2012-01-23 13:14:07] pritiatwork at gmail dot com

PHP : 5.2.11
OS:RedHat5

Error Received:
string(192) "Exception: class com.idoox.soap.DemarshallException: Type in 
schema differs from type in SOAP message - expected 
string@http://www.w3.org/1999/XMLSchema; got Map@http://xml.apache.org/xml-soap";


[2010-02-26 22:05:00] hrad...@php.net

This works for me:

https://ccuapi.akamai.com/ccuapi-axis.wsdl');

$username = 'example';
$password = 'secret';
$url = 'http://www.example.com/foo.php';

try {
$purgeResult = $client->purgeRequest($username, $password, '', array(), 
array($url));
}
catch(SoapFault $e){
echo "Exception\n";
var_dump($e);
echo "\n";

}
var_dump($purgeResult);
?>


[2008-02-05 01:00:02] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".


[2008-01-28 23:13:21] tony2...@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with ,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.




[2008-01-22 17:50:54] vbrodsky at tremormedia dot com

Description:

I am trying to access Akamai Cache Control Service using SOAP Client. Since 
Akamai officially does not support PHP, I am using Java wsdl 
https://ccuapi.akamai.com/ccuapi-axis.wsdl.

I have created various tests, but no matter what I do I get PHP SOAP exception 
(see below). Is there is something wrong with the array of strings passed as a 
parameter? 

There apparently used to be idoox interoperatbility issue with an array of 
strings (http://aspn.activestate.com/ASPN/Mail/Message/soapbuilders/761488) but 
it is fixed, supposedly.



BTW my php version is 1.5.6 (comes CentOS distribution)

Reproduce code:
---
echo "**";
echo "Example1: call using array() to pass ArrayOfString";
$client = new SoapClient("https://ccuapi.akamai.com/ccuapi-axis.wsdl";);
var_dump($client->__getFunctions());
var_dump($client->__getTypes()); 

$params = array('xxx', 'yyy', NULL, NULL, 
"http://objects.dev.tremormedia.com/xml/val.xml";);

try {
$purgeResult = $client->purgeRequest($params);
}
catch(SoapFault $e){
echo "Exception ";
var_dump($e);
echo "";

}
var_dump($purgeResult);

echo "**";
echo "Example7: call using associative array() to pass parameters; 
ArrayOfString is passed as php array()" . "";
$client = new SoapClient("https://ccuapi.akamai.com/ccuapi-axis.wsdl";);
var_dump($client->__getFunctions());
var_dump($client->__getTypes()); 

$params = array(
"name" => "xxx", 
"pwd" => "yyy", 
"network" => array(''), 
"opt" => array("action=remove"), 
"uri"=> array("http://objects.dev.tremormedia.com/xml/val.xml";) 
);

try {
$purgeResult = $client->purgeRequest($params);
}
catch(SoapFault $e){
echo "Exception ";
var_dump($e);
echo "";