import
agentTesting.*;
/**
This
example code is used to fill an ActionArgument
ASN.1 Java object.
*/
public class example1 {
public JAsn1Obj buildRequest()
{
Oid meOidP = GlobalOidCollection.emsOidP;
Oid meIdOidP = GlobalOidCollection.emsIdOidP;
NameType meIdObjP = new NameType();
meIdObjP.set_pString();
String emsIdVal = System.getProperty("emsId", "DefaultEMSId");
meIdObjP.pString.set_val(emsIdVal);
ActionArgument objP = new ActionArgument();
/**
Build the ActionArgument here.
*/
objP.baseManagedObjectClass.set_globalForm(meOidP);
objP.baseManagedObjectInstance.opt_set(true);
DistinguishedName dnObj = new DistinguishedName();
dnObj.setCnt(1);
dnObj.getValAt(0).setCnt(1);
dnObj.getValAt(0).getValAt(0).attributeType.set_val(meIdOidP.get_val());
dnObj.getValAt(0).getValAt(0).get_attributeValue().attach(meIdObjP);
objP.baseManagedObjectInstance.set_distinguishedName(dnObj);
objP.scope.set_level();
objP.scope.level.set_val(0);
NewNEInformation neInfo = new NewNEInformation();
neInfo.newNE.opt_set(true);
neInfo.newNE.set_val("ne1:14010");
neInfo.managedEntityName.opt_set(true);
neInfo.managedEntityName.set_val("NE1_ME");
neInfo.controllerName.opt_set(true);
neInfo.controllerName.set_val("dc1");
neInfo.ipAddress.opt_set(true);
neInfo.ipAddress.set_val("170.170.170.1");
objP.actionInfo.actionType.set_globalForm();
objP.actionInfo.actionType.globalForm.set_val(GlobalOidCollection.newNEOidP.get_val());
objP.actionInfo.actionInfoArg.opt_set(true);
objP.actionInfo.actionInfoArg.attach(neInfo);
System.out.println(objP);
return objP;
}
} // end class example1 |