I am tracing down the Security issue, but I did install
Cache with minimal security.
One thing that makes me think this is not a problem is that
if I same thing through Cache using the internal Apache server rather than a
standalone it works. So it is something with coming from the external
apache that is involved in this too
Rich Taylor
Sales Engineer
InterSystems Corporation
Hi!
I guess you have problems with authentication.
If you would save the wsdl file at the same directory that php script
is, and would modify the php code as:
<?
require_once('./nusoap/lib/nusoap.php');
$url = 'isc.saleseng.PHPService.wsdl.xml'; // wsdl in local
file
$client = new nusoap_client($url,true);
$result = $client->call('WebMfgForm',array('Arg' => "from
phpxxxx"));
//print_r($client);
echo $err = $client->getError();
echo $result;
?>
you would get:
wsse:FailedAuthentication: The
security token could not be authenticated or authorizedArray
Next thing is to learn how to change SOAP header in NuSoap and add
WS-Security elements or to switch off the authentication in Cache.
Ask Google about WS-Security and NuSOAP
Regards,
On Apr 13, 2009, at 9:59 PM, Rich Taylor wrote:
I am currently
working on a php program that calls a web service from PHP. This program
is using the NUSoap library. The program is running, but the web service
does not executed. I am getting an error as shown below when I test the
client->GetError() results after I call the web
service.
The environment is a
separate Apache 2.2 instance working with Cache. Both are installed on
the same server. I can verify that the webservice works correctly when
run from the URL. It can be confirmed that this does use the standalone
apache by looking at the access.log. Looking at the Cache CSP log shows
that the wsdl is being requested and responded to from the PHP program, but
the web service call never shows up.
Here are the
relevant lines of code
The $client is
filled in and would appear to be correct.
When echoed to the
page here is the value of $client
object(nusoap_client)#2 (49)
{ ["username"]=> string(0) "" ["password"]=> string(0) ""
["authtype"]=> string(0) "" ["certRequest"]=> array(0) { }
["requestHeaders"]=> bool(false) ["responseHeaders"]=> string(0) ""
["responseHeader"]=> NULL ["document"]=> string(0) "" ["endpoint"]=>
string(49) "http://localhost/csp/arcdev/MFG.ARCDEV.cls?wsdl=1"
["forceEndpoint"]=> string(0) "" ["proxyhost"]=> bool(false)
["proxyport"]=> bool(false) ["proxyusername"]=> bool(false)
["proxypassword"]=> bool(false) ["xml_encoding"]=> string(0) ""
["http_encoding"]=> bool(false) ["timeout"]=> int(0)
["response_timeout"]=> int(30) ["endpointType"]=> string(4) "wsdl"
["persistentConnection"]=> bool(false) ["defaultRpcParams"]=>
bool(false) ["request"]=> string(0) "" ["response"]=> string(0) ""
["responseData"]=> string(0) "" ["cookies"]=> array(0) { }
["decode_utf8"]=> bool(true) ["operations"]=> array(0) { }
["curl_options"]=> array(0) { } ["bindingType"]=> string(0) ""
["use_curl"]=> bool(false) ["fault"]=> NULL ["faultcode"]=> NULL
["faultstring"]=> NULL ["faultdetail"]=> NULL ["title"]=> string(6)
"NuSOAP" ["version"]=> string(5) "0.7.3" ["revision"]=> string(18)
"$Revision: 1.114 $" ["error_str"]=> string(0) "" ["debug_str"]=>
string(286) "2009-04-13 13:55:55.086697 nusoap_client: ctor wsdl=1 timeout=0
response_timeout=30 endpoint=string(49) "http://localhost/csp/arcdev/MFG.ARCDEV.cls?wsdl=1"
2009-04-13 13:55:55.086888 nusoap_client: will use lazy evaluation of wsdl
from http://localhost/csp/arcdev/MFG.ARCDEV.cls?wsdl=1
" ["charencoding"]=> bool(true) ["debugLevel"]=> int(9)
["XMLSchemaVersion"]=> string(32) "http://www.w3.org/2001/XMLSchema"
["soap_defencoding"]=> string(10) "ISO-8859-1" ["namespaces"]=> array(4)
{ ["SOAP-ENV"]=> string(41) "http://schemas.xmlsoap.org/soap/envelope/"
["xsd"]=> string(32) "http://www.w3.org/2001/XMLSchema"
["xsi"]=> string(41) "http://www.w3.org/2001/XMLSchema-instance"
["SOAP-ENC"]=> string(41) "http://schemas.xmlsoap.org/soap/encoding/"
} ["usedNamespaces"]=> array(0) { } ["typemap"]=> array(6) { ["http://www.w3.org/2001/XMLSchema"]=>
array(43) { ["string"]=> string(6) "string" ["boolean"]=> string(7)
"boolean" ["float"]=> string(6) "double" ["double"]=> string(6) "double"
["decimal"]=> string(6) "double" ["duration"]=> string(0) ""
["dateTime"]=> string(6) "string" ["time"]=> string(6) "string"
["date"]=> string(6) "string" ["gYearMonth"]=> string(0) ""
["gYear"]=> string(0) "" ["gMonthDay"]=> string(0) "" ["gDay"]=>
string(0) "" ["gMonth"]=> string(0) "" ["hexBinary"]=> string(6)
"string" ["base64Binary"]=> string(6) "string" ["anyType"]=> string(6)
"string" ["anySimpleType"]=> string(6) "string" ["normalizedString"]=>
string(6) "string" ["token"]=> string(6) "string" ["language"]=>
string(0) "" ["NMTOKEN"]=> string(0) "" ["NMTOKENS"]=> string(0) ""
["Name"]=> string(0) "" ["NCName"]=> string(0) "" ["ID"]=> string(0)
"" ["IDREF"]=> string(0) "" ["IDREFS"]=> string(0) "" ["ENTITY"]=>
string(0) "" ["ENTITIES"]=> string(0) "" ["integer"]=> string(7)
"integer" ["nonPositiveInteger"]=> string(7) "integer"
["negativeInteger"]=> string(7) "integer" ["long"]=> string(7) "integer"
["int"]=> string(7) "integer" ["short"]=> string(7) "integer"
["byte"]=> string(7) "integer" ["nonNegativeInteger"]=> string(7)
"integer" ["unsignedLong"]=> string(0) "" ["unsignedInt"]=> string(0) ""
["unsignedShort"]=> string(0) "" ["unsignedByte"]=> string(0) ""
["positiveInteger"]=> string(0) "" } ["http://www.w3.org/2000/10/XMLSchema"]=>
array(11) { ["i4"]=> string(0) "" ["int"]=> string(7) "integer"
["boolean"]=> string(7) "boolean" ["string"]=> string(6) "string"
["double"]=> string(6) "double" ["float"]=> string(6) "double"
["dateTime"]=> string(6) "string" ["timeInstant"]=> string(6) "string"
["base64Binary"]=> string(6) "string" ["base64"]=> string(6) "string"
["ur-type"]=> string(5) "array" } ["http://www.w3.org/1999/XMLSchema"]=>
array(11) { ["i4"]=> string(0) "" ["int"]=> string(7) "integer"
["boolean"]=> string(7) "boolean" ["string"]=> string(6) "string"
["double"]=> string(6) "double" ["float"]=> string(6) "double"
["dateTime"]=> string(6) "string" ["timeInstant"]=> string(6) "string"
["base64Binary"]=> string(6) "string" ["base64"]=> string(6) "string"
["ur-type"]=> string(5) "array" } ["http://soapinterop.org/xsd"]=>
array(1) { ["SOAPStruct"]=> string(6) "struct" } ["http://schemas.xmlsoap.org/soap/encoding/"]=>
array(3) { ["base64"]=> string(6) "string" ["array"]=> string(5) "array"
["Array"]=> string(5) "array" } ["http://xml.apache.org/xml-soap"]=>
array(1) { [0]=> string(3) "Map" } } ["xmlEntities"]=> array(5) {
["quot"]=> string(1) """ ["amp"]=> string(1) "&" ["lt"]=>
string(1) "<" ["gt"]=> string(1) ">" ["apos"]=> string(1) "'" }
["wsdlFile"]=> string(49) "http://localhost/csp/arcdev/MFG.ARCDEV.cls?wsdl=1"
["wsdl"]=> NULL }