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

WSDL on Snotel, request successful, response empty #15

Closed
EntilZha opened this issue Nov 3, 2014 · 6 comments
Closed

WSDL on Snotel, request successful, response empty #15

EntilZha opened this issue Nov 3, 2014 · 6 comments
Assignees

Comments

@EntilZha
Copy link

EntilZha commented Nov 3, 2014

First, love your package, definitely fills a need. Found a bug/feature request and would be willing to work on it given some guidance.

I am working with the wsdl service here: http://www.wcc.nrcs.usda.gov/web_service/awdb_web_service_landing.htm

My code calling gowsdl is below

const serviceUrl string = "http://www.wcc.nrcs.usda.gov/awdbWebService/services"

func GetStations() (*struct{}, error) {
    request := getStations{}
    service := NewAwdbWebService(serviceUrl, false)
    var response struct{}
    err := service.client.Call("getStations", request, &response)
    fmt.Println(response)
    return &response, err
}

When I read the println, I get an empty interface. I took a look in wireshark and I get this response

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:getStationsResponse xmlns:ns2="http://www.nrcs.usda.gov/ns/awdbWebService">
<return>2057:AL:SCAN</return>
... (continues for a while in this style)
</ns2:getStationsResponse>
</soap:Body>
</soap:Envelope>

Don't know very much about gowsdl/wsdl internals, but it looks like although there is a response, there is some parsing error perhaps because the service isn't conforming to some expected/well formatted response?

@c4milo
Copy link
Member

c4milo commented Nov 3, 2014

It's not generating operations for some reason. I'm looking into it.

@c4milo
Copy link
Member

c4milo commented Nov 3, 2014

Ah, it is because soapAction is empty in all the declared operations in that WSDL. I'm doing some more research to see what I can do about it while still keeping compliance with the WS-I profile.

@c4milo
Copy link
Member

c4milo commented Nov 3, 2014

Fixed in 3df82da

@c4milo
Copy link
Member

c4milo commented Nov 3, 2014

I also created an example of how to invoke operations from the USDA webservice here: https://github.com/cloudescape/gowsdl/tree/master/examples/usda-awdb

@c4milo c4milo closed this as completed Nov 3, 2014
@c4milo c4milo self-assigned this Nov 3, 2014
@c4milo
Copy link
Member

c4milo commented Nov 3, 2014

Thanks @EntilZha for your bug report and please let me know if you hit any other issue.

@EntilZha
Copy link
Author

EntilZha commented Nov 3, 2014

Thanks for the fix, works super well, repo starred :)

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

2 participants