Skip to content
Snippets Groups Projects
Commit b7d48e5d authored by rizkihalasan's avatar rizkihalasan
Browse files

menambahkan web service client profile

parent 908bf6a4
Branches
No related merge requests found
package main.OjekOnlineClient.Profile;
import javax.xml.bind.annotation.XmlRegistry;
/**
* This object contains factory methods for each
* Java content interface and Java element interface
* generated in the ojekonlinews.profile package.
* <p>An ObjectFactory allows you to programatically
* construct new instances of the Java representation
* for XML content. The Java representation of XML
* content can consist of schema derived interfaces
* and classes representing the binding of schema
* type definitions, element declarations and model
* groups. Factory methods for each of these are
* provided in this class.
*
*/
@XmlRegistry
public class ObjectFactory {
/**
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: ojekonlinews.profile
*
*/
public ObjectFactory() {
}
/**
* Create an instance of {@link Profile }
*
*/
public Profile createProfile() {
return new Profile();
}
}
package main.OjekOnlineClient.Profile;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for profile complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="profile">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="driver" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
* &lt;element name="email" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;element name="fullname" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;element name="id" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
* &lt;element name="telpon" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;element name="username" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "profile", propOrder = {
"driver",
"email",
"fullname",
"id",
"telpon",
"username"
})
public class Profile {
protected Integer driver;
protected String email;
protected String fullname;
protected Integer id;
protected String telpon;
protected String username;
/**
* Gets the value of the driver property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getDriver() {
return driver;
}
/**
* Sets the value of the driver property.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setDriver(Integer value) {
this.driver = value;
}
/**
* Gets the value of the email property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getEmail() {
return email;
}
/**
* Sets the value of the email property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setEmail(String value) {
this.email = value;
}
/**
* Gets the value of the fullname property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getFullname() {
return fullname;
}
/**
* Sets the value of the fullname property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setFullname(String value) {
this.fullname = value;
}
/**
* Gets the value of the id property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setId(Integer value) {
this.id = value;
}
/**
* Gets the value of the telpon property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getTelpon() {
return telpon;
}
/**
* Sets the value of the telpon property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTelpon(String value) {
this.telpon = value;
}
/**
* Gets the value of the username property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getUsername() {
return username;
}
/**
* Sets the value of the username property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setUsername(String value) {
this.username = value;
}
}
package main.OjekOnlineClient.Profile;
public class ProfileClient {
public static void main(String[] args) {
ProfileServiceImplService psis = new ProfileServiceImplService();
ProfileService ps = psis.getProfileServiceImplPort();
System.out.println(ps.getProfileById(1).getFullname());
}
}
package main.OjekOnlineClient.Profile;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.ws.Action;
/**
* This class was generated by the JAX-WS RI.
* JAX-WS RI 2.2.9-b130926.1035
* Generated source version: 2.2
*
*/
@WebService(name = "ProfileService", targetNamespace = "http://Profile.OjekOnlineWS/")
@SOAPBinding(style = SOAPBinding.Style.RPC)
@XmlSeeAlso({
ObjectFactory.class
})
public interface ProfileService {
/**
*
* @param arg0
* @return
* returns ojekonlinews.profile.Profile
*/
@WebMethod
@WebResult(partName = "return")
@Action(input = "http://Profile.OjekOnlineWS/ProfileService/getProfileByIdRequest", output = "http://Profile.OjekOnlineWS/ProfileService/getProfileByIdResponse")
public Profile getProfileById(
@WebParam(name = "arg0", partName = "arg0")
int arg0);
}
package main.OjekOnlineClient.Profile;
import java.net.MalformedURLException;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceException;
import javax.xml.ws.WebServiceFeature;
/**
* This class was generated by the JAX-WS RI.
* JAX-WS RI 2.2.9-b130926.1035
* Generated source version: 2.2
*
*/
@WebServiceClient(name = "ProfileServiceImplService", targetNamespace = "http://Profile.OjekOnlineWS/", wsdlLocation = "http://localhost:8080/data/employee?wsdl")
public class ProfileServiceImplService
extends Service
{
private final static URL PROFILESERVICEIMPLSERVICE_WSDL_LOCATION;
private final static WebServiceException PROFILESERVICEIMPLSERVICE_EXCEPTION;
private final static QName PROFILESERVICEIMPLSERVICE_QNAME = new QName("http://Profile.OjekOnlineWS/", "ProfileServiceImplService");
static {
URL url = null;
WebServiceException e = null;
try {
url = new URL("http://localhost:8080/data/employee?wsdl");
} catch (MalformedURLException ex) {
e = new WebServiceException(ex);
}
PROFILESERVICEIMPLSERVICE_WSDL_LOCATION = url;
PROFILESERVICEIMPLSERVICE_EXCEPTION = e;
}
public ProfileServiceImplService() {
super(__getWsdlLocation(), PROFILESERVICEIMPLSERVICE_QNAME);
}
public ProfileServiceImplService(WebServiceFeature... features) {
super(__getWsdlLocation(), PROFILESERVICEIMPLSERVICE_QNAME, features);
}
public ProfileServiceImplService(URL wsdlLocation) {
super(wsdlLocation, PROFILESERVICEIMPLSERVICE_QNAME);
}
public ProfileServiceImplService(URL wsdlLocation, WebServiceFeature... features) {
super(wsdlLocation, PROFILESERVICEIMPLSERVICE_QNAME, features);
}
public ProfileServiceImplService(URL wsdlLocation, QName serviceName) {
super(wsdlLocation, serviceName);
}
public ProfileServiceImplService(URL wsdlLocation, QName serviceName, WebServiceFeature... features) {
super(wsdlLocation, serviceName, features);
}
/**
*
* @return
* returns ProfileService
*/
@WebEndpoint(name = "ProfileServiceImplPort")
public ProfileService getProfileServiceImplPort() {
return super.getPort(new QName("http://Profile.OjekOnlineWS/", "ProfileServiceImplPort"), ProfileService.class);
}
/**
*
* @param features
* A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
* @return
* returns ProfileService
*/
@WebEndpoint(name = "ProfileServiceImplPort")
public ProfileService getProfileServiceImplPort(WebServiceFeature... features) {
return super.getPort(new QName("http://Profile.OjekOnlineWS/", "ProfileServiceImplPort"), ProfileService.class, features);
}
private static URL __getWsdlLocation() {
if (PROFILESERVICEIMPLSERVICE_EXCEPTION!= null) {
throw PROFILESERVICEIMPLSERVICE_EXCEPTION;
}
return PROFILESERVICEIMPLSERVICE_WSDL_LOCATION;
}
}
@javax.xml.bind.annotation.XmlSchema(namespace = "http://Profile.OjekOnlineWS/")
package main.OjekOnlineClient.Profile;
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