Newer
Older
package com.informatika.ojek.webservice;
import java.net.MalformedURLException;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
public class test {
public static void main(String[] args) {
try {
String namespace = "http://webservice.ojek.informatika.com/";
QName serviceQN = new QName(namespace, "ProfileService");
Service service = Service.create(new URL(url), serviceQN);
QName portQN = new QName(namespace, portName);
IProfile sample = service.getPort(portQN, IProfile.class);
// Transaction[] hasil = sample.getPenumpangHistory("blabla");
// if (hasil != null) {
// System.out.println(hasil[0]);
// System.out.println(hasil[1]);
// String[] hasil = sample.getLocation("5a9da397ca3949981d3b61f31c365a5aa3a1dd24ec73f244ba987f66e860faf8");
// 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");
Account akun2 = sample.getActiveUser("5a9da397ca3949981d3b61f31c365a5aa3a1dd24ec73f244ba987f66e860faf8");
System.out.println(akun2);
} catch (MalformedURLException e) {
e.printStackTrace();
}
}
}