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>

Reply via email to