个路高人好!在做一个Web Service 客户端在设置服务和端口时出现下面的错误,是什么原因呢?服务已经做好了,wsdl都可以通过IE显示了,整了好几天,没搞定。很郁闷呢。 
====================
服务器无法解释此项请求,也可能给请求无效。
Line: 0

解决方案 »

  1.   

    我这里有tomcat,iis等一些web服务器,会不会是系统端口紊乱呢?有经验的朋友帮忙一下吧,谢谢!
      

  2.   

    能够用WSDL Import 进工程么?如果能够,应该可以调用的。
    可以看看调用的源吗么?
      

  3.   

    源码可以看。
    我的联系方式:QQ:12814574email:[email protected]
      

  4.   

    就是无法用WSDL Import 进工程的时候出现错误:服务器无法解释此项请求,也可能给请求无效。
    Line: 0
      

  5.   

    既然无法用WSDL Import,就说明是Web Server端的服务错误。
    如果是用.net做的,可以切磋一下,如果是其他的,则无能为力了。
      

  6.   

    客户端的 wdsl 属性设什么, 让看下
      

  7.   

    还有就是服务器目前用的是哪个形态, ie 中 wsdl 贴上来最好
      

  8.   

    <?xml version="1.0" ?> 
    - <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="IFirstWSservice" targetNamespace="http://www.borland.com/soapServices/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
      <message name="GetWSMsgRequest" /> 
    - <message name="GetWSMsgResponse">
      <part name="return" type="xs:string" /> 
      </message>
    - <portType name="IFirstWS">
    - <operation name="GetWSMsg">
      <input message="GetWSMsgRequest" /> 
      <output message="GetWSMsgResponse" /> 
      </operation>
      </portType>
    - <binding name="IFirstWSbinding" type="IFirstWS">
      <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" /> 
    - <operation name="GetWSMsg">
      <soap:operation soapAction="urn:FirstWSIntf-IFirstWS#GetWSMsg" /> 
    - <input>
      <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:FirstWSIntf-IFirstWS" /> 
      </input>
    - <output>
      <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:FirstWSIntf-IFirstWS" /> 
      </output>
      </operation>
      </binding>
    - <service name="IFirstWSservice">
    - <port name="IFirstWSPort" binding="IFirstWSbinding">
      <soap:address location="http://localhost:1024/hh.exe/soap/IFirstWS" /> 
      </port>
      </service>
      </definitions>
    在IE里可以看到WSDL文件了,说明服务已经做好了,但是就是Import不了,出现错误:
    “服务器无法解释此项服务请求,也可能该请求无效
    Line:0”请上楼的星级高手指教!
      

  9.   

    若可以,你加我QQ;
    12814574,或者mail:[email protected]
      

  10.   

    import 时用 http://127.0.0.1:1024/hh.exe/soap/IFirstWS, 
    用 127.0.0.1 而不要用 localhost, 常常取不到
      

  11.   

    答案:
    localhost改成IP地址就好了,至于为什么,现在还不清楚。