Hello there!
I have a problem with my nusoap webservice.
I have 2 types.
The first is "Country" structure and second is array of countries.
$server->wsdl->addComplexType('Country','complexType','sequence','all','',
array(
'id' => array('name' => 'id', 'type' => 'xsd:int'),
'name' => array('name' => 'name', 'type' => 'xsd:string'),
'flag_file' => array('name' => 'flag_file', 'type' => 'xsd:string'),
'id_world_region' => array('name' => 'id_world_region', 'type' => 'xsd:int')
));
$server->wsdl->addComplexType('CountriesArray','complexType','array','','SOAP-ENC:Array', array(),
array( array('ref'=>'SOAP-ENC:arrayType', 'wsdl:arrayType'=>'tns:Country[]') ), 'tns:Country');
|
Registered method is:
$server->register('GetCountriesList',
array('clientId'=>'xsd:int', 'clientHash'=>'xsd:string'),
array('return'=>'tns:CountriesArray'),
$namespace,true,'document','literal','Returns array of available countries');
|
Now I have a problem, because my webservice needs to be "document/literal" due to Silverlight 3.
But SOAP-ENC:Array, SOAP-ENC:arrayType is incompatible with document/literal so I cant use Arrays
When adding Service Reference in VS it says:
Quote: |
Warning 1 Custom tool warning: Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.XmlSerializerMessageContractImporter
Error: Referenced type 'http://schemas.xmlsoap.org/soap/encoding/:Array' is only valid for encoded SOAP.
|
Can anyone help me with that problem?