javascript - SOAP fault error when using AngularJS to request from SSRS -


i'm using angularjs try pull down list of reports ssrs display in iframe. problem i'm running getting soap fault error when doing post request.

here angular controller looks making post.

function reportssrscontroller($scope, $http, $location) {     $scope.request = '<soap:envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xsd="http://www.w3.org/2001/xmlschema">'         + '<soap:body>'         + '<m:listchildren xmlns:m="http://example.com/reportingserver/reportservice2010">'         + '<m:itempath>/reports</m:itempath>'         + '<m:recursive>false</m:recursive>'          + '</m:listchildren>'          + '</soap:body>'          + '</soap:envelope>';     $http({         method: 'post',          url: '/reportserver/reportservice2010.asmx',          data: $scope.request,          headers: {             'content-type': 'application/soap+xml; action="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/reportserver/listchildren"'         }     })     .success(function(data, status, headers, config){         console.log('in success');         $scope.data = data;     })     .error(function(data, status, headers, config){         console.log('in error');         console.log(data);         console.log(config);     }); } 

and here gist of soap fault error.

system.web.services.protocols.soapexception: value parameter 'itempath' not specified. either missing function call, or set null.

as can see in angular code, itempath included in soap body in same namespace function call. can see in console output of data variable in error block. i'm wondering why not able find information.

is there i'm missing maybe in way angular handling post request? or have not formulated soap request correctly?

it turns out issue related namespace in soap xml.

when changed namespace

http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/reportserver 

to match soap action (minus command @ end); request returned valid soap response.

i'm not sure if limitation of soap or ssrs though since i'm not familiar either.


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -