I
imonline
Hi,
I have created a WSDL file and now I am trying to create
server class from it using WSDL.exe. My WSDL is as follows:
<?xml version="1.0" encoding="utf-8" ?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns
ta="http://www.opentravel.org/OTA/2003/05"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.opentravel.org/OTA/2003/05"
name="HotelReservationService">
<!-- Define data types (import OTA schemas) -->
<wsdl:types>
<xs:schema targetNamespace
="http://www.opentravel.org/OTA/2003/05">
<xs:include schemaLocation="OTA_HotelResRQ.xsd"/>
</xs:schema>
<xs:schema targetNamespace
="http://www.opentravel.org/OTA/2003/05">
<xs:include schemaLocation="OTA_HotelResRS.xsd" />
</xs:schema>
</wsdl:types>
<!-- Define request and response messages-->
<wsdl:message name="HotelReservationRequest">
<wsdl
art name="parameters" element="ota:OTA_HotelResRQ"/>
</wsdl:message>
<wsdl:message name="HotelReservationResponse">
<wsdl
art name="parameters" element="ota:OTA_HotelResRS"/>
</wsdl:message>
<!-- Define operation and reference messages-->
<wsdl
ortType name="HotelReservationPortType">
<wsdl
peration name="OTA_HotelResRQ">
<wsdl:input message="ota:HotelReservationRequest"/>
<wsdl
utput message="ota:HotelReservationResponse"/>
</wsdl
peration>
</wsdl
ortType>
<wsdl:binding name="HotelReservationBinding"
type="ota:HotelReservationPortType">
<!-- Use document style and not rpc-->
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl
peration name="OTA_HotelResRQ">
<!-- Use 'literal' to include OTA XML as-is-->
<soap
peration soapAction="CreateReservation" style="document"/>
<wsdl:input>
<soap:body use="literal"
namespace="http://www.opentravel.org/OTA/2003/05"/>
</wsdl:input>
<wsdl
utput>
<soap:body use="literal"
namespace="http://www.opentravel.org/OTA/2003/05"/>
</wsdl
utput>
</wsdl
peration>
</wsdl:binding>m
<!-- Define SOAP interface with previously declared binding-->
<wsdl:service name="OTAHotelReservationService">
<wsdl
ort name="HotelReservationPort"
binding="ota:HotelReservationBinding">
<!-- Replace "http://mydomain/myservicename" with actual service
endpoint-->
<soap:address
location="http://localhost/Ota_Webservice/Service.asmx"/>
</wsdl
ort>
</wsdl:service>
</wsdl:definitions>
And I am getting the following error for it:
Error: Unable to import binding 'HotelReservationBinding' from
namespace 'http:
/www.opentravel.org/OTA/2003/05'.
- Unable to import operation 'OTA_HotelResRQ'.
- The datatype
'http://www.opentravel.org/OTA/2003/05:HotelResRequestType' is
missing.
What am I doing wrong? Any help is highly
appreciated.
Thanks,
Nis
I have created a WSDL file and now I am trying to create
server class from it using WSDL.exe. My WSDL is as follows:
<?xml version="1.0" encoding="utf-8" ?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.opentravel.org/OTA/2003/05"
name="HotelReservationService">
<!-- Define data types (import OTA schemas) -->
<wsdl:types>
<xs:schema targetNamespace
="http://www.opentravel.org/OTA/2003/05">
<xs:include schemaLocation="OTA_HotelResRQ.xsd"/>
</xs:schema>
<xs:schema targetNamespace
="http://www.opentravel.org/OTA/2003/05">
<xs:include schemaLocation="OTA_HotelResRS.xsd" />
</xs:schema>
</wsdl:types>
<!-- Define request and response messages-->
<wsdl:message name="HotelReservationRequest">
<wsdl
</wsdl:message>
<wsdl:message name="HotelReservationResponse">
<wsdl
</wsdl:message>
<!-- Define operation and reference messages-->
<wsdl
<wsdl
<wsdl:input message="ota:HotelReservationRequest"/>
<wsdl
</wsdl
</wsdl
<wsdl:binding name="HotelReservationBinding"
type="ota:HotelReservationPortType">
<!-- Use document style and not rpc-->
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl
<!-- Use 'literal' to include OTA XML as-is-->
<soap
<wsdl:input>
<soap:body use="literal"
namespace="http://www.opentravel.org/OTA/2003/05"/>
</wsdl:input>
<wsdl
<soap:body use="literal"
namespace="http://www.opentravel.org/OTA/2003/05"/>
</wsdl
</wsdl
</wsdl:binding>m
<!-- Define SOAP interface with previously declared binding-->
<wsdl:service name="OTAHotelReservationService">
<wsdl
binding="ota:HotelReservationBinding">
<!-- Replace "http://mydomain/myservicename" with actual service
endpoint-->
<soap:address
location="http://localhost/Ota_Webservice/Service.asmx"/>
</wsdl
</wsdl:service>
</wsdl:definitions>
And I am getting the following error for it:
Error: Unable to import binding 'HotelReservationBinding' from
namespace 'http:
/www.opentravel.org/OTA/2003/05'.
- Unable to import operation 'OTA_HotelResRQ'.
- The datatype
'http://www.opentravel.org/OTA/2003/05:HotelResRequestType' is
missing.
What am I doing wrong? Any help is highly
appreciated.
Thanks,
Nis