2013-03-15 62 views
0

我遇到了服务问题。未能在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(这是外部的服务,这是不是我或任何东西)

当我在浏览器中打开这个网址我得到一个有效的XML看....

总是欢迎任何想法

+0

你可以在浏览器中打开你的参考地址吗? – CathalMF 2013-03-15 13:19:23

+0

是的,忘了提及,当我在浏览器中打开它时,我得到一个有效的xml东西 – Alnedru 2013-03-15 13:27:06

+0

是否可以共享确切的地址? – CathalMF 2013-03-15 13:28:26

回答

2

我以前有类似的问题,当添加外部API引用,有时它使用wsdl工具生成代理类。你可以试一试

+0

我做了尝试,但仍然我得到同样的问题,当我运行它说: - 该HTML文档不包含Web服务发现信息。如果您需要更多帮助,请输入“wsdl /?”。 – Alnedru 2013-03-15 14:03:56

+1

我试过这个命令:“C:\ Program Files \ Microsoft SDKs \ Windows \ v6.0A \ bin \ wsdl.exe”/out:c:/WebService.cs/order http:// webadress:port/wsdl /authentication-service.wsdl – Alnedru 2013-03-15 14:11:35

相关问题