Есть вебсервис написанный на Java. Мне необходимо написать клиента на delphi 7. У вебсервиса есть wsdl и xsd файлы. В Delphi использую WSDL Importer для создания модуля.(так пишут в различных книжках и статьях). Пытаюсь скомпилировать - выдается ошибка undeclared identifier:hellomethod! Скорее всего wsdl-файл не подцепляет xsd-файл. Как быть? Может у кого-нибудь была такая проблема.
wsdl-файл (HelloService.wsdl):
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <definitions targetNamespace="
http://example.com" name="HelloService" xmlns:tns="
http://example.com" xmlns:xsd="
http://www.w3.org/2001/XMLSchema" xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/" xmlns="
http://schemas.xmlsoap.org/wsdl/">
- <types>
- <xsd:schema>
<xsd:import namespace="
http://example.com" schemaLocation="HelloService_schema1.xsd" />
</xsd:schema>
</types>
- <message name="hellomethod">
<part name="parameters" element="tns:hellomethod" />
</message>
- <message name="hellomethodResponse">
<part name="parameters" element="tns:hellomethodResponse" />
</message>
- <message name="hellomethodparam">
<part name="parameters" element="tns:hellomethodparam" />
</message>
- <message name="hellomethodparamResponse">
<part name="parameters" element="tns:hellomethodparamResponse" />
</message>
- <portType name="HelloService">
- <operation name="hellomethod">
<input message="tns:hellomethod" />
<output message="tns:hellomethodResponse" />
</operation>
- <operation name="hellomethodparam">
<input message="tns:hellomethodparam" />
<output message="tns:hellomethodparamResponse" />
</operation>
</portType>
- <binding name="HelloServicePortBinding" type="tns:HelloService">
<soap:binding transport="
http://schemas.xmlsoap.org/soap/http" style="document" />
- <operation name="hellomethod">
<soap:operation soapAction="" />
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
- <operation name="hellomethodparam">
<soap:operation soapAction="" />
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
</binding>
- <service name="HelloService">
- <port name="HelloServicePort" binding="tns:HelloServicePortBinding">
<soap:address location="REPLACE_WITH_ACTUAL_URL" />
</port>
</service>
</definitions>
xsd-файл (HelloService_schema1.xsd)
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <xs:schema version="1.0" targetNamespace="
http://example.com" xmlns:tns="
http://example.com" xmlns:xs="
http://www.w3.org/2001/XMLSchema">
<xs:element name="hellomethod" type="tns:hellomethod" />
<xs:element name="hellomethodResponse" type="tns:hellomethodResponse" />
<xs:element name="hellomethodparam" type="tns:hellomethodparam" />
<xs:element name="hellomethodparamResponse" type="tns:hellomethodparamResponse" />
- <xs:complexType name="hellomethodparam">
- <xs:sequence>
<xs:element name="arg0" type="xs:double" minOccurs="0" />
</xs:sequence>
</xs:complexType>
- <xs:complexType name="hellomethodparamResponse">
- <xs:sequence>
<xs:element name="return" type="xs:double" minOccurs="0" />
</xs:sequence>
</xs:complexType>
- <xs:complexType name="hellomethod">
<xs:sequence />
</xs:complexType>
- <xs:complexType name="hellomethodResponse">
- <xs:sequence>
<xs:element name="return" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:schema>