package com.rms.tfc.types;

public class AlmacenWSProxy implements AlmacenWS_PortType {
  private String _endpoint = null;
  private AlmacenWS_PortType almacenWS_PortType = null;
  
  public AlmacenWSProxy() {
    _initAlmacenWSProxy();
  }
  
  public AlmacenWSProxy(String endpoint) {
    _endpoint = endpoint;
    _initAlmacenWSProxy();
  }
  
  private void _initAlmacenWSProxy() {
    try {
      almacenWS_PortType = (new AlmacenWS_ServiceLocator()).getAlmacenWSSOAP();
      if (almacenWS_PortType != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)almacenWS_PortType)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)almacenWS_PortType)._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 (almacenWS_PortType != null)
      ((javax.xml.rpc.Stub)almacenWS_PortType)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public AlmacenWS_PortType getAlmacenWS_PortType() {
    if (almacenWS_PortType == null)
      _initAlmacenWSProxy();
    return almacenWS_PortType;
  }
  
  public java.lang.String newPedido(java.lang.String idTienda, java.lang.String descripcion, java.lang.String idPedidoExterno, LineaType[] lineas) throws java.rmi.RemoteException{
    if (almacenWS_PortType == null)
      _initAlmacenWSProxy();
    return almacenWS_PortType.newPedido(idTienda, descripcion, idPedidoExterno, lineas);
  }
  
  public java.lang.String recepcionPedido(java.lang.String idTienda, java.lang.String idPedidoExterno, LineaRecepcionType[] lineas) throws java.rmi.RemoteException{
    if (almacenWS_PortType == null)
      _initAlmacenWSProxy();
    return almacenWS_PortType.recepcionPedido(idTienda, idPedidoExterno, lineas);
  }
}