RES: Reading WSDL content

Fabrício <[email protected]> Tue, 20 Dec 2005 18:24:14 -0200
Newsgroups gmane.comp.apache.webservices.wsif.user
Message-ID <[email protected]>
I'm using exactly the same wsld4j.jar and the same code. The error remains
in windows and in linux the schema types is gotten without problems! I
really don't understand it.

Thanks in advance,

Fabricio

-----Mensagem original-----
De: Aleksander Slominski [mailto:[email protected]] 
Enviada em: terça-feira, 20 de dezembro de 2005 02:11
Para: [email protected]
Assunto: Re: Reading WSDL content

hi,

i am not sure what is going on but if there is difference between 
windows and linux then i would definitely make sure that CLASSPATH is 
identical in both cases - is it?

best,

alek

Fabrício wrote:

> Hello all,
>
> I need to get type section from a wsdl and put it in an XML Element. 
> In order to do this I’m using WSDL4J and the code to do this is:
>
> WSDLFactory wsdlFactory = WSDLFactory.newInstance();
>
> WSDLReader wsdlReader = wsdlFactory.newWSDLReader();
>
> Definition definition = wsdlReader.readWSDL(wsdlURI);
>
> Types types = definition.getTypes();
>
> Element element = types.getDocumentationElement();
>
> The problem is that the types object contains this:
>
> Types:
>
> UnknownExtensibilityElement ({http://www.w3.org/2001/XMLSchema}schema):
>
> required=null
>
> element=[schema: null]
>
> As you can see the schema in element type is “null”. And what is most 
> weird is that happens only in windows. Running the same code above in 
> linux, I can get schema types perfectly.
>
> <wsdl:types>
>
> <schema targetNamespace="urn:PessoaArr" 
> 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="impl:Pessoa[]"/>
>
> </restriction>
>
> </complexContent>
>
> </complexType>
>
> </schema>
>
> </wsdl:types>
>
> I knew that with WSIF I could get schema types from a WSDL without 
> this problem. Does anyone could help me explaining how can I do this? 
> If you have a code sample it would be easier for me understand.
>
> Thanks a lot!!!
>
> Fabricio
>


-- 
The best way to predict the future is to invent it - Alan Kay