views:

181

answers:

1

I include the below xsd file:

<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns="http://www.xxxx.com/schemas/2005/06/messages" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://www.xxxx.com/schemas/2005/06/messages" xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;
  <xs:include schemaLocation="xxxxCommonTypes.xsd" />
  <xs:element name="HotelDetailRQ">
    <xs:annotation>
      <xs:documentation>Request data to obtain detailed information for the specified hotel product.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:complexContent mixed="false">
        <xs:extension base="CoreRequest">
          <xs:sequence>
            <xs:element name="HotelCode">
              <xs:annotation>
                <xs:documentation>Hotel code to obtain detailed inormation.</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:minLength value="1" />
                  <xs:maxLength value="10" />
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
</xs:schema>

to a wsdl file via;

<wsdl:definitions xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:tns1="http://axis.frontend.hydra.xxxx.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:impl="http://www.xxxx.com/wsdl/2005/06" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:intf="http://www.xxxx.com/wsdl/2005/06" targetNamespace="http://www.xxxx.com/wsdl/2005/06" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"&gt;
          <wsdl:types>    
        <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://axis.frontend.hydra.xxxx.com"&gt;
                  <xsd:import schemaLocation="C:\Users\xxxx\HotelDetailRQ.xsd" namespace="http://www.xxxx.com/schemas/2005/06/messages" />
            </xsd:schema>
        </wsdl:types>
    .
    .
    .
</wsdl:definitions>

The problem is when I add the wsdl file to visual studio as a web reference, it does not generate the HotelDetailRQ proxy class in reference.cs file. So I am unable to use a generated HotelDetailRQ class.

I am not experienced in using xsd files or wsdl files. Can you point me to where I might be making mistake here?

A: 

Your schema file includes another schema file:

<xs:include schemaLocation="xxxxCommonTypes.xsd" />

Did you update the path to that file?

Any error messages would also be helpful.

Eric Eijkelenboom
Yes the include is correctly referenced. there are no error messages. The objects of that other CommonTypes.xsd are correctly generated in reference.cs but the classes for this HotelDetailRQ.xsd (and many others) are not..
kaivalya
Is the HotelDetailRQ object completely missing from the generated file, or is it some way generated incorrectly?Maybe you could try to generate the proxy using svcutil.exe (on the command line). Call: svcutil.exe <wsdl file name>. This might show a more detailed error message...
Eric Eijkelenboom