一个Webservice问题
一个Webservice服务,下面的内容是访问wsdl之后保存下来的,在delphi2007中导入的时候却不能导入。不知道这个是怎么做的。
<?xml version="1.0" encoding="utf-8"?><wsdl:definitions name="MVS" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://tempuri.org/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"><wsdl:types><xsd:schema targetNamespace="http://tempuri.org/Imports"><xsd:import schemaLocation="http://server_atk/WebService/MonitorVehicleService.MVS.svc?xsd=xsd0" namespace="http://tempuri.org/"/><xsd:import schemaLocation="http://server_atk/WebService/MonitorVehicleService.MVS.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/"/></xsd:schema></wsdl:types><wsdl:message name="IMVS_writeObjectOut_InputMessage"><wsdl:part name="parameters" element="tns:writeObjectOut"/></wsdl:message><wsdl:message name="IMVS_writeObjectOut_OutputMessage"><wsdl:part name="parameters" element="tns:writeObjectOutResponse"/></wsdl:message><wsdl:message name="IMVS_queryObjectOut_InputMessage"><wsdl:part name="parameters" element="tns:queryObjectOut"/></wsdl:message><wsdl:message name="IMVS_queryObjectOut_OutputMessage"><wsdl:part name="parameters" element="tns:queryObjectOutResponse"/></wsdl:message><wsdl:portType name="IMVS"><wsdl:operation name="writeObjectOut"><wsdl:input wsaw:Action="http://tempuri.org/IMVS/writeObjectOut" message="tns:IMVS_writeObjectOut_InputMessage"/><wsdl:output wsaw:Action="http://tempuri.org/IMVS/writeObjectOutResponse" message="tns:IMVS_writeObjectOut_OutputMessage"/></wsdl:operation><wsdl:operation name="queryObjectOut"><wsdl:input wsaw:Action="http://tempuri.org/IMVS/queryObjectOut" message="tns:IMVS_queryObjectOut_InputMessage"/><wsdl:output wsaw:Action="http://tempuri.org/IMVS/queryObjectOutResponse" message="tns:IMVS_queryObjectOut_OutputMessage"/></wsdl:operation></wsdl:portType><wsdl:binding name="BasicHttpBinding_IMVS" type="tns:IMVS"><soap:binding transport="http://schemas.xmlsoap.org/soap/http"/><wsdl:operation name="writeObjectOut"><soap:operation soapAction="http://tempuri.org/IMVS/writeObjectOut" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="queryObjectOut"><soap:operation soapAction="http://tempuri.org/IMVS/queryObjectOut" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation></wsdl:binding><wsdl:service name="MVS"><wsdl:port name="BasicHttpBinding_IMVS" binding="tns:BasicHttpBinding_IMVS"><soap:address location="http://server_atk/WebService/MonitorVehicleService.MVS.svc"/></wsdl:port></wsdl:service></wsdl:definitions>
[解决办法]
D2007貌似也就是1楼导入的这样。不过生成defWSDL数组肯定是不一样的。用工具导入很方便的。