目前环境是,java开发的web service服务端,我用delphi开发的客户端,可是当我把服务端的wsdl保存下来,用delphi的wsdl importer导入时,报出错误:
unable to load wsdl file/location:d:\work\test\update.wsdl. error[Invalid xml declaration line: 1  .......]文件的内容如下:
<?xml version="1.0" encoding="UTF-8" ?> 
- <wsdl:definitions targetNamespace="http://getcti.com" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope" xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://getcti.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding">
- <wsdl:types>
- <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://getcti.com">
- <xsd:element name="getCTIinfo">
- <xsd:complexType>
- <xsd:sequence>
  <xsd:element maxOccurs="1" minOccurs="1" name="in0" nillable="true" type="xsd:string" /> 
  <xsd:element maxOccurs="1" minOccurs="1" name="in1" nillable="true" type="xsd:string" /> 
  <xsd:element maxOccurs="1" minOccurs="1" name="in2" nillable="true" type="xsd:string" /> 
  </xsd:sequence>
  </xsd:complexType>
  </xsd:element>
- <xsd:complexType name="ArrayOfCTIinfoBean">
- <xsd:sequence>
  <xsd:element maxOccurs="unbounded" minOccurs="0" name="CTIinfoBean" nillable="true" type="tns:CTIinfoBean" /> 
  </xsd:sequence>
  </xsd:complexType>
- <xsd:complexType name="CTIinfoBean">
- <xsd:sequence>
  <xsd:element minOccurs="0" name="CChr_Type" nillable="true" type="xsd:string" /> 
  <xsd:element minOccurs="0" name="errorcode" nillable="true" type="xsd:string" /> 
  <xsd:element minOccurs="0" name="CChr_Category" nillable="true" type="xsd:string" /> 
  <xsd:element minOccurs="0" name="CChr_Item" nillable="true" type="xsd:string" /> 
  <xsd:element minOccurs="0" name="CChr_RID" nillable="true" type="xsd:string" /> 
  </xsd:sequence>
  </xsd:complexType>
- <xsd:element name="getCTIinfoResponse">
- <xsd:complexType>
- <xsd:sequence>
  <xsd:element maxOccurs="1" minOccurs="1" name="out" nillable="true" type="tns:ArrayOfCTIinfoBean" /> 
  </xsd:sequence>
  </xsd:complexType>
  </xsd:element>
  </xsd:schema>
  </wsdl:types>
- <wsdl:message name="getCTIinfoRequest">
  <wsdl:part name="parameters" element="tns:getCTIinfo" /> 
  </wsdl:message>
- <wsdl:message name="getCTIinfoResponse">
  <wsdl:part name="parameters" element="tns:getCTIinfoResponse" /> 
  </wsdl:message>
- <wsdl:portType name="GetCTIPortType">
- <wsdl:operation name="getCTIinfo">
  <wsdl:input name="getCTIinfoRequest" message="tns:getCTIinfoRequest" /> 
  <wsdl:output name="getCTIinfoResponse" message="tns:getCTIinfoResponse" /> 
  </wsdl:operation>
  </wsdl:portType>
- <wsdl:binding name="GetCTIHttpBinding" type="tns:GetCTIPortType">
  <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> 
- <wsdl:operation name="getCTIinfo">
  <wsdlsoap:operation soapAction="" /> 
- <wsdl:input name="getCTIinfoRequest">
  <wsdlsoap:body use="literal" /> 
  </wsdl:input>
- <wsdl:output name="getCTIinfoResponse">
  <wsdlsoap:body use="literal" /> 
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
+ <wsdl:service name="GetCTI">
- <wsdl:port name="GetCTIHttpPort" binding="tns:GetCTIHttpBinding">
  <wsdlsoap:address location="http://182.1.203.241:9080/WS/services/GetCTI" /> 
  </wsdl:port>
  </wsdl:service>
  </wsdl:definitions>
不知道xml格式是否正确,如何解决?请高手急救!!!