How parsing wsdl file?
843833Jun 17 2005 — edited Jun 18 2005I 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!!!!!