简体   繁体   English

错误:HomeBtroller中的Wasabi :: Resolver :: HTTPError#MindBody API SOAP RoR索引

[英]Error: Wasabi::Resolver::HTTPError in HomeController#index for MindBody API SOAP RoR

I'm trying to link into the mindbody API to book members in using RoR from this git: https://github.com/mindbody/API-Examples/tree/master/Ruby 我正在尝试链接到mindbody API以预订使用此git中的RoR的成员: https//github.com/mindbody/API-Examples/tree/master/Ruby

Error: 错误:

Wasabi::Resolver::HTTPError in HomeController#index HomeController #index中的Wasabi :: Resolver :: HTTPError

According to the logs, I haven't entered the correct details. 根据日志,我没有输入正确的细节。 However, I have changed the source and user credentials in the home_controller controller file. 但是,我更改了home_controller控制器文件中的源和用户凭据。

source_credentials = {:SourceName => 'MySourceName', :Password => 'MySourcePassword', :SiteIDs => site_ids } user_credentials = { :Username => 'MyUsername', :Password => 'MyUserPassword', :SiteIDs => site_ids }

Thanks in advance! 提前致谢!

SOAP log: SOAP日志:

_getClasses_request.xml _getClasses_request.xml

<?xml version="1.0" encoding="utf-8" ?> <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <env:Body> <n1:GetClasses xmlns:n1="http://clients.mindbodyonline.com/api/0_5"> <n1:Request> </n1:Request> </n1:GetClasses> </env:Body> </env:Envelope>

_getClasses_response.xml: _getClasses_response.xml:

<soap:Body> <GetClassesResponse xmlns="http://clients.mindbodyonline.com/api/0_5"> <GetClassesResult> <Status>InvalidCredentials</Status> <Message>SourceCredentials must be provided.</Message> <XMLDetail>Full</XMLDetail> <ResultCount>0</ResultCount> <CurrentPageIndex>0</CurrentPageIndex> <TotalPageCount>0</TotalPageCount> </GetClassesResult> </GetClassesResponse> </soap:Body> </soap:Envelope>

I'd probably avoid basing any Ruby code you plan on writing for your MindBody app on the code you find in their official example code repos, and instead just use the mindbody-api gem to wrap your API calls. 我可能会避免在你的MindBody应用程序上为你的官方示例代码库中找到的代码编写任何Ruby代码,而只需使用mindbody-api gem来包装你的API调用。

As for your issue, it doesn't actually look like you have passed any authentication parameters (neither source credentials, nor user credentials) into your XML request, which would explain the response that you got back. 至于您的问题,实际上看起来您没有将任何身份验证参数(源凭据和用户凭据)都传递到XML请求中,这可以解释您收到的响应。

If you haven't already, have a look at the Authentication page of the MindBody documentation, as well as the GetClasses entry in the ClassService page documentation page to see what your XML request should look like (both require a MindBody account to access). 如果您还没有,请查看MindBody文档的Authentication页面 ,以及ClassService页面文档页面中的GetClasses条目,以查看您的XML请求应该是什么样的(两者都需要MindBody帐户才能访问)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM