WebService Axis - Retorno Errado

Bom Tarde Galera!

Estou desenvolvendo um webservice utilizando AXIS 2 e retornando um array de classe, o AXIS gera o WSDL perfeitamente, o retorno no browser fica o seguinte:

[code]

xxx
xxx
<cidade_estado>xxx</cidade_estado>
xxx
<data_entrada>xxx</data_entrada>
<data_nascimento>xxx</data_nascimento>
<data_saida>xxx</data_saida>
xxx
xxx
<med_resp>xxx</med_resp>
xxx
xxx
xxx
xxx
xxx
xxx
<tipo_atendimento>xxx</tipo_atendimento>

[/code]

Porém ao consumir o WebService faço o cast do retorno para (Paciente) e dá erro, o retorno do WS é o seguinte:

anyType{bairro=xxx; cep=xxx; cidade_estado=xxx; cpf=xxx; demais campos...}

Se ao chamar o webservice pelo browser o tipo de retorno está correto (Paciente), alguem sabe por que chega ao client como anytype? Como faço um Cast para receber o objeto corretamente?

Agradeço a atenção

Olá,

mesmo alterando de List para Array está dando erro ???Por que será???

qdo vou There is a Web Service here

Click to see the WSDL

gerar dá o erro abaixo usando AXIS 1.4

Mais uma duvda a class Cliente tem que jogar o ponto class junto com a classe .jws ???

abs


   1. AXIS error  
   2.   
   3. Sorry, something seems to have gone wrong... here are the details:  
   4.   
   5. Fault - Error while compiling:  C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\axis\WEB-INF\jwsClasses\Servico.java  
   6.   
   7. AxisFault  
   8. faultCode: {http://xml.apache.org/axis/}Server.compileError  
   9. faultSubcode:   
  10. faultString: Error while compiling:  C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\axis\WEB-INF\jwsClasses\Servico.java  
  11. faultActor:   
  12. faultNode:   
  13. faultDetail:   
  14.     {}Errors:Error compiling C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\axis\WEB-INF\jwsClasses\Servico.java:  
  15. Line 11, column -1:  cannot find symbol  
  16. Line 12, column -1:  cannot find symbol  
  17. Line 12, column -1:  cannot find symbol  
  18. Line 14, column -1:  cannot find symbol  
  19. Line 14, column -1:  cannot find symbol  
  20. Line 20, column -1:  cannot find symbol  
  21. Line 26, column -1:  cannot find symbol  
  22. Line 0, column 0:   
  23. 7 errors  

AXIS error Sorry, something seems to have gone wrong... here are the details: Fault - Error while compiling: C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\axis\WEB-INF\jwsClasses\Servico.java AxisFault faultCode: {http://xml.apache.org/axis/}Server.compileError faultSubcode: faultString: Error while compiling: C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\axis\WEB-INF\jwsClasses\Servico.java faultActor: faultNode: faultDetail: {}Errors:Error compiling C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\axis\WEB-INF\jwsClasses\Servico.java: Line 11, column -1: cannot find symbol Line 12, column -1: cannot find symbol Line 12, column -1: cannot find symbol Line 14, column -1: cannot find symbol Line 14, column -1: cannot find symbol Line 20, column -1: cannot find symbol Line 26, column -1: cannot find symbol Line 0, column 0: 7 errors
view plaincopy to clipboardprint?

   1. import java.util.ArrayList;  
   2. import java.util.List;  
   3.   
   4.   
   5.   
   6. public class Servico {  
   7.      public int soma(int valor1, int valor2) {  
   8.           return valor1 + valor2;  
   9.        }   
  10.        
  11.      public Cliente[] getClientes(int codigo){  
  12.          Cliente[] clientes = new Cliente[3];  
  13.            
  14.          Cliente cli = new Cliente();  
  15.          cli.setCodigo(10);  
  16.          cli.setNome("Jose da Silva");  
  17.          cli.setEndereco("Rua 1");  
  18.          clientes[0]=cli;  
  19.            
  20.          cli = new Cliente();  
  21.          cli.setCodigo(20);  
  22.          cli.setNome("Mario da Silva");  
  23.          cli.setEndereco("Rua 2");  
  24.          clientes[1]=cli;  
  25.            
  26.          cli = new Cliente();  
  27.          cli.setCodigo(30);  
  28.          cli.setNome("Um da Silva");  
  29.          cli.setEndereco("Rua 3");  
  30.          clientes[2]=cli;  
  31.            
  32.          return clientes;  
  33.      }  
  34. }