Your WSDL doesn't have a <wsdl:documentation> element, therefore it's expected that you would get a NULL response.

>From the Types class you can get the list of schemas (getSchemas() method). Then you need to use a schema API to parse the schema.

Anne

On 10/1/05, Fabrício <[EMAIL PROTECTED]> wrote:

Hello all,

 

I have to parse my wsdl files and identify the types, specially the Complex types. An example of my wsdl file is:

 

<wsdl:types>

  <schema targetNamespace="urn:WSPessoa" xmlns="http://www.w3.org/2001/XMLSchema">

   <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>

   <complexType name="Pessoa">

    <sequence>

     <element name="idade" type="xsd:int"/>

     <element name="nome" nillable="true" type="soapenc:string"/>

    </sequence>

   </complexType>

   <complexType name="ArrayOfPessoa">

    <complexContent>

     <restriction base="soapenc:Array">

      <attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:Pessoa[]"/>

     </restriction>

    </complexContent>

   </complexType>

  </schema>

 </wsdl:types>

 

And I'm trying to get it using WSDL4J API as:

 

WSDLFactory wsdlFactory = WSDLFactory.newInstance();

WSDLReader wsdlReader = wsdlFactory.newWSDLReader();

Definition definition = wsdlReader.readWSDL(wsdlURI);

                 

Types myWsdlTypes = definition.getTypes();

Element element = myWsdlTypes.getDocumentationElement();

 

But I'm always receiving NULL in my element. Could you tell me why this is happening?

 

Thanks a lot,

 

Fabrício.


Reply via email to