use of com.sun.tools.ws.wsdl.parser.WSDLParser in project metro-jax-ws by eclipse-ee4j.
the class WSDLParserTest method testParseNull.
public void testParseNull() throws Exception {
try {
final WSDLParser instance = new WSDLParser(null, null, null);
instance.parse();
fail("Expected NullPointerException");
} catch (NullPointerException e) {
// expected
}
}
use of com.sun.tools.ws.wsdl.parser.WSDLParser in project metro-jax-ws by eclipse-ee4j.
the class WSDLParserTest method testParsePolicy15.
public void testParsePolicy15() throws Exception {
final ErrorReceiverFilter errorReceiver = createErrorReceiver();
final InputSource source = getResourceSource("policy15.wsdl");
final WsimportOptions options = new WsimportOptions();
options.addWSDL(source);
final WSDLParser instance = new WSDLParser(options, errorReceiver, null);
final WSDLDocument wsdl = instance.parse();
assertNotNull(wsdl);
assertFalse(errorReceiver.hadError());
}
use of com.sun.tools.ws.wsdl.parser.WSDLParser in project metro-jax-ws by eclipse-ee4j.
the class WSDLParserTest method testParseEmpty.
public void testParseEmpty() throws Exception {
final ErrorReceiverFilter errorReceiver = new ErrorReceiverFilter();
final InputSource source = getResourceSource("empty.wsdl");
final WsimportOptions options = new WsimportOptions();
options.addWSDL(source);
final WSDLParser instance = new WSDLParser(options, errorReceiver, null);
final WSDLDocument wsdl = instance.parse();
assertNull(wsdl);
assertTrue(errorReceiver.hadError());
}
use of com.sun.tools.ws.wsdl.parser.WSDLParser in project metro-jax-ws by eclipse-ee4j.
the class WSDLParserTest method testParsePolicy12.
public void testParsePolicy12() throws Exception {
final ErrorReceiverFilter errorReceiver = createErrorReceiver();
final InputSource source = getResourceSource("policy12.wsdl");
final WsimportOptions options = new WsimportOptions();
options.addWSDL(source);
final WSDLParser instance = new WSDLParser(options, errorReceiver, null);
final WSDLDocument wsdl = instance.parse();
assertNotNull(wsdl);
assertFalse(errorReceiver.hadError());
}
use of com.sun.tools.ws.wsdl.parser.WSDLParser in project metro-jax-ws by eclipse-ee4j.
the class WSDLParserTest method testParseSimpleSystemIdNull.
public void testParseSimpleSystemIdNull() throws Exception {
final ErrorReceiverFilter errorReceiver = new ErrorReceiverFilter();
final InputSource source = getResourceSource("simple.wsdl");
source.setSystemId(null);
final WsimportOptions options = new WsimportOptions();
options.addWSDL(source);
try {
final WSDLParser instance = new WSDLParser(options, errorReceiver, null);
final WSDLDocument wsdl = instance.parse();
fail("Expected IllegalArgumentException, instead got " + wsdl);
} catch (IllegalArgumentException e) {
// expected
}
}
Aggregations