class FirstLayerController extends Controller
{
public function actions()
{
return array('methods'=>array('class'=>'CWebServiceAction',
'classMap'=>array('Languages'=>'Languages'
),
),
);
}
For type Languages I used class:
class Languages extends CActiveRecord
{
/**
*
* Enter description here ...
* @var int $lng_id
* @soap
*/
public $lng_id;
/**
*
* Enter description here ...
* @var string $lng_code
* @soap
*/
public $lng_code;
/**
*
* Enter description here ...
* @var string $lng_name
* @soap
*/
public $lng_name;
/**
*
* Enter description here ...
* @var int
* @soap
*/
public $lng_status;
}
My soap method is:
/**
*
* Return available Languages
* @return Languages[]
* @soap
*/
public function getLanguages()
{
.... Some code here that is returning array of Languages ....
}
My question?
After initializing wsdl (I try by .NET WebService Studio client) there is parsing problem:
Schema parsing error Namespace 'хттп://schemas.xmlsoap.org/soap/encoding/' is not available to be referenced in this schema.
I believe that this is a bug in the schema generated by CWsdlGenerator. See Importing definitions from external namespaces. I’m not sure if the namespaces need to be redeclared for the schema element, since they already have been declared at the root element. But the import is missing.
At least, this is my understanding after having read about the problem here and there. I also did a test about WS-I compliance recently. It confirmed the missing import element: See WS-I compliance report (assertion BP2122).
Possible ways to work around this:
don’s use SOAP, but REST
manually fix the WSDL
Try to configure .NET - maybe it’s possible to proceed without having referenced schemas at hand (somehow it works for PHP clients, so is there a reason it shouldn’t also work for other clients?)
//EDIT:
What I forgot: Is the encoding of the URL correct?
I just wondered about those cryptic (to me, I guess you can read it) part in front of the url (“http”). If all your URLs look like this, it’s unlikely to be a problem, but if it is the only one, it might be. And I don’t understand why only part of the URL is encoded using your locale…