Skip to content
Snippets Groups Projects
Commit fa46b5b1 authored by boulouk's avatar boulouk
Browse files

updated example

parent 9b2790ff
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,16 @@
<name>Public online Restlet repository</name>
<url>http://maven.restlet.org</url>
</repository>
<repository>
<id>ow2-releases</id>
<url>http://repository.ow2.org/nexus/content/repositories/releases/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<build>
......@@ -49,6 +59,12 @@
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>eu.chorevolution.ee</groupId>
<artifactId>chorspec</artifactId>
<version>1.0.0</version>
</dependency>
<!--
<dependency>
<groupId>eu.chorevolution.vsb</groupId>
......
......@@ -2,6 +2,8 @@ package eu.chorevolution.vsb.test.baseService;
import javax.xml.ws.Endpoint;
import eu.chorevolution.chors.Base;
public class BaseServicePublisher {
public static void main(String[] args) {
......
package eu.chorevolution.vsb.test.baseService;
import java.util.List;
public interface BaseService {
public interface BaseServiceTmp {
public final static String namespace="http://services.chorevolution.eu/";
......
......@@ -16,7 +16,7 @@ import javax.xml.ws.Service;
targetNamespace = "http://services.chorevolution.eu/"
)
public class Base implements BaseService {
public class BaseTmp implements BaseServiceTmp {
protected Map<String,String> address_map=null;
protected String ENDPOINTADDRESS=null;
......@@ -27,7 +27,7 @@ public class Base implements BaseService {
* 3. send the service dependency data (according to Enactment Engine choreography requirements)
**/
public Base(){
public BaseTmp(){
address_map = new HashMap<String, String>();
......
package eu.chorevolution.vsb.test.baseServiceClient;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
......@@ -9,7 +10,11 @@ import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import javax.xml.ws.soap.SOAPBinding;
import eu.chorevolution.vsb.test.baseService.BaseService;
import eu.chorevolution.chors.Base;
import eu.chorevolution.chors.BaseService;
//import eu.chorevolution.vsb.test.baseService.BaseTmp;
//import eu.chorevolution.vsb.test.baseService.BaseServiceTmp;
public class baseServiceClient {
......@@ -27,16 +32,26 @@ public class baseServiceClient {
e.printStackTrace();
}
QName qname = new QName("http://services.chorevolution.eu/", "BaseService");
Service service = Service.create(url, qname);
BaseService base = service.getPort(qname,BaseService.class);
String role = "baseService";
String name = "baseService";
List<String> endpoints = new ArrayList<String>();
endpoints.add("192.168.106.20");
base.setInvocationAddress(role, name, endpoints);
// QName qname = new QName("http://services.chorevolution.eu/", "BaseService");
//
// Service service = Service.create(url, qname);
// BaseService base = service.getPort(qname,BaseService.class);
//
String dest_role = "baseService";
String dest_name = "baseService";
List<String> urls = new ArrayList<String>();
urls.add("192.168.106.20");
// base.setInvocationAddress(role, name, endpoints);
BaseService service;
try {
service = Base.getPort("Base", "http://localhost:9999/vsb/baseService?wsdl", "http://localhost:9999/vsb/baseService", BaseService.class);
service.setInvocationAddress(dest_role, dest_name, urls);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment