Skip to content
Snippets Groups Projects
Commit cdeeddc1 authored by Diki Ardian Wirasandi's avatar Diki Ardian Wirasandi
Browse files

fix tester

parent 904364e6
Branches
No related merge requests found
...@@ -5,13 +5,9 @@ import javax.xml.ws.Endpoint; ...@@ -5,13 +5,9 @@ import javax.xml.ws.Endpoint;
//Endpoint publisher //Endpoint publisher
public class Main{ public class Main{
public static void main(String[] args) { public static void main(String[] args) {
Order order = new Order(); Endpoint.publish("http://localhost:9999/ws/profile", new Profile());
// order.PuttransactionDetails("a", 2, "jakarta", "bandung", 4, "mantep gaans"); Endpoint.publish("http://localhost:9999/ws/order", new Order());
Account [] dd = order.getPrefferedDriver("5a9da397ca3949981d3b61f31c365a5aa3a1dd24ec73f244ba987f66e860faf8","a","a", "a"); Endpoint.publish("http://localhost:9999/ws/history", new History());
Account [] ddd = order.getNonPrefferedDriver("5a9da397ca3949981d3b61f31c365a5aa3a1dd24ec73f244ba987f66e860faf8","a","a", "a");
// Endpoint.publish("http://localhost:9999/ws/profile", new Profile());
// Endpoint.publish("http://localhost:9999/ws/order", new Order());
// Endpoint.publish("http://localhost:9999/ws/history", new History());
} }
} }
\ No newline at end of file
...@@ -8,15 +8,15 @@ import javax.xml.ws.Service; ...@@ -8,15 +8,15 @@ import javax.xml.ws.Service;
public class test { public class test {
public static void main(String[] args) { public static void main(String[] args) {
try { try {
String url = "http://localhost:9999/ws/history?wsdl"; String url = "http://localhost:9999/ws/profile?wsdl";
String namespace = "http://webservice.ojek.informatika.com/"; String namespace = "http://webservice.ojek.informatika.com/";
QName serviceQN = new QName(namespace, "HistoryService"); QName serviceQN = new QName(namespace, "ProfileService");
Service service = Service.create(new URL(url), serviceQN); Service service = Service.create(new URL(url), serviceQN);
String portName = "HistoryPort"; String portName = "ProfilePort";
QName portQN = new QName(namespace, portName); QName portQN = new QName(namespace, portName);
IHistory sample = service.getPort(portQN, IHistory.class); IProfile sample = service.getPort(portQN, IProfile.class);
// Transaction[] hasil = sample.getPenumpangHistory("blabla"); // Transaction[] hasil = sample.getPenumpangHistory("blabla");
// if (hasil != null) { // if (hasil != null) {
...@@ -24,12 +24,25 @@ public class test { ...@@ -24,12 +24,25 @@ public class test {
// System.out.println(hasil[1]); // System.out.println(hasil[1]);
// } // }
if (sample.hideHistory("bbbbb", 1)) { // String[] hasil = sample.getLocation("5a9da397ca3949981d3b61f31c365a5aa3a1dd24ec73f244ba987f66e860faf8");
System.out.println("Sukses Hide"); // System.out.println(hasil[1]);
Account akun = sample.getActiveUser("5a9da397ca3949981d3b61f31c365a5aa3a1dd24ec73f244ba987f66e860faf8");
System.out.println(akun);
if (sample.updateProfile("5a9da397ca3949981d3b61f31c365a5aa3a1dd24ec73f244ba987f66e860faf8",
"Diki Ardian",
"081111",
false,
"/img/profile/VGdWZUZ2dlJlUkM5eWpjVDcyQXJoZz09")) {
System.out.println("OKE BOS");
} else { } else {
System.out.println("Gagal"); System.out.println("ADUH");
} }
Account akun2 = sample.getActiveUser("5a9da397ca3949981d3b61f31c365a5aa3a1dd24ec73f244ba987f66e860faf8");
System.out.println(akun2);
} catch (MalformedURLException e) { } catch (MalformedURLException e) {
e.printStackTrace(); e.printStackTrace();
} }
......
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