Eran,
Even if you have an input stream, you still need a URI for the WSDL document since the document might contain relative URIs. You need to know the base URI of the document in order to interpret relative URIs.
Arthur Ryman,
IBM Software Group, Rational Division
blog: http://ryman.eclipsedevelopersjournal.com/
phone: +1-905-413-3077, TL 969-3077
assistant: +1-905-413-2411, TL 969-2411
fax: +1-905-413-4920, TL 969-4920
mobile: +1-416-939-5063, text: [EMAIL PROTECTED]
Eran Chinthaka <[EMAIL PROTECTED]>
06/22/2006 02:02 AM
|
|
Hi,
I prefer if we can support following scenario from Woden.
I want to build the model only parsing an input stream. I don't have any
URI to the wsdl and I only have an input stream.
(If you know Axis2 this is what I'm trying to do. 'm getting a WSDL 2.0
from a service archive deployed. And I'm only getting a ZipInputStream
so baseURI has no meaning in that.)
As instructed by John during the last telecon, I used the DOMWSDLSource
as following.
DocumentBuilder documentBuilder =
DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document document = documentBuilder.parse(in);
WSDLReader reader = DOMWSDLFactory.newInstance().newWSDLReader();
WSDLSource wsdlSource = reader.createWSDLSource();
wsdlSource.setSource(document.getDocumentElement());
descriptionElement = reader.readWSDL(wsdlSource);
Doing this threw me an NPE as I have not set a baseURI to the wsdl
source and its required by DOMWSDLReader.java:174.
Then I searched the usage of this uri and I found that it was used just
as a key in a map to store the wsdl description. If we can have some
other mechanism for this then I can avoid parsing the baseURI.
thoughts/comments
-- Chinthaka
signature.asc
Description: Binary data
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]