2

Config.groovy:

cxf {
client {
    someService {
        wsdlArgs = '-exsh true'
        wsdl = 'C:\\SomeService.wsdl'
        clientInterface =  de.whatEver.service_v5.OrderPortType
        serviceEndpointAddress = 'http://localhost:9080/'
    }
  }
}

to create the nesessary classes I do a grails wsdl2java on the commandline.

Without the wsdlArgs in Config.groovy all worked fine, but with the option an error is raised:

 [java] Unexpected option: -exsh(true)
 [java] Usage : wsdl2java -fe|-frontend <front-end-name> -db|-databinding <data-binding-name> -wv <wsdl-version> -p <[wsdl-namespace =]package-name>* -sn <service-name> -b <binding-file-name>* -reserveClass <class-name>* -catalog <catalog-file-name> -d <output-directory> -compile -classdir <compile-classes-directory> -impl -server -client -all -autoNameResolution -allowElementReferences|-aer<=true> -defaultValues<=class-name-for-DefaultValueProvider> -ant -nexclude <schema-namespace [= java-package-name]>* -exsh <(true, false)> -noTypes -dns <Default value is true> -dex <(true, false)> -validate<[=all|basic|none]> -keep -wsdlLocation <wsdlLocation> -xjc<xjc-arguments>* -asyncMethods<[=method1,method2,...]>* -bareMethods<[=method1,method2,...]>* -mimeMethods<[=method1,method2,...]>* -noAddressBinding -faultSerialVersionUID <fault-serialVersionUID> -encoding <encoding> -exceptionSuper <exceptionSuper> -mark-generated -h|-?|-help -version|-v -verbose|-V -quiet|-q|-Q -wsdlList <wsdlurl>
 [java] WSDLToJava Error: org.apache.cxf.tools.common.toolspec.parser.BadUsageException: Unexpected option: -exsh(true)
 [java] org.apache.cxf.tools.common.ToolException: org.apache.cxf.tools.common.toolspec.parser.BadUsageException: Unexpected option: -exsh(true)

even if the Usage tells me: -exsh <(true, false)> is a valid option.

How can I set this option to be reconized by the cxf-client plugin?

I'va already tried several permutations of this option like -exsh=true or -exsh(true) with no success.

4

1 回答 1

3

The params have to be passed in a list.

wsdlArgs = ['-exsh', 'true']
于 2015-02-23T11:14:53.603 回答