我一直试图通过“添加服务参考”来获取API,当我输入地址时出现错误,我想知道是否有人可以帮助我。由于我不完全熟悉API以及它们应该如何交互,我不知道我是否提供了足够的信息,如果您需要更多信息,请告诉我。
当我将网址放在浏览器中时,它似乎确实正确拉出,下面的代码是从第1行代码到商店的1个条目的副本。
{
"@odata.context":"http://10.1.1.59/assets/api/$metadata#StoreInfo","value":[
{
"fHasCC":true,"fHasDG":false,"strP_Addrss":"1471 Center ","strP_City":"Mount ","strP_St":"DC","strP_ZipCd":"99999","strP_Phone":"5558858545","strCurCustPhone":"5556668888","strP_Fax":"5557778888","strMgrLName":"Pr","strMgrFName":"Don","strPropEmail":"S01201@lge.com","fRemoved":false,"strRTLID":"12628","strRVP":"RH","strMarket":"Mount , SC","strPropID":"01201","strFirst":"Je","strLast":"Laus","ARstrFirst":"Ada","ARstrLast":"Cer","strPMFirst":"Sn","strPMLast":"Zi","strTruck":"001","RVPstrFirst":"Ry","RVPstrLast":"Han","strPRFirst":"Sa","strPRLast":"Dn","dtAcq":"1995-06-26T00:00:00-04:00","dtOfcSunCl":"1899-12-30T16:00:00-05:00","dtOfcSunOp":"1899-12-30T12:00:00-05:00","dtOfcSatCl":"1899-12-30T18:00:00-05:00","dtOfcSatOp":"1899-12-30T09:00:00-05:00","dtOfcWdCl":"1899-12-30T18:00:00-05:00","dtOfcWdOp":"1899-12-30T09:00:00-05:00","strAccessHours":"6:00 AM to 9:00 PM","strLunch":"1:00 PM TO 2:00 PM","strRVPEmail":"rhage.com","strAMDEmail":"jlage.com","strAREmail":"acoge.com","strPMEmail":"szom","strPREmail":"sdge.com","dblLat":373,"dblLon":71,"strOwnership":"SALP","intProp":1,"fLge":1,"strHRGeneralist":"kas","fWiFi":false
},{
我得到的错误是:
下载时出错 'http://10.1.1.59/assets/api/StoreInfo/ $的元数据'。请求失败 HTTP状态404:未找到。元数据包含一个引用 无法解决:'http://10.1.1.59/assets/api/StoreInfo/'。那里 没有端点在http://10.1.1.59/assets/api/StoreInfo/听取 那可以接受这个消息。这通常是由不正确引起的 地址或SOAP操作。有关更多信息,请参阅InnerException(如果存在) 细节。远程服务器返回错误:(404)Not Found。如果 服务在当前解决方案中定义,尝试构建解决方案 并再次添加服务参考。
我能做些什么才能让它正确连接?我目前正在使用VB.net Windows窗体应用程序。
谢谢