This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This is the Towers of Hanoi example from the prolog tutorial [1] | |
* converted into Scala, using implicits to unfold the algorithm at | |
* compile-time. | |
* | |
* [1] http://www.csupomona.edu/~jrfisher/www/prolog_tutorial/2_3.html | |
*/ | |
object TowersOfHanoi { | |
import scala.reflect.Manifest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.jws.WebService | |
import javax.jws.soap.SOAPBinding | |
import javax.jws.soap.SOAPBinding.Style | |
import javax.xml.ws.Endpoint | |
@WebService(targetNamespace="org.scalabound.test", name="org.scalabound.test", portName="test", serviceName="WSTest") | |
private class MinimalSoapServer { | |
@SOAPBinding(style = Style.RPC) | |
def test(value : String) = "Hi " + value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.net.InetSocketAddress | |
import scala.xml.{Elem, XML} | |
import org.jboss.netty.buffer.ChannelBuffers | |
import org.jboss.netty.util.CharsetUtil.UTF_8 | |
import com.twitter.finagle.Service; | |
import com.twitter.finagle.builder.ClientBuilder; | |
import com.twitter.finagle.http.{Http, RequestBuilder}; | |
import org.jboss.netty.handler.codec.http._ | |
import org.jboss.netty.buffer.ChannelBuffers.wrappedBuffer | |
import java.net.URL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Copyright 2018 Viktor Klang | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |