Created
February 2, 2011 21:53
-
-
Save kings13y/808533 to your computer and use it in GitHub Desktop.
Minimal Soap Server using Scala and JDK6 annotations
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 | |
} | |
object MinimalSoapServer { // defined Companion Object for our class | |
def main(args: Array[String]) { // main method to make this a runnable application | |
val endpoint = Endpoint.publish("http://localhost:8080/wstest", new MinimalSoapServer()) | |
System.out.println("Waiting for requests...") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Correct indeed,
i used Style.DOCUMENT instead of RPC and it worked
Still trying to understand the difference between them and how it will affect the wsdl which is created automatically