Forum Discussion

behnampmdg3's avatar
14 years ago

How can I create WSDL file?

Hello forum;

I am new to this and I have problems with WSDL file! This is the xml file I generate. When I try to load the wsdl file I get this error:
WSDLException (at /env:Envelope): faultCode=INVALID_WSDL: Expected element '{http://schemas.xmlsoap.org/wsdl/}definitions'.

I would apreciate if anyone helps.

Thanks


<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Body>
<OTA_HotelAvailRS xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.0" TimeStamp="2012-07-30T08:25:07+10:00" EchoToken="abc123">
<Success/>
<RoomStays>
<RoomStay>
<RoomTypes>
<RoomType RoomTypeCode="187179">
<HoteCode id="1961">
</HoteCode>
<RoomDescription Name="test hotel special room">
<Text>This is test properties test hotel. Not available for bookings.</Text>
</RoomDescription>
</RoomType>
</RoomTypes>
<RatePlans>
<RatePlan RatePlanCode="9232">
<RatePlanDescription Name="Room Only"/>
<Text>Room Only Rate</Text>
</RatePlan>
</RatePlans>
</RoomStay>
<RoomStay>
<RoomTypes>
<RoomType RoomTypeCode="187179">
<HoteCode id="1961">
</HoteCode>
<RoomDescription Name="test hotel special room">
<Text>This is test properties test hotel. Not available for bookings.</Text>
</RoomDescription>
</RoomType>
</RoomTypes>
<RatePlans>
<RatePlan RatePlanCode="9243">
<RatePlanDescription Name="3 special nights"/>
<Text>Enjoy amazing 3 nights deal with breakfast, lunch and dinner included.</Text>
</RatePlan>
</RatePlans>
</RoomStay>
</RoomStays>
</OTA_HotelAvailRS></env:Body></env:Envelope>

2 Replies

  • nmrao's avatar
    nmrao
    Community Hero
    Hi,

    If you have wsdl file, you can validate xml by key strokes ALT+v in request editor of soapUI.

    In the error mentioned, the xml is not being validated against wsdl/schema. As it says, it is expecting definition.

    Are you using soap 1.1? or 1.2? Because, namespaces varies. You may check this in properties when service is selected.

    Hope this helps.
    Regards,
    Rao.