I'm trying to make a SOAP call to the SSRSReporting SOAP service, and receive a SOAP response in XML format. I am trying to use go-wsdl to generate a SSRS SOAP API, however it seems that its "not working" in Go. I want to list the children using go-wsdl. The code below is returning an empty response.
package main
import ssrs "ssrs/myservice"
import "fmt"
//curl http://172.16.1.249/ReportServer/ListChildren -n -v --ntlm -u viewpointops\\dustinf.7C49
func main() {
fmt.Print("gucci
")
client := ssrs.NewSOAPClient("http://$HOST/ReportServer/ReportService2010.asmx", true, &ssrs.BasicAuth{Login: "$USER", Password: "$PASSWORD"})
resp := ssrs.ListChildrenResponse{}
err := client.Call("ListChildren", ssrs.ListChildren{ ItemPath: "/VCS/Custom/", Recursive: true }, resp)
fmt.Println(err)
fmt.Println("%v", resp)
}
I'm thinking that maybe I don't understand SOAP and what it is, but also know that when I try to duplicate the request in curl, its not returning the XML response I expect it to return.
curl http://$HOST/ReportServer/ReportService2010.asmx -n -v --ntlm -u $USER -H "Content-Type: text/xml; charset=utf-8" -H "SOAPAaction: ListChildren" --data '<Envelope xmlns="http://schemas.xmlg/soap/envelope/"><Body xmlns="http://schemas.xmlsoap.org/soap/envelope/"><ListChildren xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer"><ItemPath>/VCS/Custom/</ItemPath><Recursive>true</Recursive></ListChildren></Body></Envelope>' -H "Accept: text/xml; charset=utf-8" -H "User-Agent: PHP/SOAP"
I receive this response:
<html>
<head>
<meta name="Generator" content="Microsoft SQL Server Reporting Services Version 11.0.6251.0">
<title>172.16.1.249/ReportServer - /</title>
</head>
<body><H1>172.16.1.249/ReportServer - /</H1><hr>
<pre> Thursday, December 12, 2013 4:04 PM <dir> <A HREF="?%2fVCS&rs:Command=ListChildren">VCS</A>
</pre><hr>
Microsoft SQL Server Reporting Services Version 11.0.6251.0
</body>
</html>
I'd REALLY like to have the response returned in SOAP XML format so I can use a SOAP parser. I tried the Accept Header, but that's not working. I am mostly asking SO because I don't know what else to try. If not, I guess I can just parse the HTML version, but the whole point is to use the generated code from wsdl and use the SOAP interface.
Thanks!