package weaver.interfaces.htsc.cus.webservices;

public class ImageServiceSoapProxy implements ImageServiceSoap {
  private String _endpoint = null;
  private ImageServiceSoap imageServiceSoap = null;
  
  public ImageServiceSoapProxy() {
    _initImageServiceSoapProxy();
  }
  
  public ImageServiceSoapProxy(String endpoint) {
    _endpoint = endpoint;
    _initImageServiceSoapProxy();
  }
  
  private void _initImageServiceSoapProxy() {
    try {
      imageServiceSoap = (new ImageServiceLocator()).getImageServiceSoap();
      if (imageServiceSoap != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)imageServiceSoap)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)imageServiceSoap)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (imageServiceSoap != null)
      ((javax.xml.rpc.Stub)imageServiceSoap)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public ImageServiceSoap getImageServiceSoap() {
    if (imageServiceSoap == null)
      _initImageServiceSoapProxy();
    return imageServiceSoap;
  }
  
  public String sendImageOnPC(UploadfileEntity uploadfileEntityr) throws java.rmi.RemoteException{
    if (imageServiceSoap == null)
      _initImageServiceSoapProxy();
    return imageServiceSoap.sendImageOnPC(uploadfileEntityr);
  }
  
  
}