Re: Reading WSDL content

Aleksander Slominski <[email protected]> Mon, 19 Dec 2005 23:11:06 -0500
Newsgroups gmane.comp.apache.webservices.wsif.user
Message-ID <[email protected]>
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