이 콘텐츠는 선택한 언어로 제공되지 않습니다.

cxf-codegen-plugin



Name

cxf-codegen-plugin — generates JAX-WS compliant Java code from a WSDL document

Synopsis

<plugin>
  <groupId>org.apache.cxf</groupId>
  <artifactId>cxf-codegen-plugin</artifactId>
  <version>version</version>
  <executions>
    <execution>
      <id>generate-sources</id>
      <configuration>
        <defaultOptions>
          <option>...</option>
          ...
        </defaultOptions>
        <wsdlOptions>
          <wsdlOption>
            <wsdl>wsdlPath</wsdl>
            <option>...</option>
            ...
          </wsdlOption>
          ...
        </wsdlOptions>
      </configuration>
      <goals>
        <goal>wsdl2java</goal>
      </goals>
    </execution>
  </executions>
</plugin>
Copy to Clipboard Toggle word wrap

Description

The wsdl2java task takes a WSDL document and generates fully annotated Java code from which to implement a service. The WSDL document must have a valid portType element, but it does not need to contain a binding element or a service element. Using the optional arguments you can customize the generated code.

WSDL options

At least one wsdlOptions element is required to configure the plug-in. The wsdlOptions element's wsdl child is required and specifies a WSDL document to be processed by the plug-in. In addition to the wsdl element, the wsdlOptions element can take a number of children that can customize how the WSDL document is processed.
Tip
More than one wsdlOptions element can be listed in the plug-in configuration. Each element configures a single WSDL document for processing.

Default options

The defaultOptions element is an optional element. It can be used to set options that are used across all of the specified WSDL documents.
Important
If an option is duplicated in the wsdlOptions element, the value in the wsdlOptions element takes precedent.

Options

The options used to manage the code generation process are reviewed in the following table.
Expand
OptionInterpretation
-?Displays the online help for this utility.
-help
-h
-fe frontendSpecifies the front end used by the code generator. The default is jaxws.[a]
-db databindingSpecifies the data binding used by the code generator. The default is jaxb.[b]
-wv wsdlVersionSpecifies the WSDL version expected by the tool. The default is 1.1.[c]
-p [wsdlNamespace=]PackageNameSpecifies zero, or more, package names to use for the generated code. Optionally specifies the WSDL namespace to package name mapping.
-b bindingNameSpecifies zero, or more, JAXWS or JAXB binding files. Use spaces to separate multiple entries.
-sn serviceNameSpecifies the name of the WSDL service for which code is to be generated. The default is to generate code for every service in the WSDL document.
-d output-directorySpecifies the directory into which the generated code files are written.
-catalog catalogUrlSpecifies the URL of an XML catalog to use for resolving imported schemas and WSDL documents.
-compileCompiles generated Java files.
-classdir complile-class-dirSpecifies the directory into which the compiled class files are written.
-clientGenerates starting point code for a client mainline.
-serverGenerates starting point code for a server mainline.
-implGenerates starting point code for an implementation object.
-allGenerates all starting point code: types, service proxy, service interface, server mainline, client mainline, implementation object, and an Ant build.xml file.
-antGenerates the Ant build.xml file.
-keepInstructs the tool to not overwrite any existing files.
-defaultValues[=DefaultValueProvider]Instructs the tool to generate default values for the generated client and the generated implementation. Optionally, you can also supply the name of the class used to generate the default values. By default, the RandomValueProvider class is used.
-nexclude schema-namespace[=java-packagename]Ignore the specified WSDL schema namespace when generating code. This option may be specified multiple times. Also, optionally specifies the Java package name used by types described in the excluded namespace(s).
-exsh (true/false)Enables or disables processing of extended soap header message binding. Default is false.
-dns (true/false)Enables or disables the loading of the default namespace package name mapping. Default is true.
-dex (true/false)Enables or disables the loading of the default excludes namespace mapping. Default is true.
-wsdlLocation wsdlLocationSpecifies the value of the @WebService annotation's wsdlLocation property.
-xjcargsSpecifies a comma separated list of arguments to be passed to directly to the XJC when the JAXB data binding is being used. To get a list of all possible XJC arguments use the -xjc-X.
-noAddressBindingInstructs the tool to use the Apache CXF proprietary WS-Addressing type instead of the JAX-WS 2.1 compliant mapping.
-validateInstructs the tool to validate the WSDL document before attempting to generate any code.
-vDisplays the version number for the tool.
-verboseDisplays comments during the code generation process.
-quietSuppresses comments during the code generation process.
wsdlfileThe path and name of the WSDL file to use in generating the code.
[a] Currently, Apache CXF only provides the JAX-WS front end for the code generator.
[b] Currently, Apache CXF only provides the JAXB data binding for the code generator.
[c] Currently, Apache CXF only provides WSDL 1.1 support for the code generator.
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat