webservice(200分)

  • 主题发起人 主题发起人 aylm
  • 开始时间 开始时间
A

aylm

Unregistered / Unconfirmed
GUEST, unregistred user!
我写了一个简单的WEBSERVICES,在同一台机器上没问题,但是在其它的机器上运行客户端
总是提示“文件的顶层无效”,不知道为什么?
 
你是用soap技术还是其他的技术,能不能说清楚一点。
 
这是因为客户端无法连接到服务器端的WebServices,你可以在客户的机器上打开IE输入服务器wsdl地址,看能不能打开,如不开,请调整服务器。
 
客户端的IE显示一切正常!
 
客户端的IE显示一切正常!
显示的是不是wsdl?象这样的
<?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions targetNamespace="http://xml.apache.org/axis/wsdd/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://xml.apache.org/axis/wsdd/" xmlns:intf="http://xml.apache.org/axis/wsdd/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <wsdl:types>
- <schema targetNamespace="http://xml.apache.org/axis/wsdd/" xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
<element name="AdminService" type="xsd:anyType" />
</schema>
- <schema targetNamespace="" xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
<element name="AdminServiceReturn" type="xsd:anyType" />
</schema>
</wsdl:types>
- <wsdl:message name="AdminServiceRequest">
<wsdl:part element="impl:AdminService" name="part" />
</wsdl:message>
- <wsdl:message name="AdminServiceResponse">
<wsdl:part element="AdminServiceReturn" name="AdminServiceReturn" />
</wsdl:message>
- <wsdl:portType name="Admin">
- <wsdl:operation name="AdminService">
<wsdl:input message="impl:AdminServiceRequest" name="AdminServiceRequest" />
<wsdl:output message="impl:AdminServiceResponse" name="AdminServiceResponse" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="AdminServiceSoapBinding" type="impl:Admin">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="AdminService">
<wsdlsoap:operation soapAction="" />
- <wsdl:input name="AdminServiceRequest">
<wsdlsoap:body namespace="http://xml.apache.org/axis/wsdd/" use="literal" />
</wsdl:input>
- <wsdl:output name="AdminServiceResponse">
<wsdlsoap:body namespace="http://xml.apache.org/axis/wsdd/" use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="AdminService">
- <wsdl:port binding="impl:AdminServiceSoapBinding" name="AdminService">
<wsdlsoap:address location="http://localhost:8080/corpcenter/services/AdminService" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
 
<?xml version="1.0" encoding="utf-8" ?>
- <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="IWSDLPublishservice" targetNamespace="http://tempuri.org/" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:ns1="http://www.borland.com/namespaces/Types">
- <types>
- <xs:schema targetNamespace="http://www.borland.com/namespaces/Types" xmlns="http://www.borland.com/namespaces/Types">
- <xs:complexType name="TWideStringDynArray">
- <xs:complexContent>
- <xs:restriction base="soapenc:Array">
<xs:sequence />
<xs:attribute ref="soapenc:arrayType" n1:arrayType="xs:string[]" xmlns:n1="http://schemas.xmlsoap.org/wsdl/" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
</xs:schema>
</types>
<message name="GetPortTypeList0Request" />
- <message name="GetPortTypeList0Response">
<part name="return" type="ns1:TWideStringDynArray" />
</message>
- <message name="GetWSDLForPortType1Request">
<part name="PortType" type="xs:string" />
</message>
- <message name="GetWSDLForPortType1Response">
<part name="return" type="xs:string" />
</message>
<message name="GetTypeSystemsList2Request" />
- <message name="GetTypeSystemsList2Response">
<part name="return" type="ns1:TWideStringDynArray" />
</message>
- <message name="GetXSDForTypeSystem3Request">
<part name="TypeSystem" type="xs:string" />
</message>
- <message name="GetXSDForTypeSystem3Response">
<part name="return" type="xs:string" />
</message>
- <portType name="IWSDLPublish">
- <operation name="GetPortTypeList">
<input message="tns:GetPortTypeList0Request" />
<output message="tns:GetPortTypeList0Response" />
</operation>
- <operation name="GetWSDLForPortType">
<input message="tns:GetWSDLForPortType1Request" />
<output message="tns:GetWSDLForPortType1Response" />
</operation>
- <operation name="GetTypeSystemsList">
<input message="tns:GetTypeSystemsList2Request" />
<output message="tns:GetTypeSystemsList2Response" />
</operation>
- <operation name="GetXSDForTypeSystem">
<input message="tns:GetXSDForTypeSystem3Request" />
<output message="tns:GetXSDForTypeSystem3Response" />
</operation>
</portType>
- <binding name="IWSDLPublishbinding" type="tns:IWSDLPublish">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
- <operation name="GetPortTypeList">
<soap:operation soapAction="http://www.borland.com/namespaces/Types-IWSDLPublish" style="rpc" />
- <input message="tns:GetPortTypeList0Request">
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://www.borland.com/namespaces/Types" />
</input>
- <output message="tns:GetPortTypeList0Response">
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://www.borland.com/namespaces/Types" />
</output>
</operation>
- <operation name="GetWSDLForPortType">
<soap:operation soapAction="http://www.borland.com/namespaces/Types-IWSDLPublish" style="rpc" />
- <input message="tns:GetWSDLForPortType1Request">
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://www.borland.com/namespaces/Types" />
</input>
- <output message="tns:GetWSDLForPortType1Response">
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://www.borland.com/namespaces/Types" />
</output>
</operation>
- <operation name="GetTypeSystemsList">
<soap:operation soapAction="http://www.borland.com/namespaces/Types-IWSDLPublish" style="rpc" />
- <input message="tns:GetTypeSystemsList2Request">
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://www.borland.com/namespaces/Types" />
</input>
- <output message="tns:GetTypeSystemsList2Response">
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://www.borland.com/namespaces/Types" />
</output>
</operation>
- <operation name="GetXSDForTypeSystem">
<soap:operation soapAction="http://www.borland.com/namespaces/Types-IWSDLPublish" style="rpc" />
- <input message="tns:GetXSDForTypeSystem3Request">
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://www.borland.com/namespaces/Types" />
</input>
- <output message="tns:GetXSDForTypeSystem3Response">
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://www.borland.com/namespaces/Types" />
</output>
</operation>
</binding>
- <service name="IWSDLPublishservice">
- <port name="IWSDLPublishPort" binding="tns:IWSDLPublishbinding">
<soap:address location="http://11.11.11.1/test/test.dll/soap/IWSDLPublish" />
</port>
</service>
</definitions>
 
如果分数不够的话,我可以在给,请帮助我,我已经搞了很久,不知道为什么?
 
问题已经解决!
 
是不是你的客户端连的Web Service是本机的地址而不是服务器的地址的问题呢?
 
后退
顶部