package examples.mega.client;

import java.rmi.RemoteException;

public class Headers{

  public void invoke( MegaPort port ) throws RemoteException,
      InvokeFailedException {

    BaseData headerData = DataTypes.getBaseData();

    String newAddress = "This is the new address";
    int newId = 1001;

    BaseData data = port.methodWithHeaders(  newId, newAddress, headerData );

    if( !(newAddress.equals( data.getAddress() ) ||
        newId == data.getId()) ){

      throw new InvokeFailedException( "methodWithHeaders" );
    }
    
  }
}

