Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting the response Data #42

Open
sebassco-dp opened this issue May 19, 2016 · 0 comments
Open

Getting the response Data #42

sebassco-dp opened this issue May 19, 2016 · 0 comments

Comments

@sebassco-dp
Copy link

sebassco-dp commented May 19, 2016

@andrewmcgivery Hi! I am using this solution and it is working pretty fine.

I only have an issue and it is retrieving what the web service ends up sending as a response. Although I can see on fiddler packet trace that I have recieved one, if I try to operate that response I end up getting an empty object.

Here is the response I get from the service:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Body>
        <StartConsultaResponse xmlns="http://ABMA/ConsultarRiesgoStartWS.tws">
            <riesgo>
                <cuit_cuil>20-35273177-4</cuit_cuil>
                <plan>2</plan>
                <respuesta>true</respuesta>
                <mensajeCentral>No se encontraron riesgos significativos</mensajeCentral>
            </riesgo>
        </StartConsultaResponse>
    </soapenv:Body>
</soapenv:Envelope>

And this is how I use the factory method:

$scope.cargarSolicitud = function(){
        $scope.solicitudAEnviar.cuit_cuil = angular.copy($scope.riskData.cuit);
        $scope.solicitudAEnviar.planActual = angular.copy($scope.comboData.planAnterior.id);
        $scope.solicitudAEnviar.planSolicitado = angular.copy($scope.comboData.planSolicitado.id);

    }

    $scope.call = function(){

        webService.ConsultarRiesgo($scope.solicitudAEnviar).then(function(result){
            $window.alert("The user: "+result.riesgo.cuit_cuil+" received the following response: "+result.riesgo.mensajeCentral);
        });

    }; 

In the end, no window gets opened, and, in fact, if I do this:

$scope.call = function(){

        $scope.finalResult = webService.ConsultarRiesgo($scope.solicitudAEnviar);

    };

The final object is "{}". It looks like I get an object without any contents. Is there any mistake on how I am using it?

Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant