instance = new CXFAuthenticator(); Authenticator wrapped = null; if (JavaUtils.isJava9Compatible()) { try { Method m = ReflectionUtil.getMethod(Authenticator.class, "getDefault"); .getResourceAsStream("ReferencingAuthenticator.class"); byte[] b = IOUtils.readBytesFromStream(ins); if (JavaUtils.isJava9Compatible()) { Class<?> methodHandles = Class.forName("java.lang.invoke.MethodHandles"); Method m = ReflectionUtil.getMethod(methodHandles, "lookup");
@Before public void setUp() throws Exception { if (JavaUtils.isJava9Compatible()) { System.setProperty("org.apache.cxf.common.util.Compiler-fork", "true"); } }
@Before public void setUp() throws Exception { if (JavaUtils.isJava9Compatible()) { System.setProperty("org.apache.cxf.common.util.Compiler-fork", "true"); } }
protected boolean compileJavaSrc(String classPath, List<File> srcList, String dest) { if (JavaUtils.isJava9Compatible()) { System.setProperty("org.apache.cxf.common.util.Compiler-fork", "true"); } org.apache.cxf.common.util.Compiler javaCompiler = new org.apache.cxf.common.util.Compiler(); javaCompiler.setClassPath(classPath); javaCompiler.setOutputDir(dest); if (JavaUtils.isJava9Compatible()) { javaCompiler.setTarget("9"); } else { javaCompiler.setTarget("1.8"); } return javaCompiler.compileFiles(srcList); }
protected boolean compileJavaSrc(String classPath, List<File> srcList, String dest) { if (JavaUtils.isJava9Compatible()) { System.setProperty("org.apache.cxf.common.util.Compiler-fork", "true"); } org.apache.cxf.common.util.Compiler javaCompiler = new org.apache.cxf.common.util.Compiler(); javaCompiler.setClassPath(classPath); javaCompiler.setOutputDir(dest); if (JavaUtils.isJava9Compatible()) { javaCompiler.setTarget("9"); } else { javaCompiler.setTarget("1.8"); } return javaCompiler.compileFiles(srcList); }
@Before public void setUp() throws Exception { if (JavaUtils.isJava9Compatible()) { System.setProperty("org.apache.cxf.common.util.Compiler-fork", "true"); } }
public void execute() throws MojoExecutionException { boolean requiresModules = JavaUtils.isJava9Compatible(); if (requiresModules) {
instance = new CXFAuthenticator(); Authenticator wrapped = null; if (JavaUtils.isJava9Compatible()) { try { Method m = ReflectionUtil.getMethod(Authenticator.class, "getDefault"); .getResourceAsStream("ReferencingAuthenticator.class"); byte[] b = IOUtils.readBytesFromStream(ins); if (JavaUtils.isJava9Compatible()) { Class<?> methodHandles = Class.forName("java.lang.invoke.MethodHandles"); Method m = ReflectionUtil.getMethod(methodHandles, "lookup");
public void execute() throws MojoExecutionException { boolean requiresModules = JavaUtils.isJava9Compatible(); if (requiresModules) {
@Test public void testCxf5061() throws Exception { if (JavaUtils.isJava9Compatible()) { System.setProperty("org.apache.cxf.common.util.Compiler-fork", "true"); } //using dcf to generate client from the wsdl which ensure the wsdl is valid JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance(); dcf.createClient(ADDRESS + "?wsdl"); }
@Test public void testDynamicClient() throws Exception { if (JavaUtils.isJava9Compatible()) { System.setProperty("org.apache.cxf.common.util.Compiler-fork", "true"); } DynamicClientFactory dcf = DynamicClientFactory.newInstance(); Client client = dcf.createClient("http://localhost:" + PORT + "/jaxwsAndAegisSports?wsdl&dynamic"); Object r = client.invoke("getAttributeBean")[0]; Method getAddrPlainString = r.getClass().getMethod("getAttrPlainString"); String s = (String)getAddrPlainString.invoke(r); assertEquals("attrPlain", s); } }
public void execute() throws MojoExecutionException { if (JavaUtils.isJava9Compatible()) { fork = "true"; additionalJvmArgs = "--add-exports=jdk.xml.dom/org.w3c.dom.html=ALL-UNNAMED "
@Test public void testDynamicClientExceptions() throws Exception { if (JavaUtils.isJava9Compatible()) { System.setProperty("org.apache.cxf.common.util.Compiler-fork", "true"); } JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance(); URL wsdlURL = new URL(ServerMisc.DOCLIT_CODEFIRST_URL + "?wsdl"); Client client = dcf.createClient(wsdlURL); try { client.invoke("throwException", -2); } catch (Exception ex) { Object o = ex.getClass().getMethod("getFaultInfo").invoke(ex); assertNotNull(o); } try { client.getRequestContext().put("disable-fault-mapping", true); client.invoke("throwException", -2); } catch (SoapFault ex) { //expected } }
public void execute() throws MojoExecutionException { if (JavaUtils.isJava9Compatible()) { fork = "true"; additionalJvmArgs = "--add-exports=jdk.xml.dom/org.w3c.dom.html=ALL-UNNAMED "
public void execute() throws MojoExecutionException { if (JavaUtils.isJava9Compatible()) { fork = "true"; additionalJvmArgs = "--add-exports=jdk.xml.dom/org.w3c.dom.html=ALL-UNNAMED "