esercizi webservices wsdl
This commit is contained in:
17
test5_ws/HelloWorld.java
Normal file
17
test5_ws/HelloWorld.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package test5_ws;
|
||||
import javax.ejb.Stateless;
|
||||
import javax.jws.WebService;
|
||||
|
||||
|
||||
/**
|
||||
* Created by Giovanni on 12/06/2015.
|
||||
*/
|
||||
@WebService(endpointInterface ="test5_ws.HelloWorldInterface")
|
||||
@Stateless
|
||||
public class HelloWorld implements HelloWorldInterface{
|
||||
public ObjectToPass modifymessage(ObjectToPass o) {
|
||||
System.out.println("original message " + o.message);
|
||||
o.message = "modified by server";
|
||||
return o;
|
||||
}
|
||||
}
|
||||
11
test5_ws/HelloWorldInterface.java
Normal file
11
test5_ws/HelloWorldInterface.java
Normal file
@@ -0,0 +1,11 @@
|
||||
package test5_ws;
|
||||
|
||||
import javax.jws.WebService;
|
||||
|
||||
/**
|
||||
* Created by Giovanni on 12/06/2015.
|
||||
*/
|
||||
@WebService
|
||||
public interface HelloWorldInterface {
|
||||
ObjectToPass modifymessage(ObjectToPass o);
|
||||
}
|
||||
12
test5_ws/ObjectToPass.java
Normal file
12
test5_ws/ObjectToPass.java
Normal file
@@ -0,0 +1,12 @@
|
||||
package test5_ws;
|
||||
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
/**
|
||||
* Created by Giovanni on 12/06/2015.
|
||||
*/
|
||||
@XmlRootElement
|
||||
public class ObjectToPass {
|
||||
public String message = "def";
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user