0

I have the following WSDL

The message part elements aren't valid.The elements "request:OTA_VehAvailRateRQ" and "response:OTA_VehAvailRateRS" are not defined in the namespaces but all imports and targetNamespaces do not seem have problems.

I isn't able to see the problem :(

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <wsdl:definitions
        name="OTA_VehAvailRate"
        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
        xmlns:xs="http://www.w3.org/2001/XMLSchema"

        targetNamespace="http://www.karve.org/OTA_VehAvailRate/"
        xmlns:tns="http://www.karve.org/OTA_VehAvailRate/" 
        xmlns:request="http://www.karve.org/OTA_VehAvailRateRequest/"
        xmlns:response="http://www.karve.org/OTA_VehAvailRateResponse/">

    <wsdl:types>  
      <xs:schema targetNamespace="http://www.karve.org/OTA_VehAvailRate/">    
        <xs:import namespace="http://www.opentravel.org/OTA/2003/05" schemaLocation="OTA_VehAvailRateRQ.xsd" />            
        <xs:import namespace="http://www.opentravel.org/OTA/2003/05" schemaLocation="OTA_VehAvailRateRS.xsd" />    
      </xs:schema>  
    </wsdl:types>

    <!--  These messages fails in the wsdl:part element -->
    <wsdl:message name="OTA_VehAvailRateRequest"> 
      <wsdl:part element="request:OTA_VehAvailRateRQ" name="parameters"/>
    </wsdl:message>
    <wsdl:message name="OTA_VehAvailRateResponse">
      <wsdl:part element="response:OTA_VehAvailRateRS" name="parameters"/>
    </wsdl:message>
    ........ Rest of WSDL ......

This one of my XSD (request)

    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema 
        xmlns:xs="http://www.w3.org/2001/XMLSchema" 
        xmlns="http://www.opentravel.org/OTA/2003/05"         
        targetNamespace="http://www.opentravel.org/OTA/2003/05" 
        elementFormDefault="qualified" version="2.000" id="OTA2010A">

      <xs:element name="OTA_VehAvailRateRQ">
        <xs:complexType>
        .........
        </xs:complexType>
      </xs:element>
    </xs:schema>
josepmra
  • 617
  • 9
  • 25

1 Answers1

0

Imports and targetNamespaces do seem to have problems.

You define the following namespace in WSDL:

xmlns:request="http://www.karve.org/OTA_VehAvailRateRequest/"

But in the XSD and the import you have the following namespace:

<xs:import namespace="http://www.opentravel.org/OTA/2003/05"
           schemaLocation="OTA_VehAvailRateRQ.xsd" />

So the namespace of the request:OTA_VehAvailRateRQ does not mache the namespace of the element OTA_VehAvailRateRQ in your schema.

lexicore
  • 42,748
  • 17
  • 132
  • 221