Commit 463344dc authored by Alessio Carenini's avatar Alessio Carenini

Deleted

parent 521582bc
/*
* Copyright 2016 The CHOReVOLUTION project
*
* 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
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
<<<<<<< HEAD:chorspec/src/test/java/chorspec/ServiceConfigurationTest.java
*/
package eu.chorevolution.datamodel;
import java.io.IOException;
import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.List;
import javax.net.ssl.HttpsURLConnection;
import org.junit.Test;
import eu.chorevolution.chors.Base;
import eu.chorevolution.chors.BaseService;
public class ServiceConfigurationTest {
static {
HttpsURLConnection.setDefaultHostnameVerifier((hostname, session) -> hostname.equals("127.0.0.1"));
}
@Test
public void cd_test() {
BaseService service;
String cd_wsdl="https://192.168.150.108:8443/ode/deployment/bundles/cdTripPlanner/BaseService.wsdl";
String source_url="https://192.168.150.108:8443/ode/processes/cdTripPlanner";
String srv_name="cdTripPlannerBase";
List<String> urls=new ArrayList<String>();
System.setProperty("com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump", "true");
System.setProperty("com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.dump", "true");
System.setProperty("com.sun.xml.ws.transport.http.HttpAdapter.dump", "true");
System.setProperty("com.sun.xml.internal.ws.transport.http.HttpAdapter.dump", "true");
try {
service = (BaseService) (Base.getPort(srv_name, cd_wsdl, source_url, BaseService.class));
urls.add("http://localhost/prova");
service.setInvocationAddress("dest_role", "dest_name", urls);
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
@Test
public void sf_test() {
String source_wsdl="https://192.168.150.108:8443/sfJourneyPlanner/sfJourneyPlanner?wsdl";
String source_url="https://192.168.150.108:8443/sfJourneyPlanner/SecurityFilterManagement/setInvocationAddress";
System.setProperty("com.sun.xml.ws.transport.http.client.HttpTransportPipe.dump", "true");
System.setProperty("com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.dump", "true");
System.setProperty("com.sun.xml.ws.transport.http.HttpAdapter.dump", "true");
System.setProperty("com.sun.xml.internal.ws.transport.http.HttpAdapter.dump", "true");
List<String> urls=new ArrayList<String>();
BaseService service;
try {
service = (BaseService) (Base.getPort("Base", source_wsdl, source_url, BaseService.class));
urls.add("http://localhost/prova");
service.setInvocationAddress("dest_role", "dest_name", urls);
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment