MQClientSoapProxy.bak 1.8 KB
package tempuri;

public class MQClientSoapProxy implements tempuri.MQClientSoap {
  private String _endpoint = null;
  private tempuri.MQClientSoap mQClientSoap = null;
  
  public MQClientSoapProxy() {
    _initMQClientSoapProxy();
  }
  
  public MQClientSoapProxy(String endpoint) {
    _endpoint = endpoint;
    _initMQClientSoapProxy();
  }
  
  private void _initMQClientSoapProxy() {
    try {
      mQClientSoap = (new tempuri.MQClientLocator()).getMQClientSoap();
      if (mQClientSoap != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)mQClientSoap)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)mQClientSoap)._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 (mQClientSoap != null)
      ((javax.xml.rpc.Stub)mQClientSoap)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public tempuri.MQClientSoap getMQClientSoap() {
    if (mQClientSoap == null)
      _initMQClientSoapProxy();
    return mQClientSoap;
  }
  
  public boolean sendMessage(java.lang.String msgLabel, java.lang.String msgBody) throws java.rmi.RemoteException{
    if (mQClientSoap == null)
      _initMQClientSoapProxy();
    return mQClientSoap.sendMessage(msgLabel, msgBody);
  }
  
  public java.lang.String receiveMessage() throws java.rmi.RemoteException{
    if (mQClientSoap == null)
      _initMQClientSoapProxy();
    return mQClientSoap.receiveMessage();
  }
  
  
}