├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradle.properties
├── settings.gradle.kts
├── src
├── test
│ ├── resources
│ │ ├── axis1
│ │ │ ├── wsrpservice
│ │ │ │ ├── NStoPkg.properties
│ │ │ │ ├── wsrp_service.wsdl
│ │ │ │ └── xml.xsd
│ │ │ ├── jaxrpc-sample
│ │ │ │ ├── HelloWorld.wsdl
│ │ │ │ └── Address.wsdl
│ │ │ ├── jms-sample
│ │ │ │ └── GetQuote.wsdl
│ │ │ └── addressbook
│ │ │ │ └── AddressBook.wsdl
│ │ └── axis2
│ │ │ ├── mtom
│ │ │ ├── xmime.xsd
│ │ │ └── MTOMSample.wsdl
│ │ │ ├── databinding
│ │ │ ├── StockQuote.xsd
│ │ │ └── StockQuoteService.wsdl
│ │ │ ├── quickstartadb
│ │ │ └── StockQuoteService.wsdl
│ │ │ ├── quickstartjibx
│ │ │ └── StockQuoteService.wsdl
│ │ │ ├── quickstartxmlbeans
│ │ │ └── StockQuoteService.wsdl
│ │ │ ├── faulthandling
│ │ │ └── bank.wsdl
│ │ │ └── addnumberservice
│ │ │ └── AddNumbersService.wsdl
│ └── groovy
│ │ └── com
│ │ └── intershop
│ │ └── gradle
│ │ └── wsdl
│ │ ├── WSDLPluginSpec.groovy
│ │ ├── Axis1IntegrationSpec.groovy
│ │ ├── Axis1IntegrationKtsSpec.groovy
│ │ └── Axis2IntegrationSpec.groovy
└── main
│ └── kotlin
│ └── com
│ └── intershop
│ └── gradle
│ └── wsdl
│ ├── utils
│ ├── DeployScope.kt
│ └── Databinding.kt
│ ├── tasks
│ ├── axis2
│ │ ├── WSDL2JavaParameters.kt
│ │ └── WSDL2JavaRunner.kt
│ └── AbstractWSDL2Java.kt
│ ├── extension
│ ├── data
│ │ ├── WSDLProperty.kt
│ │ └── NamespacePackageMapping.kt
│ ├── WSDLExtension.kt
│ ├── AbstractAxisConfig.kt
│ ├── Axis2.kt
│ └── Axis1.kt
│ └── WSDLPlugin.kt
├── .gitignore
├── .github
└── workflows
│ ├── build.yml
│ └── release.yml
├── gradlew.bat
├── gradlew
├── LICENSE.md
└── license-2.0.txt
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/freynder/wsdl-gradle-plugin/master/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-XX:+UseConcMarkSweepGC -XX:MaxMetaspaceSize=3G -XX:-UseGCOverheadLimit -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
2 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/settings.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | id("com.gradle.enterprise").version("3.0")
3 | }
4 |
5 | gradleEnterprise {
6 | buildScan {
7 | termsOfServiceUrl = "https://gradle.com/terms-of-service"
8 | termsOfServiceAgree = "yes"
9 | }
10 | }
11 |
12 | rootProject.name = "wsdl-gradle-plugin"
--------------------------------------------------------------------------------
/src/test/resources/axis1/wsrpservice/NStoPkg.properties:
--------------------------------------------------------------------------------
1 | urn\:oasis\:names\:tc\:wsrp\:v1\:types=oasis.names.tc.wsrp.v1.types
2 | urn\:oasis\:names\:tc\:wsrp\:v1\:intf=oasis.names.tc.wsrp.v1.intf
3 | urn\:oasis\:names\:tc\:wsrp\:v1\:bind=oasis.names.tc.wsrp.v1.bind
4 | urn\:oasis\:names\:tc\:wsrp\:v1\:wsdl=oasis.names.tc.wsrp.v1.wsdl
5 |
6 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # IntelliJ project files
2 | .idea
3 | *.iml
4 | out
5 | gen
6 |
7 | # Eclipse project files
8 | .classpath
9 | .project
10 | .settings
11 |
12 | # Gradle Files
13 | .gradle
14 | /build
15 |
16 | # Ignore Gradle GUI config
17 | gradle-app.setting
18 |
19 | # Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
20 | !gradle-wrapper.jar
21 | /bin/
22 |
--------------------------------------------------------------------------------
/src/main/kotlin/com/intershop/gradle/wsdl/utils/DeployScope.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Intershop Communications AG.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.intershop.gradle.wsdl.utils
17 |
18 | /**
19 | * Enumation for the deploy scope configuration.
20 | */
21 | enum class DeployScope(val scope: String) {
22 |
23 | APPLICATION("Application"),
24 | REQUEST("Request"),
25 | SESSION("Session")
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/kotlin/com/intershop/gradle/wsdl/utils/Databinding.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Intershop Communications AG.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.intershop.gradle.wsdl.utils
17 |
18 | /**
19 | * Enumation for the data binding configuration.
20 | */
21 | enum class Databinding(val binding: String) {
22 | ADB("adb"),
23 | XMLBEANS("xmlbeans"),
24 | JAXBRI("jaxbri"),
25 | JIBX("jibx"),
26 | NONE("none")
27 | }
28 |
--------------------------------------------------------------------------------
/src/main/kotlin/com/intershop/gradle/wsdl/tasks/axis2/WSDL2JavaParameters.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Intershop Communications AG.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.intershop.gradle.wsdl.tasks.axis2
17 |
18 | import org.gradle.api.provider.ListProperty
19 | import org.gradle.workers.WorkParameters
20 |
21 | /**
22 | * Parameters container for task worker.
23 | */
24 | interface WSDL2JavaParameters : WorkParameters {
25 |
26 | /**
27 | * List of all parameters of wsdl code
28 | * generation.
29 | */
30 | val paramList: ListProperty
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/kotlin/com/intershop/gradle/wsdl/tasks/axis2/WSDL2JavaRunner.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Intershop Communications AG.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.intershop.gradle.wsdl.tasks.axis2
17 |
18 | import org.apache.axis2.wsdl.WSDL2Code
19 | import org.gradle.workers.WorkAction
20 |
21 | /**
22 | * This is the task runner for WSDL2Java.
23 | *
24 | * @constructor standard constructor of a runner.
25 | */
26 | abstract class WSDL2JavaRunner : WorkAction {
27 |
28 | override fun execute() {
29 | WSDL2Code.main(parameters.paramList.get().toTypedArray())
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/kotlin/com/intershop/gradle/wsdl/extension/data/WSDLProperty.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Intershop Communications AG.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.intershop.gradle.wsdl.extension.data
17 |
18 | import org.gradle.api.tasks.Input
19 | import org.gradle.api.tasks.Internal
20 |
21 | /**
22 | * Container for WSDL property configuration.
23 | *
24 | * @constructor default constructor with configuration name.
25 | */
26 | open class WSDLProperty (@get:Internal val name: String) {
27 |
28 | /**
29 | * Value of the configured property.
30 | */
31 | @get:Input
32 | var value: String = ""
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/kotlin/com/intershop/gradle/wsdl/extension/data/NamespacePackageMapping.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Intershop Communications AG.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.intershop.gradle.wsdl.extension.data
17 |
18 | /**
19 | * Container for namespace package mapping configuration.
20 | *
21 | * @constructor default constructor with configuration name.
22 | */
23 | open class NamespacePackageMapping(val name: String) {
24 |
25 | /**
26 | * Name space configuration.
27 | */
28 | var namespace: String = ""
29 |
30 | /**
31 | * Package name configuration.
32 | */
33 | var packageName: String = ""
34 | }
35 |
--------------------------------------------------------------------------------
/src/test/resources/axis1/wsrpservice/wsrp_service.wsdl:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/src/test/resources/axis1/jaxrpc-sample/HelloWorld.wsdl:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
32 |
33 |
34 |
39 |
40 |
41 |
42 |
43 |
45 |
46 |
47 |
48 |
49 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/src/test/resources/axis2/mtom/xmime.xsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
21 |
22 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/src/main/kotlin/com/intershop/gradle/wsdl/extension/WSDLExtension.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Intershop Communications AG.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.intershop.gradle.wsdl.extension
17 |
18 | import org.gradle.api.NamedDomainObjectContainer
19 | import org.gradle.api.model.ObjectFactory
20 | import javax.inject.Inject
21 |
22 | /**
23 | * Main extension of the WSDL plugin.
24 | */
25 | open class WSDLExtension @Inject constructor(objectFactory: ObjectFactory) {
26 |
27 | companion object {
28 | /**
29 | * Extension name of plugin.
30 | */
31 | const val WSDL_EXTENSION_NAME = "wsdl"
32 |
33 | /**
34 | * Task group name of WSDL code generation.
35 | */
36 | const val WSDL_GROUP_NAME = "WSDL Code Generation"
37 |
38 | /**
39 | * Configuration name of Axis 1.
40 | */
41 | const val WSDL_AXIS1_CONFIGURATION_NAME = "wsdlAxis1"
42 |
43 | /**
44 | * Configuration name of Axis 2.
45 | */
46 | const val WSDL_AXIS2_CONFIGURATION_NAME = "wsdlAxis2"
47 |
48 | /**
49 | * Folder names for generated java files.
50 | **/
51 | const val CODEGEN_OUTPUTPATH = "generated/wsdl2java"
52 | }
53 |
54 | /**
55 | * Container for axis1 generation configurations.
56 | */
57 | val axis1: NamedDomainObjectContainer = objectFactory.domainObjectContainer(Axis1::class.java)
58 |
59 | /**
60 | * Container for axis2 generation configurations.
61 | */
62 | val axis2: NamedDomainObjectContainer = objectFactory.domainObjectContainer(Axis2::class.java)
63 |
64 | }
65 |
--------------------------------------------------------------------------------
/src/test/resources/axis2/databinding/StockQuote.xsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
21 |
22 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/src/test/resources/axis2/databinding/StockQuoteService.wsdl:
--------------------------------------------------------------------------------
1 |
19 |
20 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/.github/workflows/build.yml:
--------------------------------------------------------------------------------
1 | # This workflow will build a Java project with Gradle
2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
3 |
4 | name: Run build and tests
5 |
6 | on:
7 | push:
8 | branches:
9 | - '*'
10 | pull_request:
11 | branches: [ master ]
12 |
13 | jobs:
14 | build:
15 | environment: CIRelease
16 | runs-on: ubuntu-latest
17 |
18 | steps:
19 | - name: Set up JDK 11
20 | uses: actions/setup-java@v1
21 | with:
22 | java-version: 11
23 | - uses: actions/checkout@v2
24 | with:
25 | fetch-depth: 0
26 | - run: git fetch --all --tags
27 |
28 | - name: Create .gradle dir
29 | run: mkdir -p $HOME/.gradle
30 | - name: Install gpg secret key
31 | env:
32 | SIGNINGFILE: ${{ secrets.SIGNINGFILE }}
33 | run: |
34 | cat <(echo -e "${{ secrets.SIGNINGFILE }}") | gpg --batch --import
35 | gpg --list-secret-keys --keyid-format LONG
36 | - name: Export gpg file
37 | env:
38 | SIGNINGKEYID: ${{ secrets.SIGNINGKEYID }}
39 | SIGNINGPASSWORD: ${{ secrets.SIGNINGPASSWORD }}
40 | run: |
41 | gpg --batch --passphrase="$SIGNINGPASSWORD" --pinentry-mode loopback --export-secret-keys $SIGNINGKEYID > $HOME/.gradle/secrets.gpg
42 | - name: Create gradle sproperties
43 | env:
44 | APIKEY: ${{ secrets.APIKEY }}
45 | APISECRET: ${{ secrets.APISECRET }}
46 | SIGNINGKEYID: ${{ secrets.SIGNINGKEYID }}
47 | SIGNINGPASSWORD: ${{ secrets.SIGNINGPASSWORD }}
48 | SONATYPEPASSWORD: ${{ secrets.SONATYPEPASSWORD }}
49 | SONATYPEUSER: ${{ secrets.SONATYPEUSER }}
50 | run: echo -e "gradle.publish.key=$APIKEY\ngradle.publish.secret=$APISECRET\nsigning.keyId=$SIGNINGKEYID\nsigning.password=$SIGNINGPASSWORD\nsigning.secretKeyRingFile=$HOME/.gradle/secrets.gpg\nsonatypeUsername=$SONATYPEUSER\nsonatypePassword=$SONATYPEPASSWORD" > $HOME/.gradle/gradle.properties
51 | - name: Build and test with Gradle
52 | env:
53 | ISHUSERNAME: ${{ secrets.ISHUSERNAME }}
54 | ISHKEY: ${{ secrets.ISHKEY }}
55 | JAVA_OPTS: "-Xmx1024M -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=512M"
56 | GRADLE_OPTS: "-Dorg.gradle.daemon=true"
57 | run: ./gradlew test build :publishIntershopMvnPublicationToMavenRepository -s --scan
58 | - name: Publish Unit Test Results
59 | uses: EnricoMi/publish-unit-test-result-action/composite@v1
60 | if: always()
61 | with:
62 | files: build/test-results/**/*.xml
63 | - name: Post Build
64 | run: rm -f $HOME/.gradle/gradle.properties && rm -f $HOME/.docker/config.json
65 |
--------------------------------------------------------------------------------
/.github/workflows/release.yml:
--------------------------------------------------------------------------------
1 | # This workflow will build a Java project with Gradle
2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
3 |
4 | name: Run release build from tag
5 |
6 | on:
7 | push:
8 | tags:
9 | - '*'
10 |
11 | jobs:
12 | release:
13 | environment: CIRelease
14 | runs-on: ubuntu-latest
15 |
16 | steps:
17 | - name: Set up JDK 11
18 | uses: actions/setup-java@v1
19 | with:
20 | java-version: 11
21 | - uses: actions/checkout@v2
22 | with:
23 | fetch-depth: 0
24 | - run: git fetch --all --tag
25 | - name: Create .gradle dir
26 | run: mkdir -p $HOME/.gradle
27 | - id: install-secret-key
28 | name: Install gpg secret key
29 | env:
30 | SIGNINGFILE: ${{ secrets.SIGNINGFILE }}
31 | run: |
32 | cat <(echo -e "${{ secrets.SIGNINGFILE }}") | gpg --batch --import
33 | gpg --list-secret-keys --keyid-format LONG
34 | - id: export-gpg-file
35 | name: Export gpg file
36 | env:
37 | SIGNINGKEYID: ${{ secrets.SIGNINGKEYID }}
38 | SIGNINGPASSWORD: ${{ secrets.SIGNINGPASSWORD }}
39 | run: |
40 | gpg --batch --passphrase="$SIGNINGPASSWORD" --pinentry-mode loopback --export-secret-keys $SIGNINGKEYID > $HOME/.gradle/secrets.gpg
41 | - name: Create gradle sproperties
42 | env:
43 | APIKEY: ${{ secrets.APIKEY }}
44 | APISECRET: ${{ secrets.APISECRET }}
45 | SIGNINGKEYID: ${{ secrets.SIGNINGKEYID }}
46 | SIGNINGPASSWORD: ${{ secrets.SIGNINGPASSWORD }}
47 | SONATYPEPASSWORD: ${{ secrets.SONATYPEPASSWORD }}
48 | SONATYPEUSER: ${{ secrets.SONATYPEUSER }}
49 | run: echo -e "gradle.publish.key=$APIKEY\ngradle.publish.secret=$APISECRET\nsigning.keyId=$SIGNINGKEYID\nsigning.password=$SIGNINGPASSWORD\nsigning.secretKeyRingFile=$HOME/.gradle/secrets.gpg\nsonatypeUsername=$SONATYPEUSER\nsonatypePassword=$SONATYPEPASSWORD" > $HOME/.gradle/gradle.properties
50 | - name: Run gradle release
51 | env:
52 | ISHUSERNAME: ${{ secrets.ISHUSERNAME }}
53 | ISHKEY: ${{ secrets.ISHKEY }}
54 | JAVA_OPTS: "-Xmx1024M -XX:MaxPermSize=512M -XX:ReservedCodeCacheSize=512M"
55 | GRADLE_OPTS: "-Dorg.gradle.daemon=true"
56 | run: ./gradlew -PrunOnCI=true test build :publishIntershopMvnPublicationToMavenRepository :publishPlugins -s --scan
57 | - name: Publish Unit Test Results
58 | uses: EnricoMi/publish-unit-test-result-action/composite@v1
59 | if: always()
60 | with:
61 | files: build/test-results/**/*.xml
62 | - name: Post Build
63 | run: rm -f $HOME/.gradle/gradle.properties
64 |
--------------------------------------------------------------------------------
/src/test/resources/axis1/jms-sample/GetQuote.wsdl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
40 |
41 |
42 |
43 |
46 |
47 |
52 |
53 |
54 |
55 |
56 |
59 |
60 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%"=="" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%"=="" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34 |
35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37 |
38 | @rem Find java.exe
39 | if defined JAVA_HOME goto findJavaFromJavaHome
40 |
41 | set JAVA_EXE=java.exe
42 | %JAVA_EXE% -version >NUL 2>&1
43 | if %ERRORLEVEL% equ 0 goto execute
44 |
45 | echo.
46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47 | echo.
48 | echo Please set the JAVA_HOME variable in your environment to match the
49 | echo location of your Java installation.
50 |
51 | goto fail
52 |
53 | :findJavaFromJavaHome
54 | set JAVA_HOME=%JAVA_HOME:"=%
55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56 |
57 | if exist "%JAVA_EXE%" goto execute
58 |
59 | echo.
60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61 | echo.
62 | echo Please set the JAVA_HOME variable in your environment to match the
63 | echo location of your Java installation.
64 |
65 | goto fail
66 |
67 | :execute
68 | @rem Setup the command line
69 |
70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71 |
72 |
73 | @rem Execute Gradle
74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75 |
76 | :end
77 | @rem End local scope for the variables with windows NT shell
78 | if %ERRORLEVEL% equ 0 goto mainEnd
79 |
80 | :fail
81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82 | rem the _cmd.exe /c_ return code!
83 | set EXIT_CODE=%ERRORLEVEL%
84 | if %EXIT_CODE% equ 0 set EXIT_CODE=1
85 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
86 | exit /b %EXIT_CODE%
87 |
88 | :mainEnd
89 | if "%OS%"=="Windows_NT" endlocal
90 |
91 | :omega
92 |
--------------------------------------------------------------------------------
/src/test/resources/axis1/jaxrpc-sample/Address.wsdl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
--------------------------------------------------------------------------------
/src/test/resources/axis2/quickstartadb/StockQuoteService.wsdl:
--------------------------------------------------------------------------------
1 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/src/test/resources/axis2/quickstartjibx/StockQuoteService.wsdl:
--------------------------------------------------------------------------------
1 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/src/test/resources/axis2/quickstartxmlbeans/StockQuoteService.wsdl:
--------------------------------------------------------------------------------
1 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/src/test/resources/axis1/addressbook/AddressBook.wsdl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 |
13 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
77 |
78 |
79 |
80 |
83 |
84 |
89 |
90 |
91 |
92 |
93 |
96 |
97 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
--------------------------------------------------------------------------------
/src/test/resources/axis2/mtom/MTOMSample.wsdl:
--------------------------------------------------------------------------------
1 |
19 |
20 |
31 |
32 |
35 |
37 |
38 |
39 |
41 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
59 |
61 |
62 |
63 |
65 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
79 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
94 |
96 |
97 |
99 |
101 |
102 |
103 |
--------------------------------------------------------------------------------
/src/test/resources/axis2/faulthandling/bank.wsdl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
21 |
22 |
27 |
28 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
--------------------------------------------------------------------------------
/src/test/resources/axis2/addnumberservice/AddNumbersService.wsdl:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 | This service method creates the mathematical sum of two whole-number and
11 | positive summands.
12 | This service tests if the Axis2 REST support via HTTP-GET works correctly.
13 | The operation parameters of a HTTP-GET based REST request can only consist
14 | of simple types. For this reason the ComplexObjectEchoService cannot be used
15 | to test such kind of request types.
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
--------------------------------------------------------------------------------
/src/test/resources/axis1/wsrpservice/xml.xsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | See http://www.w3.org/XML/1998/namespace.html and
7 | http://www.w3.org/TR/REC-xml for information about this namespace.
8 |
9 | This schema document describes the XML namespace, in a form
10 | suitable for import by other schema documents.
11 |
12 | Note that local names in this namespace are intended to be defined
13 | only by the World Wide Web Consortium or its subgroups. The
14 | following names are currently defined in this namespace and should
15 | not be used with conflicting semantics by any Working Group,
16 | specification, or document instance:
17 |
18 | base (as an attribute name): denotes an attribute whose value
19 | provides a URI to be used as the base for interpreting any
20 | relative URIs in the scope of the element on which it
21 | appears; its value is inherited. This name is reserved
22 | by virtue of its definition in the XML Base specification.
23 |
24 | id (as an attribute name): denotes an attribute whose value
25 | should be interpreted as if declared to be of type ID.
26 | The xml:id specification is not yet a W3C Recommendation,
27 | but this attribute is included here to facilitate experimentation
28 | with the mechanisms it proposes. Note that it is _not_ included
29 | in the specialAttrs attribute group.
30 |
31 | lang (as an attribute name): denotes an attribute whose value
32 | is a language code for the natural language of the content of
33 | any element; its value is inherited. This name is reserved
34 | by virtue of its definition in the XML specification.
35 |
36 | space (as an attribute name): denotes an attribute whose
37 | value is a keyword indicating what whitespace processing
38 | discipline is intended for the content of the element; its
39 | value is inherited. This name is reserved by virtue of its
40 | definition in the XML specification.
41 |
42 | Father (in any context at all): denotes Jon Bosak, the chair of
43 | the original XML Working Group. This name is reserved by
44 | the following decision of the W3C XML Plenary and
45 | XML Coordination groups:
46 |
47 | In appreciation for his vision, leadership and dedication
48 | the W3C XML Plenary on this 10th day of February, 2000
49 | reserves for Jon Bosak in perpetuity the XML name
50 | xml:Father
51 |
52 |
53 |
54 |
55 | This schema defines attributes and an attribute group
56 | suitable for use by
57 | schemas wishing to allow xml:base, xml:lang, xml:space or xml:id
58 | attributes on elements they define.
59 |
60 | To enable this, such a schema must import this schema
61 | for the XML namespace, e.g. as follows:
62 | <schema . . .>
63 | . . .
64 | <import namespace="http://www.w3.org/XML/1998/namespace"
65 | schemaLocation="http://www.w3.org/2001/xml.xsd"/>
66 |
67 | Subsequently, qualified reference to any of the attributes
68 | or the group defined below will have the desired effect, e.g.
69 |
70 | <type . . .>
71 | . . .
72 | <attributeGroup ref="xml:specialAttrs"/>
73 |
74 | will define a type which will schema-validate an instance
75 | element with any of those attributes
76 |
77 |
78 |
79 | In keeping with the XML Schema WG's standard versioning
80 | policy, this schema document will persist at
81 | http://www.w3.org/2005/08/xml.xsd.
82 | At the date of issue it can also be found at
83 | http://www.w3.org/2001/xml.xsd.
84 | The schema document at that URI may however change in the future,
85 | in order to remain compatible with the latest version of XML Schema
86 | itself, or with the XML namespace itself. In other words, if the XML
87 | Schema or XML namespaces change, the version of this document at
88 | http://www.w3.org/2001/xml.xsd will change
89 | accordingly; the version at
90 | http://www.w3.org/2005/08/xml.xsd will not change.
91 |
92 |
93 |
94 |
95 |
96 | Attempting to install the relevant ISO 2- and 3-letter
97 | codes as the enumerated possible values is probably never
98 | going to be a realistic possibility. See
99 | RFC 3066 at http://www.ietf.org/rfc/rfc3066.txt and the IANA registry
100 | at http://www.iana.org/assignments/lang-tag-apps.htm for
101 | further information.
102 |
103 | The union allows for the 'un-declaration' of xml:lang with
104 | the empty string.
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 | See http://www.w3.org/TR/xmlbase/ for
129 | information about this attribute.
130 |
131 |
132 |
133 |
134 |
135 | See http://www.w3.org/TR/xml-id/ for
136 | information about this attribute.
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
--------------------------------------------------------------------------------
/src/test/groovy/com/intershop/gradle/wsdl/WSDLPluginSpec.groovy:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Intershop Communications AG.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.intershop.gradle.wsdl
17 |
18 | import com.intershop.gradle.test.AbstractProjectSpec
19 | import com.intershop.gradle.wsdl.extension.WSDLExtension
20 | import com.intershop.gradle.wsdl.utils.DeployScope
21 | import org.gradle.api.Plugin
22 |
23 | class WSDLPluginSpec extends AbstractProjectSpec {
24 |
25 | @Override
26 | Plugin getPlugin() {
27 | return new WSDLPlugin()
28 | }
29 |
30 | def 'should add extension named wsdl'() {
31 | when:
32 | plugin.apply(project)
33 |
34 | then:
35 | project.extensions.getByName(WSDLExtension.WSDL_EXTENSION_NAME)
36 | }
37 |
38 | def 'should add WSDL generate task for each wsdl config'() {
39 | when:
40 | plugin.apply(project)
41 | project.extensions.getByName(WSDLExtension.WSDL_EXTENSION_NAME).axis1 {
42 | testconfiguration {
43 | }
44 | }
45 |
46 | then:
47 | project.tasks.findByName("axis1Wsdl2javaTestconfiguration")
48 |
49 | when:
50 | project.extensions.getByName(WSDLExtension.WSDL_EXTENSION_NAME).axis2 {
51 | testconfiguration {
52 | }
53 | }
54 |
55 | then:
56 | project.tasks.findByName("axis2Wsdl2javaTestconfiguration")
57 | }
58 |
59 | def 'should set all parameters in task axis1'() {
60 | when:
61 | plugin.apply(project)
62 | project.extensions.getByName(WSDLExtension.WSDL_EXTENSION_NAME).axis1 {
63 | testconfiguration {
64 | noImports = true
65 | timeout = 360
66 | noWrapped = true
67 | serverSide = true
68 | skeletonDeploy = true
69 | deployScope = 'Application'
70 | generateAllClasses = true
71 | typeMappingVersion = '1.2'
72 | factory = 'TestFactory'
73 | helperGen = true
74 | userName = 'test'
75 | password = 'testp'
76 | implementationClassName = 'BlaClassName'
77 | wrapArrays = true
78 | sourceSetName = 'test'
79 | packageName = 'com.test'
80 | generateTestcase = true
81 | namespacePackageMappings {
82 | conf1 {
83 | namespace = "a"
84 | packageName = "com.intershop.a"
85 | }
86 | conf2 {
87 | namespace = "b"
88 | packageName = "com.intershop.b"
89 | }
90 | conf3 {
91 | namespace = "c"
92 | packageName = "com.intershop.c"
93 | }
94 | }
95 | namespacePackageMappingFile = project.file('wsdl/package.mapping')
96 | wsdlFile = project.file('MyFile.wsdl')
97 | args = ['-Dtest=test', '-Dtest1=test1'] as List
98 | }
99 | }
100 | com.intershop.gradle.wsdl.tasks.axis1.WSDL2Java task = project.tasks.findByName("axis1Wsdl2javaTestconfiguration") as com.intershop.gradle.wsdl.tasks.axis1.WSDL2Java
101 |
102 | then:
103 | task
104 | task.noImports
105 | task.timeoutConf == 360
106 | task.noWrapped
107 | task.serverSide
108 | task.skeletonDeploy
109 | task.deployScope == DeployScope.APPLICATION.scope
110 | task.generateAllClasses
111 | task.typeMappingVersion == '1.2'
112 | task.factory == 'TestFactory'
113 | task.helperGen
114 | task.userName == 'test'
115 | task.password == 'testp'
116 | task.implementationClassName == 'BlaClassName'
117 | task.wrapArrays
118 | task.packageName == 'com.test'
119 | task.generateTestcase
120 | task.namespacePackageMappingList.contains("a=com.intershop.a")
121 | task.namespacePackageMappingFile == project.file('wsdl/package.mapping')
122 | task.wsdlFile == project.file('MyFile.wsdl')
123 | task.args == ['-Dtest=test', '-Dtest1=test1'] as List
124 | }
125 |
126 | def 'should set all parameters in task axis2'() {
127 | when:
128 | plugin.apply(project)
129 | project.extensions.getByName(WSDLExtension.WSDL_EXTENSION_NAME).axis2 {
130 | testconfiguration {
131 | wsdlFile = project.file('MyFile.wsdl')
132 | packageName = 'com.intershop.wsdl'
133 | namespacePackageMappings {
134 | conf1 {
135 | namespace = "a"
136 | packageName = "com.intershop.a"
137 | }
138 | conf2 {
139 | namespace = "b"
140 | packageName = "com.intershop.b"
141 | }
142 | conf3 {
143 | namespace = "c"
144 | packageName = "com.intershop.c"
145 | }
146 | }
147 | namespacePackageMappingFile = project.file('wsdl/package.mapping')
148 | unwrapParams = true
149 | generateAllClasses = true
150 | addArg('testParameter')
151 |
152 | }
153 | }
154 | com.intershop.gradle.wsdl.tasks.axis2.WSDL2Java task = project.tasks.findByName("axis2Wsdl2javaTestconfiguration") as com.intershop.gradle.wsdl.tasks.axis2.WSDL2Java
155 |
156 | then:
157 | task
158 | task.wsdlFile == project.file('MyFile.wsdl')
159 | task.packageName == 'com.intershop.wsdl'
160 | task.namespacePackageMappingFile == project.file('wsdl/package.mapping')
161 | task.unwrapParams
162 | task.generateAllClasses
163 | task.wsdlVersion == ""
164 | task.args == ['testParameter'] as List
165 | }
166 | }
167 |
--------------------------------------------------------------------------------
/src/main/kotlin/com/intershop/gradle/wsdl/extension/AbstractAxisConfig.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Intershop Communications AG.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.intershop.gradle.wsdl.extension
17 |
18 | import com.intershop.gradle.wsdl.extension.data.NamespacePackageMapping
19 | import org.gradle.api.NamedDomainObjectContainer
20 | import org.gradle.api.file.RegularFile
21 | import org.gradle.api.file.RegularFileProperty
22 | import org.gradle.api.model.ObjectFactory
23 | import org.gradle.api.provider.ListProperty
24 | import org.gradle.api.provider.Property
25 | import org.gradle.api.provider.Provider
26 | import org.gradle.api.tasks.SourceSet
27 | import java.io.File
28 | import javax.inject.Inject
29 |
30 | /**
31 | * Class with configuration for Axis 1 and 2.
32 | *
33 | * @constructur default constructor with project and a configuration name.
34 | */
35 | open class AbstractAxisConfig @Inject constructor(val name: String, objectFactory: ObjectFactory) {
36 |
37 | private val sourceSetNameProperty: Property = objectFactory.property(String::class.java)
38 | private val packageNameProperty: Property = objectFactory.property(String::class.java)
39 |
40 | private val namespacePackageMappingFileProperty: RegularFileProperty = objectFactory.fileProperty()
41 | private val wsdlFileProperty: RegularFileProperty = objectFactory.fileProperty()
42 |
43 | private val argumentsProperty: ListProperty = objectFactory.listProperty(String::class.java)
44 |
45 | // will be analyzed as Boolean
46 | private val generateTestcaseProperty: Property = objectFactory.property(Boolean::class.java)
47 |
48 | init {
49 | sourceSetNameProperty.set(SourceSet.MAIN_SOURCE_SET_NAME)
50 | generateTestcaseProperty.set(false)
51 | }
52 |
53 | /**
54 | * By default, package names are generated from the namespace strings in the WSDLExtension document in a
55 | * magical manner (typically, if the namespace is of the form "http://x.y.com" or "urn:x.y.com"
56 | * the corresponding package will be "com.y.x"). If this magic is not what you want, you can provide your
57 | * own mapping using the this maps argument. For example, if there is a namespace in the WSDLExtension document
58 | * called "urn:AddressFetcher2", and you want files generated from the objects within this namespace
59 | * to reside in the package samples.addr, you would provide the following option:
60 | *
61 | * urn:AddressFetcher2=samples.addr
62 | *
63 | */
64 | val namespacePackageMappings: NamedDomainObjectContainer
65 | = objectFactory.domainObjectContainer(NamespacePackageMapping::class.java)
66 |
67 | /**
68 | * Provider for packageName.
69 | */
70 | val packageNameProvider: Provider
71 | get() = packageNameProperty
72 |
73 | /**
74 | * This is a shorthand option to map all namespaces in a WSDLExtension document to the same
75 | * Java package name. This can be useful, but dangerous. You must make sure that you
76 | * understand the effects of doing this. For instance there may be multiple types
77 | * with the same name in different namespaces.
78 | * Only for Axis1: It is an error to use the --NStoPkg switch and --package at the same time.
79 | *
80 | * @property packageName
81 | */
82 | var packageName: String?
83 | get() = packageNameProperty.orNull
84 | set(value) = packageNameProperty.set(value)
85 |
86 | /**
87 | * Provider for generateTestcase.
88 | */
89 | val generateTestcaseProvider: Provider
90 | get() = generateTestcaseProperty
91 |
92 | /**
93 | * Generate a client-side JUnit test case. This test case can stand on its own, but it doesn't
94 | * really do anything except pass default values (null for objects, 0 or false for primitive types).
95 | * Like the generated implementation file, the generated test case file could be considered a template
96 | * that you may fill in.
97 | *
98 | * @property generateTestcase
99 | */
100 | var generateTestcase : Boolean
101 | get() = generateTestcaseProperty.getOrElse(false)
102 | set(value) = generateTestcaseProperty.set(value)
103 |
104 | /**
105 | * Provider for namespacePackageMappingFile.
106 | */
107 | val namespacePackageMappingFileProvider: Provider
108 | get() = namespacePackageMappingFileProperty
109 |
110 | /**
111 | * If there are a number of namespaces in the WSDLExtension document, listing a mapping for them all could
112 | * become tedious. To help keep the command line terse, WSDL2Java will also look for mappings in
113 | * a properties file. By default, this file is named "NStoPkg.properties" and it must reside in
114 | * the default package (ie., no package). But you can explicitly provide your own file using this option.
115 | *
116 | * The entries in this file are of the same form as the arguments to the namespacePackageMapping option.
117 | * For example, instead of providing the command line option as above, we could provide the same
118 | * information in a properties file:
119 | *
109 | *
110 | * @property namespacePackageMappingList list of namespace mappings
111 | */
112 | @get:Input
113 | val namespacePackageMappingList: List
114 | get() {
115 | val mappings: MutableList = mutableListOf()
116 |
117 | namespacePackageMappings?.forEach {
118 | mappings.add("${it.namespace}=${it.packageName}")
119 | }
120 |
121 | return mappings.toList()
122 | }
123 |
124 | private val generateTestcaseProperty = objectFactory.property(Boolean::class.java)
125 |
126 | /**
127 | * Generate a client-side JUnit test case. This test case can stand on its own, but it doesn't
128 | * really do anything except pass default values (null for objects, 0 or false for primitive types).
129 | * Like the generated implementation file, the generated test case file could be considered a template
130 | * that you may fill in.
131 | *
132 | * @property generateTestcase default value is false
133 | */
134 | @get:Input
135 | var generateTestcase: Boolean
136 | get() = generateTestcaseProperty.getOrElse(false)
137 | set(value) = generateTestcaseProperty.set(value)
138 |
139 | /**
140 | * Add provider for generateTestcase.
141 | */
142 | fun provideGenerateTestcase(generateTestcase: Provider) = generateTestcaseProperty.set(generateTestcase)
143 |
144 | private val namespacePackageMappingFileProperty: RegularFileProperty = objectFactory.fileProperty()
145 |
146 | /**
147 | * If there are a number of namespaces in the WSDLExtension document, listing a mapping for them all could
148 | * become tedious. To help keep the command line terse, WSDL2Java will also look for mappings in
149 | * a properties file. By default, this file is named "NStoPkg.properties" and it must reside in
150 | * the default package (ie., no package). But you can explicitly provide your own file using this option.
151 | *
152 | * The entries in this file are of the same form as the arguments to the namespacePackageMapping option.
153 | * For example, instead of providing the command line option as above, we could provide the same
154 | * information in a properties file:
155 | *
184 | * and for "false" it would look like:
185 | *
186 | *
187 | *
188 | * ...
189 | *
190 | *
191 | * If this configuration is used, serverSide is automatically set to true.
192 | *
193 | * @property skeletonDeploy
194 | */
195 | var skeletonDeploy : String
196 | get() = skeletonDeployProperty.get()
197 | set(value) = skeletonDeployProperty.set(value)
198 |
199 | /**
200 | * Provider for deployScope property.
201 | */
202 | val deployScopeProvider: Provider
203 | get() = deployScopeProperty
204 |
205 | /**
206 | * Add scope to deploy.wsdd:
207 | * - APPLICATION -> "Application",
208 | * - REQUEST -> "Request", or
209 | * - SESSION -> "Session".
210 | * If this option does not appear, no scope tag appears in deploy.wsdd,
211 | * which the Axis runtime defaults to "Request".
212 | *
213 | * @property deployScope
214 | */
215 | var deployScope : String
216 | get() = deployScopeProperty.get()
217 | set(value) = deployScopeProperty.set(value)
218 |
219 | /**
220 | * Provider for generateAllClasses property.
221 | */
222 | val generateAllClassesProvider: Provider
223 | get() = generateAllClassesProperty
224 |
225 | /**
226 | * Generate code for all elements, even unreferenced ones. By default,
227 | * WSDL2Java only generates code for those elements in the WSDLExtension file that are referenced.
228 | *
229 | * A note about what it means to be referenced. We cannot simply say: start with the services,
230 | * generate all bindings referenced by the service, generate all portTypes referenced by the referenced
231 | * bindings, etc. What if we're generating code from a WSDLExtension file that only contains portTypes, messages,
232 | * and types? If WSDL2Java used service as an anchor, and there's no service in the file, then nothing
233 | * will be generated. So the anchor is the lowest element that exists in the WSDLExtension file in the order:
234 | * - types
235 | * - portTypes
236 | * - bindings
237 | * - services
238 | * For example, if a WSDLExtension file only contained types, then all the listed types would be generated.
239 | * But if a WSDLExtension file contained types and a portType, then that portType will be generated and only those
240 | * types that are referenced by that portType.
241 | *
242 | * Note that the anchor is searched for in the WSDLExtension file appearing on the command line, not
243 | * in imported WSDLExtension files. This allows one WSDLExtension file to import constructs defined
244 | * in another WSDLExtension file without the nuisance of having all the imported WSDLExtension file's
245 | * constructs generated.
246 | *
247 | * @property generateAllClasses
248 | */
249 | var generateAllClasses : Boolean
250 | get() = generateAllClassesProperty.get()
251 | set(value) = generateAllClassesProperty.set(value)
252 |
253 | /**
254 | * Provider for typeMappingVersion property.
255 | */
256 | val typeMappingVersionProvider: Provider
257 | get() = typeMappingVersionProperty
258 |
259 | /**
260 | * Indicate 1.1 or 1.2. The default is 1.2 (SOAP 1.2 JAX-RPC compliant).
261 | *
262 | * @property typeMappingVersion
263 | */
264 | var typeMappingVersion : String
265 | get() = typeMappingVersionProperty.get()
266 | set(value) = typeMappingVersionProperty.set(value)
267 |
268 | /**
269 | * Provider for factory property.
270 | */
271 | val factoryProvider: Provider
272 | get() = factoryProperty
273 |
274 | /**
275 | * Used to extend the functionality of the WSDL2Java emitter.
276 | * The argument is the name of a class which extends JavaWriterFactory.
277 | *
278 | * @property factory
279 | */
280 | var factory : String
281 | get() = factoryProperty.get()
282 | set(value) = factoryProperty.set(value)
283 |
284 | /**
285 | * Provider for helperGen property.
286 | */
287 | val helperGenProvider: Provider
288 | get() = helperGenProperty
289 |
290 | /**
291 | * Emits separate Helper classes for meta data.
292 | *
293 | * @property helperGen
294 | */
295 | var helperGen : Boolean
296 | get() = helperGenProperty.get()
297 | set(value) = helperGenProperty.set(value)
298 |
299 | /**
300 | * Provider for userName property.
301 | */
302 | val userNameProvider: Provider
303 | get() = userNameProperty
304 |
305 | /**
306 | * This username is used in resolving the WSDLExtension-URI provided as the input to WSDL2Java.
307 | * If the URI contains a username, this will override the command line switch. An example
308 | * of a URL with a username and password is: http://user:password@hostname:port/path/to/service?WSDL
309 | *
310 | * @property userName
311 | */
312 | var userName : String
313 | get() = userNameProperty.get()
314 | set(value) = userNameProperty.set(value)
315 |
316 | /**
317 | * Provider for password property.
318 | */
319 | val passwordProvider: Provider
320 | get() = passwordProperty
321 |
322 | /**
323 | * This password is used in resolving the WSDLExtension-URI provided as the input to WSDL2Java.
324 | * If the URI contains a password, this will override the command line switch.
325 | *
326 | * @property password
327 | */
328 | var password : String
329 | get() = passwordProperty.get()
330 | set(value) = passwordProperty.set(value)
331 |
332 | /**
333 | * Provider for implementationClassName property.
334 | */
335 | val implementationClassNameProvider: Provider
336 | get() = implementationClassNameProperty
337 |
338 | /**
339 | * Set the name of the implementation class. Especially useful when exporting an existing class as
340 | * a web service using java2wsdl followed by wsdl2java. If you are using the skeleton deploy option
341 | * you must make sure, after generation, that your implementation class implements the port type name
342 | * interface generated by wsdl2java. You should also make sure that all your exported methods throws
343 | * java.lang.RemoteException.
344 | *
345 | * @property implementationClassName
346 | */
347 | var implementationClassName : String
348 | get() = implementationClassNameProperty.get()
349 | set(value) = implementationClassNameProperty.set(value)
350 |
351 | /**
352 | * Provider for wrapArrays property.
353 | */
354 | val wrapArraysProvider: Provider
355 | get() = wrapArraysProperty
356 |
357 | /**
358 | * When processing a schema like this:
359 | *