[英]Failing to add a service reference in Visual Studio
我遇到了服務問題。
所以基本上我有一個webproject,我想在服務中添加一些外部引用,但在嘗試添加它時,或者當我嘗試發現(通過單擊GO)時,我收到一個錯誤:
The HTML document does not contain Web service discovery information.
Metadata contains a reference that cannot be resolved: 'http://webadress:port/wsdl/authentication-service.wsdl'.
The content type text/html of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: '<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="authentication-service"
targetNamespace="http://www.alfresco.org/ws/service/authentication/1.0"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:auth="http://www.alfresco.org/ws/service/authentication/1.0"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!-- ************************************** -->
<!-- Copyright Alfresco Software, Inc. 2005 -->
<!-- ************************************** -->
<wsdl:types>
<schema elementFormDefault="qualified" targetNamespace="http://www.alfresco.org/ws/service/authentication/1.0" xmlns="http://www.w3.org/2001/XMLSchema">
<element name="startSession">
<complexType>
<sequence>
<element name="fa" type="xsd:string"/>
<element name="fp" type="xsd:string"/>
'.
If the service is defined in the current solution, try building the solution and adding the service reference again.
基本上我不知道我應該知道什么,我怎么仍然可以訪問該服務,最好的方法是什么,以及為什么我不能在VS中引用該服務?
引用是這樣的: http://webadress:port/wsdl/authentication-service.wsdl
(它是外部服務,不是我的或任何東西)
當我在瀏覽器中打開此URL時,我確實獲得了一個有效的xml來查看....
任何想法總是受歡迎的
我曾經在添加外部api引用時遇到類似問題,有時它使用wsdl工具生成代理類。 你可以嘗試一下
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.