Reading WSDL content
Fabrício <[email protected]> Mon, 19 Dec 2005 21:00:34 -0200
| Newsgroups | gmane.comp.apache.webservices.wsif.user |
|---|---|
| Message-ID | <[email protected]> |
Hello all,
I need to get type section from a wsdl and put it in an XML Element. In
order to do this Im 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