Hello all,
    I am new to WSDL. Can someone tell me the difference between attributes
'type' and 'ref' of <xsd:element>. Below is a snippet from my wsdl file :

        <xsd:element name="Employee">
                <xsd:complexType>
                <xsd:sequence>
                <xsd:element name="name" type="xsd:string"/>
                <xsd:element name="id" type="xsd:int"/>
                <xsd:element name="join_date" type="xsd:string"/>
                </xsd:sequence>
                </xsd:complexType>
        </xsd:element>
        <xsd:element name="EmployeeArray">
                <xsd:complexType>
                <xsd:sequence>
                <xsd:element type="Employee" minOccurs="1"
maxOccurs="unbounded"/>
                </xsd:sequence>
                </xsd:complexType>
        </xsd:element>.

This gives error : java.io.IOException: Type
{http://schemas.xmlsoap.org/wsdl/}Employee is referenced but not defined.
But when I replace type="Employee" by ref="tns:Employee", the error goes
off.

The attribute 'type' can refer to only primitive data types? But the
documentation on XML schema says otherwise.

Thanks & Regards,
Kakoli

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Reply via email to