Skip to content

suer/wsdl2kotlin

Repository files navigation

WSDL2Kotlin

A stub generator for services implemented by WSDL.

Inspired by WSDL2Swift

Usage

Add maven repository to settings.gradle:

pluginManagement {
    repositories {
        gradlePluginPortal()
        maven {
            name = "GitHubPackages"
            url = uri("https://maven.pkg.github.com/suer/wsdl2kotlin")
            credentials {
                username = project.findProperty("gpr.user") ?: System.getenv("USERNAME") ?: "suer"
                password = project.findProperty("gpr.key") ?: System.getenv("TOKEN") ?: ""
            }
        }
    }
}

dependencyResolutionManagement {
    repositories {
        mavenCentral()
        maven {
            name = "GitHubPackages"
            url = uri("https://maven.pkg.github.com/suer/wsdl2kotlin")
            credentials {
                username = project.findProperty("gpr.user") ?: System.getenv("USERNAME") ?: "suer"
                password = project.findProperty("gpr.key") ?: System.getenv("TOKEN") ?: ""
            }
        }
    }
}

Then, add plugin configuration to build.gradle:

plugins {
    id 'org.codefirst.wsdl2kotlin.wsdl2kotlin-gradle-plugin' version '0.7.0'
}

wsdl2kotlin {
    // path to WSDL and XSD files
    paths = ["app/src/test/resources/sample.wsdl.xml", "app/src/test/resources/sample.xsd.xml"]
    // path to output destination directory of generated source code
    outputDirectory = "app/src/main/kotlin/"
}

Generate codes by:

$ ./gradlew wsdl2kotlin

Finally, append wsdl2kotlin-runtime to app/build.gradle:

dependencies {
    implementation 'org.codefirst.wsdl2kotlin:wsdl2kotlin-runtime:0.7.0'
}

For developers

Build

$ ./gradlew build

Test

$ ./gradlew test

Lint

check your source code:

$ ./gradlew ktlint

format all source code automatically:

$ ./gradlew ktFormat

About

An implementation of WSDL stub code generator for Kotlin.

Topics

Resources

License

Stars

25 stars

Watchers

3 watching

Forks

Packages

 
 
 

Contributors

Languages