我試圖使用/消耗在Visual Studio 2010中的API文檔提供了3個網址的網絡服務使用Web服務:使用asp.net和Visual Studio 2010
- http://testwebpay.interswitchng.com/test_paydirect/services/webpayservice.svc
- http://testwebpay.interswitchng.com/test_paydirect/api/v1/gettransaction.xml
- http://testwebpay.interswitchng.com/test_paydirect/api/v1/gettransaction.json
文檔提供了兩個示例。對JSON他們說樣品要求是這樣的:
Http://testwebpay.interswitchng.com/test_paydirect/api/v1/gettransaction.json?productid=21&transactionreference=8421941122&amount=300000 HTTP/1.1
UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 4.0.30319.239)
Hash: F6FF2E22F99D93DDDA52D71811FD92B3A71FA1968A66216E0D310DAD
和XML:
GET Http://testwebpay.interswitchng.com/test_paydirect/api/v1/gettransaction.xml?productid=21&transactionreference=8421941122&amount=300000 HTTP/1.1
UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 4.0.30319.239)
Hash: F6FF2E22F99D93DDDA52D71811FD92B3A71FA1968A66216E0D310DAD
文檔不給例如消費.svc
網址
我試圖用Add -> Webservice Reference
在VS 2010,但我不斷收到以下錯誤爲.svc
網址(上面3中的第一個):
下載
https://testwebpay/test\_paydirect/services/WebPAYService.svc?wsdl
時出現錯誤。
遠程名稱無法解析:'testwebpay'
元數據包含無法解析的引用:https://testwebpay/test\_paydirect/services/WebPAYService.svc?wsdl
。
在https://testwebpay/test\_paydirect/services/WebPAYService.svc?wsdl
沒有端點收聽可以接受該消息。這通常是由不正確的地址 或SOAP操作引起的。有關更多詳細信息,請參閱InnerException(如果存在)。
遠程名稱無法解析:testwebpay「
了上述3個網址的,我需要使用添加服務refernce。服務端有問題還是我做錯了?
請建議
@marc_s我使用像這樣的完整網址http://testwebpay.interswitchng.com/test_paydirect/services/webpayservice.svc – DotnetSparrow
您的意思是interswitching.com而不是interswitchng.com? – DotnetSparrow