Php: Soap: uri option is required in nonWSDL mode

From FVue
Jump to: navigation, search

Problem

SoapClient returns this error:

Fatal error: Uncaught SoapFault exception: [Client] 
SoapClient::SoapClient() [soapclient.soapclient]:
'uri' option is required in nonWSDL mode in /foo/bar.php

Environment

  • php-5.3.10

Solution

The error is triggered when the endpoint URL - i.e. the location of the Web service to use - isn't set in the SoapClient.

Make sure the endpoint URL is passed as the `location' option when constructing the SoapClient. See also: SoapClient::__setLocation().

Comments

blog comments powered by Disqus