WebService return does not respect the namespace of my own WSDL

1

Hello! I'm starting now in the world of Webservices. I made a WS in the eclipse wizard using axis 1 (if I'm not mistaken), in the "Bottom up" style: In the eclipse, positioned in the class that will be WS: File-> New-> Other-> Web Service (Class code below).

"Client" and "Address" are in the "template" package. In the WSDL generation, the axis specifies these objects in the model namespace (mod :), but the web service RETURN specifies the main namespace in return (), does not specify the namespace link for the Client and Address fields.

What's missing here? Any annotations in class? How do I do the class return, which is actually the object itself, to be sent in the correct namespace?

Thanks for any tips people. I'm kind of desperate here.

CLASS CODE: package regis.costa;

import register.count.model.Customer; import regis.costa.modelo.Endereco;

public class CadClient {     public ClientCustom Client (ClientCurrent Client) {         Client ClientNovo = new Client ();

    clienteNovo.setCodigo(clienteAtual.getCodigo());
    clienteNovo.setNome("Olá " + clienteAtual.getNome().toUpperCase());

    Endereco[] anterior = clienteAtual.getEnderecos();
    int quant = anterior.length;
    quant++;
    Endereco[] enderecos = new Endereco[quant];

    for (int i = 0; i < anterior.length; i++) {
        enderecos[i] = anterior[i];
    }

    enderecos[--quant] = new Endereco();
    enderecos[quant].setBairro("novo bairro");
    enderecos[quant].setNumero(111);
    enderecos[quant].setRua("nova rua");

    clienteNovo.setEnderecos(enderecos);

    return clienteNovo;
}

}

    
asked by anonymous 21.12.2017 / 15:23

1 answer

0

Problem solved. I got the WSDL generated by the Bottom Up method, and generated a NEW Webserver Server by the Top Down method.

The inexplicable Axis generated the programs of the new Webservice (Interface, SoapBindingImpl, Service, ServiceLocator, SoapBindingStub and SoapBindingSkeleton). I do not know why it generated all these programs, what happens is that this new WS generated fully respects the WSDL. From there I started to make any changes I need in Webservice via WSDL and regenerating the server.

    
06.03.2018 / 18:43