I'm trying to use nuSOAP to send an array with some data that will use it in the database, but every time I get this "wsdl error: XML error parsing the WSDL problem ... not correctly generated (invalid token)" on my client .php
Here is my little server code:
$server->register('cadastrar', array('dados'=>'tns:cadastro'), array('return'=>'xsd:string'), $namespace, $namespace.'#cadastrar', 'rpc', 'encoded', '' ); $server->wsdl->addComplexType('cadastrar', 'complexType', 'struct', 'all','', array( 'empresa' =>array ('name'=>'empresa','type'=>'xsd:string') ,'nome' =>array ('name'=>'nome','type'=>'xsd:string') ,'email' =>array ('name'=>'email','type'=>'xsd:string') ,'ddd' =>array ('name'=>'ddd','type'=>'xsd:string') ,'tel' =>array ('name'=>'tel','type'=>'xsd:string') ,'msg' =>array ('name'=>'msg','type'=>'xsd:string') ) ); function cadastrar($dados){
and this is my client code:
$dados = array( 'empresa' => $_POST['empresa'], 'nome' => $_POST['nome'], 'email' => $_POST['email'], 'ddd' => $_POST['ddd'], 'tel' => $_POST['tel'], 'msg' => $_POST['msg'] );
Has anyone understood why it is not working?
thanks