Structure de données NUSOAP PHP WSDL

Fermé
sgenou Messages postés 1 Date d'inscription lundi 6 août 2007 Statut Membre Dernière intervention 3 juillet 2009 - 3 juil. 2009 à 10:39
Darkito Messages postés 1191 Date d'inscription vendredi 7 décembre 2007 Statut Membre Dernière intervention 26 mai 2010 - 3 juil. 2009 à 11:28
Bonjour, j'ai un soucis avec une structure de données WSDL, j'utilise NuSOAP PHP, voici ce que j'ai fait;

$GLOBALS['server']->wsdl->addComplexType(
'ScoresInfos',
'complexType',
'struct',
'all',
'',
array('user_id' => array('name' => 'user_id', 'type' => 'xsd:int'),
'course_id' => array('name' => 'course_id', 'type' => 'xsd:int'),
'scosinfos' => array('name' => 'scosinfos', 'type' => 'tns:ScoInfosArray'))
);


$GLOBALS['server']->wsdl->addComplexType(
'ScoInfosArray',
'complexType',
'array',
'',
'SOAP-ENC:Array',
array(),
array(
array('ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'tns:ScoInfos[]')
),
'tns:ScoInfos'
);


$GLOBALS['server']->wsdl->addComplexType(
'ScoInfos',
'complexType',
'struct',
'all',
'',
array('sco_id' => array('name' => 'sco_id', 'type' => 'xsd:int'),
'interactions' => array('name' => 'interactions', 'type' => 'tns:InteractionInfosArray'))
);

$GLOBALS['server']->wsdl->addComplexType(
'InteractionInfosArray',
'complexType',
'array',
'',
'SOAP-ENC:Array',
array(),
array(
array('ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'tns:InteractionInfos[]')
),
'tns:InteractionInfos'
);

$GLOBALS['server']->wsdl->addComplexType(
'InteractionInfos',
'complexType',
'struct',
'all',
'',
array('label' => array('name' => 'label', 'type' => 'xsd:string'),
'learner_response' => array('name' => 'learner_response', 'type' => 'xsd:string'),
'correct_response' => array('name' => 'correct_response', 'type' => 'xsd:string'),
'latency' => array('name' => 'course_nb_acces', 'type' => 'xsd:int'),
'type' => array('name' => 'type', 'type' => 'xsd:string'),
'weighting' => array('name' => 'weighting', 'type' => 'xsd:int'),
'result' => array('name' => 'result', 'type' => 'xsd:int'),
'description' => array('name' => 'description', 'type' => 'xsd:string'))
);

Cette structure n'est pas bonne et je ne comprend pas pourquoi... Merci d'avance de votre aide.

1 réponse

Darkito Messages postés 1191 Date d'inscription vendredi 7 décembre 2007 Statut Membre Dernière intervention 26 mai 2010 545
3 juil. 2009 à 11:28
Bonjour,

Quelle est le problème exact que tu rencontre ?
"Cette structure n'est pas bonne" c'est un peu vague...

Chez moi, le WSDL est généré, donc ce n'est pas une erreur de syntaxe.
0