we are trying to use the SOAP service, 'BasicSearch'. I have set the soap server live with public read and the SOAP API Search Service added to the server. works fine when making the request by using SoapUI, but get the following error when using php:
SOAP-ENV:Server Procedure 'BasicSearch' not present
Thanks.
SOAP Error :Server Procedure 'BasicSearch' not present
[quote]
we are trying to use the SOAP service, 'BasicSearch'. I have set the soap server live with public read and the SOAP API Search Service added to the server. works fine when making the request by using SoapUI, but get the following error when using php:
SOAP-ENV:Server Procedure 'BasicSearch' not present
Thanks.
[/quote]
- Make sure Basic Search is checked on the SOAP API Search Service details screen.
- Make sure SOAP API Search Service is checked on the Soap Server details screen.
- Regenerate the SOAP wsdl (Soap Server details screen).
I think it might be one of these points you are missing/have missed.
[quote]
- Make sure Basic Search is checked on the SOAP API Search Service details screen.
- Make sure SOAP API Search Service is checked on the Soap Server details screen.
- Regenerate the SOAP wsdl (Soap Server details screen).
I think it might be one of these points you are missing/have missed.
[/quote]
Thanks for your prompt reply, I have checked the above these points, it all has been set up properly, and I am able to put the request and get the response by using soapUI to call BasicSearch. but still get the error when trying to call it from PHP.
It could be a problem with PHP caching the WDSL. Can you try and place the following line at the start of your code?
ini_set("soap.wsdl_cache_enabled", 0);
[quote]
It could be a problem with PHP caching the WDSL. Can you try and place the following line at the start of your code?
ini_set("soap.wsdl_cache_enabled", 0);
[/quote]
Yes, I did have ini_set("soap.wsdl_cache_enabled", "0"); at the start of my php code.
The code works fine if I change to another external wdsl web service.
However, the parameters I put for the BasicSearch is following:
$params = array('parameters' => array ('AssetTypes' => array( 'AssetType'=>'page', 'Inherit'=>'1'), 'Limit' => '100', 'Statuses' => '16', 'RootIDs' => '162', 'ExcludeRootNodes' => 'TRUE', 'ResultFormat' => '%asset_short_name%'));
$result = $client->call("BasicSearch", $params);
[quote]
Yes, I did have ini_set("soap.wsdl_cache_enabled", "0"); at the start of my php code.
The code works fine if I change to another external wdsl web service.
However, the parameters I put for the BasicSearch is following:
$params = array('parameters' => array ('AssetTypes' => array( 'AssetType'=>'page', 'Inherit'=>'1'), 'Limit' => '100', 'Statuses' => '16', 'RootIDs' => '162', 'ExcludeRootNodes' => 'TRUE', 'ResultFormat' => '%asset_short_name%'));
$result = $client->call("BasicSearch", $params);
[/quote]
Are you using the native PHP soap client or some other module? Normally (using the native PHP soap client), you would call the basic search like (using your example), which is slightly different in syntax:
$params = array( 'AssetTypes' => array( array( 'AssetType' => 'page', 'Inherit' => '1', ), ), 'FieldLogic' => 'AND', 'Limit' => '100', 'Statuses' => array('16'), 'RootIDs' => array('162'), 'ExcludeRootNodes' => TRUE, 'ResultFormat' => '%asset_short_name%', ); $client = new SoapClient($wsdl, $options); $result = $client->BasicSearch($params);
[quote]
Are you using the native PHP soap client or some other module? Normally (using the native PHP soap client), you would call the basic search like (using your example), which is slightly different in syntax:
$params = array( 'AssetTypes' => array( array( 'AssetType' => 'page', 'Inherit' => '1', ), ), 'FieldLogic' => 'AND', 'Limit' => '100', 'Statuses' => array('16'), 'RootIDs' => array('162'), 'ExcludeRootNodes' => TRUE, 'ResultFormat' => '%asset_short_name%', ); $client = new SoapClient($wsdl, $options); $result = $client->BasicSearch($params);
[/quote]
Thanks, I am using nusoap as still running php4 on the server.
[quote]
Thanks, I am using nusoap as still running php4 on the server.
[/quote]
Ok, the only difference (that I can see) would be the actual calling of the function, nusoap uses $client->call() whereas PHP5 uses $client->BasicSearch().
Also, hopefully matrix is not running on this PHP4 server (as it requires PHP5).
[quote]
Ok, the only difference (that I can see) would be the actual calling of the function, nusoap uses $client->call() whereas PHP5 uses $client->BasicSearch().
Also, hopefully matrix is not running on this PHP4 server (as it requires PHP5).
[/quote]
No, Matrix is running on PHP5 without any problem. I was trying to call the Matrix web service from another server.
So you think it will be the php coding problem to cause the error "SOAP-ENV:Server Procedure 'BasicSearch' not present"?
Thanks.
[quote]
Ok, the only difference (that I can see) would be the actual calling of the function, nusoap uses $client->call() whereas PHP5 uses $client->BasicSearch().
Also, hopefully matrix is not running on this PHP4 server (as it requires PHP5).
[/quote]
I tried to using CreateAsset() and it works perfect, but not BasicSearch(), any advice? thanks!