OCT
REM: 1. 调试修改检测对象接口 2. 对应修改检测对象名、检测IP、IP类型和清洗类型 出参为状态码和结果描述
This commit is contained in:
parent
48b6ec0e50
commit
c588e25344
|
@ -0,0 +1,48 @@
|
|||
package com.cmcc.hy.phoenix.dptech;
|
||||
|
||||
public class TestaddDetectionObjectForUMC {
|
||||
public static void main(String[] args) {
|
||||
try{
|
||||
org.apache.axis2.transport.http.impl.httpclient4.HttpTransportPropertiesImpl.Authenticator basicAuthentication =
|
||||
new org.apache.axis2.transport.http.impl.httpclient4.HttpTransportPropertiesImpl.Authenticator();
|
||||
|
||||
basicAuthentication.setUsername("admin");
|
||||
basicAuthentication.setPassword("UMCAdministrator");
|
||||
|
||||
AbnormalFlowCleaningServiceStub stub = new AbnormalFlowCleaningServiceStub();
|
||||
/*
|
||||
添加对象,为自定义检测IP网段添加指定名称的检测对象
|
||||
detectionDevices:检测设备列表
|
||||
cleaningDevices:清洗设备列表
|
||||
detectionName:检测对象名称
|
||||
ipSegment:检测IP段
|
||||
ipType:IP类型(v4:0;v6:1)
|
||||
cleaningType:清洗类型(Probe自动:3;Probe手动:4;第三方自动:1;第三方手动:2)
|
||||
*/
|
||||
AbnormalFlowCleaningServiceStub.AddDetectionObjectForUMC AddDO = new AbnormalFlowCleaningServiceStub.AddDetectionObjectForUMC();
|
||||
AddDO.setDetectionDevices("192.168.1.1");
|
||||
AddDO.setCleaningDevices("10.88.76.41");
|
||||
AddDO.setDetectionName("4");
|
||||
AddDO.setIpSegment("10.88.78.20-10.88.78.22");
|
||||
AddDO.setIpType(0);
|
||||
AddDO.setCleaningType(3);
|
||||
stub._getServiceClient().getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE);
|
||||
stub._getServiceClient().getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE, basicAuthentication);
|
||||
|
||||
/*
|
||||
获取添加对象的response
|
||||
resultReVal:返回状态码
|
||||
ResultInfo:请求执行结果描述
|
||||
*/
|
||||
AbnormalFlowCleaningServiceStub.AddDetectionObjectForUMCResponse AddDOresp = stub.addDetectionObjectForUMC(AddDO);
|
||||
|
||||
System.out.println("ResultInfo: " + AddDOresp.localOut.getResultInfo());
|
||||
System.out.println("resultReVal: " + AddDOresp.localOut.getResultRetVal());
|
||||
|
||||
} catch (org.apache.axis2.AxisFault ex) {
|
||||
System.out.println(ex.toString());
|
||||
} catch (java.rmi.RemoteException ex2) {
|
||||
System.out.println(ex2.toString());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
package com.cmcc.hy.phoenix.dptech;
|
||||
|
||||
public class TestmodifyDetectionObjectForUMC {
|
||||
public static void main(String[] args) {
|
||||
try{
|
||||
org.apache.axis2.transport.http.impl.httpclient4.HttpTransportPropertiesImpl.Authenticator basicAuthentication =
|
||||
new org.apache.axis2.transport.http.impl.httpclient4.HttpTransportPropertiesImpl.Authenticator();
|
||||
|
||||
basicAuthentication.setUsername("admin");
|
||||
basicAuthentication.setPassword("UMCAdministrator");
|
||||
|
||||
AbnormalFlowCleaningServiceStub stub = new AbnormalFlowCleaningServiceStub();
|
||||
/*
|
||||
修改检测对象,将指定名称的检测对象中的检测IP段更新为新的检测IP网段
|
||||
detectionName:检测对象名称
|
||||
ipSegment:检测IP段
|
||||
ipType:IP类型(v4:0;v6:1)
|
||||
cleaningType:清洗类型(Probe自动:3;Probe手动:4;第三方自动:1;第三方手动:2)
|
||||
*/
|
||||
AbnormalFlowCleaningServiceStub.ModifyDetectionObjectForUMC ModDO = new AbnormalFlowCleaningServiceStub.ModifyDetectionObjectForUMC();
|
||||
ModDO.setDetectionName("4");
|
||||
ModDO.setIpSegment("10.88.78.120-10.88.78.125");
|
||||
ModDO.setIpType(0);
|
||||
ModDO.setCleaningType(4);
|
||||
stub._getServiceClient().getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE);
|
||||
stub._getServiceClient().getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE, basicAuthentication);
|
||||
|
||||
/*
|
||||
获取修改对象的response
|
||||
resultReVal:返回状态码
|
||||
ResultInfo:请求执行结果描述
|
||||
*/
|
||||
AbnormalFlowCleaningServiceStub.ModifyDetectionObjectForUMCResponse ModDOresp = stub.modifyDetectionObjectForUMC(ModDO);
|
||||
|
||||
System.out.println("ResultInfo: " + ModDOresp.localOut.getResultInfo());
|
||||
System.out.println("resultReVal: " + ModDOresp.localOut.getResultRetVal());
|
||||
|
||||
} catch (org.apache.axis2.AxisFault ex) {
|
||||
System.out.println(ex.toString());
|
||||
} catch (java.rmi.RemoteException ex2) {
|
||||
System.out.println(ex2.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue