function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DG-AngDG-Ang 

'uri' option is requred in nonWSDL mode ERROR

Hi Everyone
 
I am getting the following error sometimes. I am using the PHP toolkit

SoapFault exception: [Client] SoapClient::__construct() [<a href='function.SoapClient---construct'>function.SoapClient---construct</a>]: 'uri' option is requred in nonWSDL mode in /home/clients/websites/w_angel/public_html/epifany/soapclient/SforceBaseClient.php:59

Stack trace:

#0 /home/clients/websites/w_angel/public_html/epifany/soapclient/SforceBaseClient.php(59): SoapClient->__construct(NULL, Array)

#1 /home/clients/websites/w_angel/public_html/epifany/selfserviceuser/SelfServiceUserUtility.php(152): SforceBaseClient->createConnection(NULL)

#2 /home/clients/websites/w_angel/public_html/epifany/ssp/hangup.php(8): SelfServiceUserUtility->__construct(NULL, NULL, NULL)

This happens sometimes, It was happening yesterday around 11.45 AM EST and last night at around 10.45 PM EST.

What can be the issue here, I don't understand. I have not changed the code at all.

 

DG

Tran ManTran Man
Is this still happening?  Intermittent problems like these tell me it's a server-to-server problem.

Could you post code snippet around where it fails?


DG-AngDG-Ang

Hi Nick

The error is coming from line

    $this->sforce = new SoapClient($wsdl, array('trace' => 1, 'encoding' => 'utf-8'));

i.e in SforceBaseClient.php line 59

DG

 

lachoflachof
Hello, did you find a cause/solution for this?
I am getting the same message

thnx in advance
zbeckmanzbeckman
This is happening to me too, and it seems to have begun yesterday.

We made no changes to the code, but the server was moved (so, it's IP address changed). Literally, turn off server, move to new location, turn on server... and now we cannot connect to Salesforce.

I get the same 'uri' message as above.

Any help would be appreciated... how did you resolve the issue?
Tran ManTran Man
I was able to reproduce the problem if I passed in NULL to the createConnection call rather the WSDL.

For example, if I changed

Code:
  $mySforceConnection = new SforceEnterpriseClient();
  $mySoapClient = $mySforceConnection->createConnection(SOAP_CLIENT_BASEDIR.'/enterprise.wsdl.xml');

to

Code:
  $mySforceConnection = new SforceEnterpriseClient();
  $mySoapClient = $mySforceConnection->createConnection();

 I get the error: "SoapClient::SoapClient(): 'uri' option is requred in nonWSDL mode"

So double-check that the WSDL is properly loaded.  It might help to debug the createConnection method in SforceBaseClient by printing out the WSDL.

 

zbeckmanzbeckman
Thanks... turns out, it was the Salesforce security token.

It took a day of digging (and turning on deeper and deeper debugging messages) before I got something back that let me know what was going on. This was the first time we moved a server outside of the corporate network -- so, we had to add a security token to the account password. All working now.