Lark: Swift SOAP Client


Hi all,

Over the past few months I've been writing a SOAP client library. It uses code generation to generated the client proxy. The major benefit of code generation is that all messages are typed and great autocompletion support. You can find the project here: I'd be happy to hear your feedback / questions!

Usage instructions;

First, install the package by including the following in Package.swift:

  .Package(url: "", majorVersion: 0)

Then, build your package. This will result in an executable named lark-generate-client which can generate the client code:

  swift build
  .build/debug/lark-generate-client "http://localhost:8000/?wsdl" > Sources/Client.swift

In your code you can now use the generated Client like this:

  let client = HelloWorldServiceClient()

To call a remote method, inspect the generated functions on the Client. For example the sayHello method that takes a SayHello parameter and returns a SayHelloResponse:

  let result = try client.sayHello(SayHello(name: "World", times: 2))

Or if you're building a GUI that requires non-blocking networking, use the async version:

  client.sayHelloAsync(SayHello(name: "World", times: 2)) { result in