You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Dennis Sosnoski <dm...@sosnoski.com> on 2015/06/16 23:22:24 UTC
DynamicClientFactory compiler options
How can you set compiler options when using
DynamicClientFactory/JaxWsDynamicClientFactory? I've been trying to do
this, but get an exception thrown on any combination of options I've tried:
Caused by: com.sun.tools.internal.xjc.BadCommandLineException: grammar
is not specified
at com.sun.tools.internal.xjc.Options.parseArguments(Options.java:820)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at
org.apache.cxf.common.util.ReflectionInvokationHandler.invoke(ReflectionInvokationHandler.java:90)
with:
JaxWsDynamicClientFactory factory =
JaxWsDynamicClientFactory.newInstance();
factory.setSchemaCompilerOptions(new String[] { "-httpproxy",
"sosnoski.com:8899"} );
Client client = factory.createClient(url);
or
Caused by: com.sun.tools.internal.xjc.BadCommandLineException:
unrecognized parameter -httpproxy sosnoski.com:8899
with:
factory.setSchemaCompilerOptions(new String[] { "-httpproxy
sosnoski.com:8899"} );
If I don't use a leading hyphen on the option
(factory.setSchemaCompilerOptions(new String[] { "httpproxy",
"sosnoski.com:8899"} );) there's no exception, but it appears that the
options are ignored.
Thanks,
- Dennis
--
Dennis M. Sosnoski
Java Web Services Consulting <http://www.sosnoski.com/consult.html>
CXF and Web Services Security Training
<http://www.sosnoski.com/training.html>
Web Services Jump-Start <http://www.sosnoski.com/jumpstart.html>