Skip to content

Getting the response Data #42

@sebassco-dp

Description

@sebassco-dp

@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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions