Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How parsing wsdl file?

843833Jun 17 2005 — edited Jun 18 2005
I would create a wsdl parser. I use the wsdl4j library and for now I have only write this few line of code:

import javax.wsdl.Definition;
import javax.wsdl.WSDLException;
import javax.wsdl.factory.WSDLFactory;
import javax.wsdl.xml.WSDLReader;

public class WSDLParser {

static String wsdlURI = "http://www.xmethods.net/sd/2001/DemoTemperatureService.wsdl";

public static void main(String[] Args) throws WSDLException{

WSDLFactory wsdlFactory = WSDLFactory.newInstance();
WSDLReader wsdlReader = wsdlFactory.newWSDLReader();
try{
Definition definition = wsdlReader.readWSDL(wsdlURI);
}
catch(WSDLException e){System.out.println(e.getMessage());}
}
}

When I run this code( I use eclipse as editor) to see if there is any error the response is this:
Retrieving document at 'http://www.xmethods.net/sd/2001/DemoTemperatureService.wsdl'.
WSDLException: faultCode=OTHER_ERROR: Unable to resolve imported document at 'http://www.xmethods.net/sd/2001/DemoTemperatureService.wsdl'.: Javax/xml/namespace/QName

How I can resolve this error? Anyone can help me?
Excuse me for my bad english but I'm an italian boy!
Hi!!!!!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 16 2005
Added on Jun 17 2005
2 comments
459 views