parent
8a6eb66f48
commit
b72e051620
14
data-pom.xml
14
data-pom.xml
|
@ -201,16 +201,14 @@
|
|||
<version>1.7.9</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.axis2</groupId>
|
||||
<artifactId>axis2-transport-local</artifactId>
|
||||
<version>1.7.9</version>
|
||||
<scope>runtime</scope>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-spring-boot-starter-jaxws</artifactId>
|
||||
<version>3.3.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.axis2</groupId>
|
||||
<artifactId>axis2-transport-http</artifactId>
|
||||
<version>1.7.9</version>
|
||||
<scope>runtime</scope>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-ws-security</artifactId>
|
||||
<version>3.3.6</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -9,9 +9,6 @@ import com.cmcc.hy.phoenix.vo.ProtocolResp;
|
|||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import lombok.Builder;
|
||||
import org.apache.axis2.databinding.utils.BeanUtil;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,35 +1,35 @@
|
|||
package com.cmcc.hy.phoenix.dptech;
|
||||
|
||||
public class TestInterface {
|
||||
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();
|
||||
AbnormalFlowCleaningServiceStub.GetAllDetectionObjectFromUMC getUMC = new AbnormalFlowCleaningServiceStub.GetAllDetectionObjectFromUMC();
|
||||
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);
|
||||
|
||||
|
||||
AbnormalFlowCleaningServiceStub.GetAllDetectionObjectFromUMCResponse resp = stub.getAllDetectionObjectFromUMC(getUMC);
|
||||
|
||||
for(AbnormalFlowCleaningServiceStub.DetectionObjectDataForService v : resp.localOut.getDetectionObjectDataForService()) {
|
||||
System.out.println("detectionDevices: " + v.localDetectionDevices);
|
||||
System.out.println("cleaningDevices: " + v.localCleaningDevices);
|
||||
System.out.println("detectionName: " + v.localDetectionName);
|
||||
System.out.println("ipSegment: " + v.localIpSegment);
|
||||
System.out.println("ipType: " + v.localIpType);
|
||||
System.out.println("cleaningType: " + v.localCleaningType);
|
||||
}
|
||||
|
||||
} catch (org.apache.axis2.AxisFault ex) {
|
||||
System.out.println(ex.toString());
|
||||
} catch (java.rmi.RemoteException ex2) {
|
||||
System.out.println(ex2.toString());
|
||||
}
|
||||
}
|
||||
// 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();
|
||||
// AbnormalFlowCleaningServiceStub.GetAllDetectionObjectFromUMC getUMC = new AbnormalFlowCleaningServiceStub.GetAllDetectionObjectFromUMC();
|
||||
// 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);
|
||||
//
|
||||
//
|
||||
// AbnormalFlowCleaningServiceStub.GetAllDetectionObjectFromUMCResponse resp = stub.getAllDetectionObjectFromUMC(getUMC);
|
||||
//
|
||||
// for(AbnormalFlowCleaningServiceStub.DetectionObjectDataForService v : resp.localOut.getDetectionObjectDataForService()) {
|
||||
// System.out.println("detectionDevices: " + v.localDetectionDevices);
|
||||
// System.out.println("cleaningDevices: " + v.localCleaningDevices);
|
||||
// System.out.println("detectionName: " + v.localDetectionName);
|
||||
// System.out.println("ipSegment: " + v.localIpSegment);
|
||||
// System.out.println("ipType: " + v.localIpType);
|
||||
// System.out.println("cleaningType: " + v.localCleaningType);
|
||||
// }
|
||||
//
|
||||
// } catch (org.apache.axis2.AxisFault ex) {
|
||||
// System.out.println(ex.toString());
|
||||
// } catch (java.rmi.RemoteException ex2) {
|
||||
// System.out.println(ex2.toString());
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -4,46 +4,46 @@ import java.rmi.RemoteException;
|
|||
|
||||
public class TestaddBypassManualTractionStrategyForUMC {
|
||||
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段的旁路手动牵引策略配置信息
|
||||
输入参数:
|
||||
policyName 旁路手动牵引策略名称
|
||||
protectName 防护对象名称。
|
||||
ipRange 保护IP段。临时仅支持单个IP段,且仅支持IP-IP形式。
|
||||
*/
|
||||
AbnormalFlowCleaningServiceStub.AddBypassManualTractionStrategyForUMC addBypass;
|
||||
addBypass = new AbnormalFlowCleaningServiceStub.AddBypassManualTractionStrategyForUMC();
|
||||
String policyName = "2";
|
||||
String protectName = "23";
|
||||
String ipRange = "192.168.4.2-192.168.4.5";
|
||||
addBypass.setPolicyName(policyName);
|
||||
addBypass.setProtectName(protectName);
|
||||
addBypass.setIpRange(ipRange);
|
||||
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信息
|
||||
输出参数:
|
||||
resultRetVal 返回状态码。
|
||||
resultInfo 请求执行结果描述。
|
||||
执行成功NtcRequestResultInfo类的resultRetVal属性值为0。
|
||||
执行失败NtcRequestResultInfo类的resultRetVal属性值为非0。可获取resultInfo属性值查看失败提示信息。
|
||||
*/
|
||||
AbnormalFlowCleaningServiceStub.AddBypassManualTractionStrategyForUMCResponse respaddByss;
|
||||
respaddByss = stub.addBypassManualTractionStrategyForUMC(addBypass);
|
||||
System.out.println("ResultInfo: " + respaddByss.localOut.getResultInfo());
|
||||
System.out.println("resultReVal: " + respaddByss.localOut.getResultRetVal());
|
||||
} catch (RemoteException ex) {
|
||||
System.out.println(ex.toString());
|
||||
}
|
||||
// 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段的旁路手动牵引策略配置信息
|
||||
// 输入参数:
|
||||
// policyName 旁路手动牵引策略名称
|
||||
// protectName 防护对象名称。
|
||||
// ipRange 保护IP段。临时仅支持单个IP段,且仅支持IP-IP形式。
|
||||
// */
|
||||
// AbnormalFlowCleaningServiceStub.AddBypassManualTractionStrategyForUMC addBypass;
|
||||
// addBypass = new AbnormalFlowCleaningServiceStub.AddBypassManualTractionStrategyForUMC();
|
||||
// String policyName = "2";
|
||||
// String protectName = "23";
|
||||
// String ipRange = "192.168.4.2-192.168.4.5";
|
||||
// addBypass.setPolicyName(policyName);
|
||||
// addBypass.setProtectName(protectName);
|
||||
// addBypass.setIpRange(ipRange);
|
||||
// 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信息
|
||||
// 输出参数:
|
||||
// resultRetVal 返回状态码。
|
||||
// resultInfo 请求执行结果描述。
|
||||
// 执行成功NtcRequestResultInfo类的resultRetVal属性值为0。
|
||||
// 执行失败NtcRequestResultInfo类的resultRetVal属性值为非0。可获取resultInfo属性值查看失败提示信息。
|
||||
// */
|
||||
// AbnormalFlowCleaningServiceStub.AddBypassManualTractionStrategyForUMCResponse respaddByss;
|
||||
// respaddByss = stub.addBypassManualTractionStrategyForUMC(addBypass);
|
||||
// System.out.println("ResultInfo: " + respaddByss.localOut.getResultInfo());
|
||||
// System.out.println("resultReVal: " + respaddByss.localOut.getResultRetVal());
|
||||
// } catch (RemoteException ex) {
|
||||
// System.out.println(ex.toString());
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,47 +2,47 @@ 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());
|
||||
}
|
||||
// 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());
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,40 +4,40 @@ import java.rmi.RemoteException;
|
|||
|
||||
public class TestdelBypassManualTractionStrategyForUMC {
|
||||
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();
|
||||
/*
|
||||
删除指定名称的旁路手动牵引策略
|
||||
输入参数:
|
||||
policyName 旁路手动牵引策略名称
|
||||
*/
|
||||
AbnormalFlowCleaningServiceStub.DelBypassManualTractionStrategyForUMC delBypass;
|
||||
delBypass = new AbnormalFlowCleaningServiceStub.DelBypassManualTractionStrategyForUMC();
|
||||
String policyName = "2";
|
||||
delBypass.setPolicyName(policyName);
|
||||
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信息
|
||||
输出参数:
|
||||
resultRetVal 返回状态码。
|
||||
resultInfo 请求执行结果描述。
|
||||
执行成功NtcRequestResultInfo类的resultRetVal属性值为0。
|
||||
执行失败NtcRequestResultInfo类的resultRetVal属性值为非0。可获取resultInfo属性值查看失败提示信息。
|
||||
*/
|
||||
AbnormalFlowCleaningServiceStub.DelBypassManualTractionStrategyForUMCResponse respdelBypass;
|
||||
respdelBypass = stub.delBypassManualTractionStrategyForUMC(delBypass);
|
||||
System.out.println("ResultInfo: " + respdelBypass.localOut.getResultInfo());
|
||||
System.out.println("resultReVal: " + respdelBypass.localOut.getResultRetVal());
|
||||
} catch (RemoteException ex) {
|
||||
System.out.println(ex.toString());
|
||||
}
|
||||
// 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();
|
||||
// /*
|
||||
// 删除指定名称的旁路手动牵引策略
|
||||
// 输入参数:
|
||||
// policyName 旁路手动牵引策略名称
|
||||
// */
|
||||
// AbnormalFlowCleaningServiceStub.DelBypassManualTractionStrategyForUMC delBypass;
|
||||
// delBypass = new AbnormalFlowCleaningServiceStub.DelBypassManualTractionStrategyForUMC();
|
||||
// String policyName = "2";
|
||||
// delBypass.setPolicyName(policyName);
|
||||
// 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信息
|
||||
// 输出参数:
|
||||
// resultRetVal 返回状态码。
|
||||
// resultInfo 请求执行结果描述。
|
||||
// 执行成功NtcRequestResultInfo类的resultRetVal属性值为0。
|
||||
// 执行失败NtcRequestResultInfo类的resultRetVal属性值为非0。可获取resultInfo属性值查看失败提示信息。
|
||||
// */
|
||||
// AbnormalFlowCleaningServiceStub.DelBypassManualTractionStrategyForUMCResponse respdelBypass;
|
||||
// respdelBypass = stub.delBypassManualTractionStrategyForUMC(delBypass);
|
||||
// System.out.println("ResultInfo: " + respdelBypass.localOut.getResultInfo());
|
||||
// System.out.println("resultReVal: " + respdelBypass.localOut.getResultRetVal());
|
||||
// } catch (RemoteException ex) {
|
||||
// System.out.println(ex.toString());
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,38 +2,38 @@ package com.cmcc.hy.phoenix.dptech;
|
|||
|
||||
public class TestdeleteDetectionObjectForUMC {
|
||||
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();
|
||||
/*
|
||||
删除检测对象,删除指定名称的检测对象
|
||||
detectionName:检测对象名称
|
||||
*/
|
||||
AbnormalFlowCleaningServiceStub.DeleteDetectionObjectForUMC DelDO = new AbnormalFlowCleaningServiceStub.DeleteDetectionObjectForUMC();
|
||||
DelDO.setDetectionName("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.DeleteDetectionObjectForUMCResponse DelDOresp = stub.deleteDetectionObjectForUMC(DelDO);
|
||||
|
||||
System.out.println("ResultInfo: " + DelDOresp.localOut.getResultInfo());
|
||||
System.out.println("resultReVal: " + DelDOresp.localOut.getResultRetVal());
|
||||
|
||||
} catch (org.apache.axis2.AxisFault ex) {
|
||||
System.out.println(ex.toString());
|
||||
} catch (java.rmi.RemoteException ex2) {
|
||||
System.out.println(ex2.toString());
|
||||
}
|
||||
// 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();
|
||||
// /*
|
||||
// 删除检测对象,删除指定名称的检测对象
|
||||
// detectionName:检测对象名称
|
||||
// */
|
||||
// AbnormalFlowCleaningServiceStub.DeleteDetectionObjectForUMC DelDO = new AbnormalFlowCleaningServiceStub.DeleteDetectionObjectForUMC();
|
||||
// DelDO.setDetectionName("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.DeleteDetectionObjectForUMCResponse DelDOresp = stub.deleteDetectionObjectForUMC(DelDO);
|
||||
//
|
||||
// System.out.println("ResultInfo: " + DelDOresp.localOut.getResultInfo());
|
||||
// System.out.println("resultReVal: " + DelDOresp.localOut.getResultRetVal());
|
||||
//
|
||||
// } catch (org.apache.axis2.AxisFault ex) {
|
||||
// System.out.println(ex.toString());
|
||||
// } catch (java.rmi.RemoteException ex2) {
|
||||
// System.out.println(ex2.toString());
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,49 +1,49 @@
|
|||
package com.cmcc.hy.phoenix.dptech;
|
||||
|
||||
import org.apache.axis2.transport.http.HTTPConstants;
|
||||
|
||||
import java.rmi.RemoteException;
|
||||
|
||||
|
||||
public class TestdisableProtectionStrategyTemplateForUMC {
|
||||
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();
|
||||
/*
|
||||
为指定防护对象解除指定的防护策略模板
|
||||
输入参数:
|
||||
protectName 防护对象名称
|
||||
templateName 防护策略模板名称
|
||||
*/
|
||||
AbnormalFlowCleaningServiceStub.DisableProtectionStrategyTemplateForUMC disable_temp;
|
||||
disable_temp = new AbnormalFlowCleaningServiceStub.DisableProtectionStrategyTemplateForUMC();
|
||||
String protectName = "23"; //目前已配置的防护对象名称有两个:10,23
|
||||
String templateName = "Game_Server_10G";
|
||||
disable_temp.setProtectName(protectName);
|
||||
disable_temp.setTemplateName(templateName);
|
||||
stub._getServiceClient().getOptions().setProperty(HTTPConstants.CHUNKED, Boolean.FALSE);
|
||||
stub._getServiceClient().getOptions().setProperty(HTTPConstants.AUTHENTICATE, basicAuthentication);
|
||||
|
||||
/*
|
||||
response:
|
||||
输出参数:NtcRequestResultInfo类 该类为UMC封装请求返回状态信息类。
|
||||
NtcRequestResultInfo类的属性信息如下:
|
||||
resultRetVal 返回状态码
|
||||
resultInfo 请求执行结果描述
|
||||
*/
|
||||
AbnormalFlowCleaningServiceStub.DisableProtectionStrategyTemplateForUMCResponse resp_disable_temp;
|
||||
resp_disable_temp = stub.disableProtectionStrategyTemplateForUMC(disable_temp);
|
||||
System.out.println("ResultInfo: " + resp_disable_temp.localOut.getResultInfo());
|
||||
System.out.println("resultReVal: " + resp_disable_temp.localOut.getResultRetVal());
|
||||
} catch (RemoteException ex) {
|
||||
System.out.println(ex.toString());
|
||||
}
|
||||
// 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();
|
||||
// /*
|
||||
// 为指定防护对象解除指定的防护策略模板
|
||||
// 输入参数:
|
||||
// protectName 防护对象名称
|
||||
// templateName 防护策略模板名称
|
||||
// */
|
||||
// AbnormalFlowCleaningServiceStub.DisableProtectionStrategyTemplateForUMC disable_temp;
|
||||
// disable_temp = new AbnormalFlowCleaningServiceStub.DisableProtectionStrategyTemplateForUMC();
|
||||
// String protectName = "23"; //目前已配置的防护对象名称有两个:10,23
|
||||
// String templateName = "Game_Server_10G";
|
||||
// disable_temp.setProtectName(protectName);
|
||||
// disable_temp.setTemplateName(templateName);
|
||||
// stub._getServiceClient().getOptions().setProperty(HTTPConstants.CHUNKED, Boolean.FALSE);
|
||||
// stub._getServiceClient().getOptions().setProperty(HTTPConstants.AUTHENTICATE, basicAuthentication);
|
||||
//
|
||||
// /*
|
||||
// response:
|
||||
// 输出参数:NtcRequestResultInfo类 该类为UMC封装请求返回状态信息类。
|
||||
// NtcRequestResultInfo类的属性信息如下:
|
||||
// resultRetVal 返回状态码
|
||||
// resultInfo 请求执行结果描述
|
||||
// */
|
||||
// AbnormalFlowCleaningServiceStub.DisableProtectionStrategyTemplateForUMCResponse resp_disable_temp;
|
||||
// resp_disable_temp = stub.disableProtectionStrategyTemplateForUMC(disable_temp);
|
||||
// System.out.println("ResultInfo: " + resp_disable_temp.localOut.getResultInfo());
|
||||
// System.out.println("resultReVal: " + resp_disable_temp.localOut.getResultRetVal());
|
||||
// } catch (RemoteException ex) {
|
||||
// System.out.println(ex.toString());
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,45 +4,45 @@ import java.rmi.RemoteException;
|
|||
|
||||
public class TestgetAllBypassManualTractionStrategyFromUMC {
|
||||
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();
|
||||
/*
|
||||
获取UMC已配置的全部旁路手动牵引策略信息
|
||||
输入参数:无
|
||||
*/
|
||||
AbnormalFlowCleaningServiceStub.GetAllBypassManualTractionStrategyFromUMC getBypass;
|
||||
getBypass = new AbnormalFlowCleaningServiceStub.GetAllBypassManualTractionStrategyFromUMC();
|
||||
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:
|
||||
输出参数:数组形式
|
||||
policyName 策略名称。
|
||||
protectName 防护对象名称。
|
||||
ipRange 保护IP段。临时仅支持单个IP段,且仅支持IP-IP形式。
|
||||
Enabled 是否启动。启动:true;停止:false。
|
||||
*/
|
||||
AbnormalFlowCleaningServiceStub.GetAllBypassManualTractionStrategyFromUMCResponse respallBypass;
|
||||
respallBypass = stub.getAllBypassManualTractionStrategyFromUMC(getBypass);
|
||||
try {
|
||||
for (AbnormalFlowCleaningServiceStub.BypassManualTractionStrategyForService v : respallBypass.localOut.getBypassManualTractionStrategyForService()) {
|
||||
System.out.println("policyName: " + v.localPolicyName);
|
||||
System.out.println("protectName: " + v.localProtectName);
|
||||
System.out.println("ipRange: " + v.localIpRange);
|
||||
System.out.println("Enabled: " + v.localEnabled);
|
||||
}
|
||||
}catch(NullPointerException ex){
|
||||
System.out.println(ex.toString());
|
||||
}
|
||||
} catch (RemoteException ex) {
|
||||
System.out.println(ex.toString());
|
||||
}
|
||||
// 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();
|
||||
// /*
|
||||
// 获取UMC已配置的全部旁路手动牵引策略信息
|
||||
// 输入参数:无
|
||||
// */
|
||||
// AbnormalFlowCleaningServiceStub.GetAllBypassManualTractionStrategyFromUMC getBypass;
|
||||
// getBypass = new AbnormalFlowCleaningServiceStub.GetAllBypassManualTractionStrategyFromUMC();
|
||||
// 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:
|
||||
// 输出参数:数组形式
|
||||
// policyName 策略名称。
|
||||
// protectName 防护对象名称。
|
||||
// ipRange 保护IP段。临时仅支持单个IP段,且仅支持IP-IP形式。
|
||||
// Enabled 是否启动。启动:true;停止:false。
|
||||
// */
|
||||
// AbnormalFlowCleaningServiceStub.GetAllBypassManualTractionStrategyFromUMCResponse respallBypass;
|
||||
// respallBypass = stub.getAllBypassManualTractionStrategyFromUMC(getBypass);
|
||||
// try {
|
||||
// for (AbnormalFlowCleaningServiceStub.BypassManualTractionStrategyForService v : respallBypass.localOut.getBypassManualTractionStrategyForService()) {
|
||||
// System.out.println("policyName: " + v.localPolicyName);
|
||||
// System.out.println("protectName: " + v.localProtectName);
|
||||
// System.out.println("ipRange: " + v.localIpRange);
|
||||
// System.out.println("Enabled: " + v.localEnabled);
|
||||
// }
|
||||
// }catch(NullPointerException ex){
|
||||
// System.out.println(ex.toString());
|
||||
// }
|
||||
// } catch (RemoteException ex) {
|
||||
// System.out.println(ex.toString());
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,46 +4,46 @@ import java.rmi.RemoteException;
|
|||
|
||||
public class TestgetAllProtectionStrategyTemplateFromUMC {
|
||||
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();
|
||||
/*
|
||||
获取UMC已配置的全部可用防护策略模板信息及防护策略模板描述
|
||||
输入参数:无
|
||||
*/
|
||||
AbnormalFlowCleaningServiceStub.GetAllProtectionStrategyTemplateFromUMC getProStrategy;
|
||||
getProStrategy = new AbnormalFlowCleaningServiceStub.GetAllProtectionStrategyTemplateFromUMC();
|
||||
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:
|
||||
输出参数:ArrayOfProtectionStrategyTemplateForService 该类为防护策略模板的数组
|
||||
ArrayOfProtectionStrategyTemplateForService类为ProtectionStrategyTemplateForService类的数组。
|
||||
ProtectionStrategyTemplateForService类的属性信息如下:
|
||||
name 模板名称
|
||||
description 模板描述
|
||||
*/
|
||||
AbnormalFlowCleaningServiceStub.GetAllProtectionStrategyTemplateFromUMCResponse respProStrategy;
|
||||
respProStrategy = stub.getAllProtectionStrategyTemplateFromUMC(getProStrategy);
|
||||
try {
|
||||
for(AbnormalFlowCleaningServiceStub.ProtectionStrategyTemplateForService p : respProStrategy.localOut.getProtectionStrategyTemplateForService())
|
||||
{
|
||||
System.out.println("name: " + p.localName);
|
||||
//System.out.println("name: " + p.getName());
|
||||
System.out.println("description: " + p.localDescription);
|
||||
//System.out.println("description: " + p.getDescription());
|
||||
}
|
||||
}catch(NullPointerException ex){
|
||||
System.out.println(ex.toString());
|
||||
}
|
||||
} catch (RemoteException ex) {
|
||||
System.out.println(ex.toString());
|
||||
}
|
||||
// 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();
|
||||
// /*
|
||||
// 获取UMC已配置的全部可用防护策略模板信息及防护策略模板描述
|
||||
// 输入参数:无
|
||||
// */
|
||||
// AbnormalFlowCleaningServiceStub.GetAllProtectionStrategyTemplateFromUMC getProStrategy;
|
||||
// getProStrategy = new AbnormalFlowCleaningServiceStub.GetAllProtectionStrategyTemplateFromUMC();
|
||||
// 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:
|
||||
// 输出参数:ArrayOfProtectionStrategyTemplateForService 该类为防护策略模板的数组
|
||||
// ArrayOfProtectionStrategyTemplateForService类为ProtectionStrategyTemplateForService类的数组。
|
||||
// ProtectionStrategyTemplateForService类的属性信息如下:
|
||||
// name 模板名称
|
||||
// description 模板描述
|
||||
// */
|
||||
// AbnormalFlowCleaningServiceStub.GetAllProtectionStrategyTemplateFromUMCResponse respProStrategy;
|
||||
// respProStrategy = stub.getAllProtectionStrategyTemplateFromUMC(getProStrategy);
|
||||
// try {
|
||||
// for(AbnormalFlowCleaningServiceStub.ProtectionStrategyTemplateForService p : respProStrategy.localOut.getProtectionStrategyTemplateForService())
|
||||
// {
|
||||
// System.out.println("name: " + p.localName);
|
||||
// //System.out.println("name: " + p.getName());
|
||||
// System.out.println("description: " + p.localDescription);
|
||||
// //System.out.println("description: " + p.getDescription());
|
||||
// }
|
||||
// }catch(NullPointerException ex){
|
||||
// System.out.println(ex.toString());
|
||||
// }
|
||||
// } catch (RemoteException ex) {
|
||||
// System.out.println(ex.toString());
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,51 +1,48 @@
|
|||
package com.cmcc.hy.phoenix.dptech;
|
||||
|
||||
import org.apache.axis2.transport.http.HTTPConstants;
|
||||
|
||||
import java.rmi.RemoteException;
|
||||
|
||||
public class TestgetAllProtectionTargetWithStrategyAssociationRelationshipForUMC {
|
||||
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();
|
||||
/*
|
||||
获取UMC已配置的全部防护对象同防护策略模板关联关系信息
|
||||
输入参数:无
|
||||
*/
|
||||
AbnormalFlowCleaningServiceStub.GetAllProtectionTargetWithStrategyAssociationRelationshipForUMC getassocrel;
|
||||
getassocrel = new AbnormalFlowCleaningServiceStub.GetAllProtectionTargetWithStrategyAssociationRelationshipForUMC();
|
||||
stub._getServiceClient().getOptions().setProperty(HTTPConstants.CHUNKED, Boolean.FALSE);
|
||||
stub._getServiceClient().getOptions().setProperty(HTTPConstants.AUTHENTICATE, basicAuthentication);
|
||||
|
||||
/*
|
||||
response:
|
||||
输出参数: ArrayOfProtectionTargetWithStrategyForService 该类为防护对象同防护策略模板关联关系的对象数组
|
||||
ArrayOfProtectionTargetWithStrategyForService类为ProtectionTargetWithStrategyForService类的数组。
|
||||
ProtectionTargetWithStrategyForService类的属性信息如下:
|
||||
protectionTargetName 防护对象名称。
|
||||
protectionStrategyName 防护策略模板名称。未关联任何策略模板返回空串
|
||||
*/
|
||||
AbnormalFlowCleaningServiceStub.GetAllProtectionTargetWithStrategyAssociationRelationshipForUMCResponse respassocrel;
|
||||
respassocrel = stub.getAllProtectionTargetWithStrategyAssociationRelationshipForUMC(getassocrel);
|
||||
try {
|
||||
for(AbnormalFlowCleaningServiceStub.ProtectionTargetWithStrategyForService p: respassocrel.localOut.getProtectionTargetWithStrategyForService())
|
||||
{
|
||||
System.out.println("protectionTargetName: " + p.localProtectionTargetName);
|
||||
//System.out.println("protectionTargetName: " + p.getProtectionTargetName());
|
||||
System.out.println("protectionStrategyName: " + p.localProtectionStrategyName);
|
||||
//System.out.println("protectionStrategyName: " + p.getProtectionStrategyName());
|
||||
}
|
||||
}catch(NullPointerException ex){
|
||||
System.out.println(ex.toString());
|
||||
}
|
||||
} catch (RemoteException ex) {
|
||||
System.out.println(ex.toString());
|
||||
}
|
||||
// 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();
|
||||
// /*
|
||||
// 获取UMC已配置的全部防护对象同防护策略模板关联关系信息
|
||||
// 输入参数:无
|
||||
// */
|
||||
// AbnormalFlowCleaningServiceStub.GetAllProtectionTargetWithStrategyAssociationRelationshipForUMC getassocrel;
|
||||
// getassocrel = new AbnormalFlowCleaningServiceStub.GetAllProtectionTargetWithStrategyAssociationRelationshipForUMC();
|
||||
// stub._getServiceClient().getOptions().setProperty(HTTPConstants.CHUNKED, Boolean.FALSE);
|
||||
// stub._getServiceClient().getOptions().setProperty(HTTPConstants.AUTHENTICATE, basicAuthentication);
|
||||
//
|
||||
// /*
|
||||
// response:
|
||||
// 输出参数: ArrayOfProtectionTargetWithStrategyForService 该类为防护对象同防护策略模板关联关系的对象数组
|
||||
// ArrayOfProtectionTargetWithStrategyForService类为ProtectionTargetWithStrategyForService类的数组。
|
||||
// ProtectionTargetWithStrategyForService类的属性信息如下:
|
||||
// protectionTargetName 防护对象名称。
|
||||
// protectionStrategyName 防护策略模板名称。未关联任何策略模板返回空串
|
||||
// */
|
||||
// AbnormalFlowCleaningServiceStub.GetAllProtectionTargetWithStrategyAssociationRelationshipForUMCResponse respassocrel;
|
||||
// respassocrel = stub.getAllProtectionTargetWithStrategyAssociationRelationshipForUMC(getassocrel);
|
||||
// try {
|
||||
// for(AbnormalFlowCleaningServiceStub.ProtectionTargetWithStrategyForService p: respassocrel.localOut.getProtectionTargetWithStrategyForService())
|
||||
// {
|
||||
// System.out.println("protectionTargetName: " + p.localProtectionTargetName);
|
||||
// //System.out.println("protectionTargetName: " + p.getProtectionTargetName());
|
||||
// System.out.println("protectionStrategyName: " + p.localProtectionStrategyName);
|
||||
// //System.out.println("protectionStrategyName: " + p.getProtectionStrategyName());
|
||||
// }
|
||||
// }catch(NullPointerException ex){
|
||||
// System.out.println(ex.toString());
|
||||
// }
|
||||
// } catch (RemoteException ex) {
|
||||
// System.out.println(ex.toString());
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,54 +1,50 @@
|
|||
package com.cmcc.hy.phoenix.dptech;
|
||||
|
||||
import org.apache.axis2.transport.http.HTTPConstants;
|
||||
|
||||
import java.rmi.RemoteException;
|
||||
|
||||
|
||||
public class TestlinkProtectionStrategyTemplateForUMC {
|
||||
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();
|
||||
/*
|
||||
指定防护对象关联防护策略模板,关联后该防护策略模板将对该防护对象生效。
|
||||
输入参数:
|
||||
protectName 防护对象名称
|
||||
templateName 防护策略模板名称
|
||||
*/
|
||||
AbnormalFlowCleaningServiceStub.LinkProtectionStrategyTemplateForUMC link_temp;
|
||||
link_temp = new AbnormalFlowCleaningServiceStub.LinkProtectionStrategyTemplateForUMC();
|
||||
String protectName = "23"; //目前已配置的防护对象名称有两个:10,23
|
||||
/*
|
||||
防护策略模板UMC管理平台已配置
|
||||
模板名如下:Game_Server_10G、Game_Server_1G、DNS_Server_10G、DNS_Server_1G、WEB_Server_10G
|
||||
WEB_Server_1G、General_Server_10G、General_Server_1G、General_Server_100M
|
||||
*/
|
||||
String templateName = "Game_Server_10G";
|
||||
link_temp.setProtectName(protectName);
|
||||
link_temp.setTemplateName(templateName);
|
||||
stub._getServiceClient().getOptions().setProperty(HTTPConstants.CHUNKED, Boolean.FALSE);
|
||||
stub._getServiceClient().getOptions().setProperty(HTTPConstants.AUTHENTICATE, basicAuthentication);
|
||||
|
||||
/*
|
||||
response:
|
||||
输出参数:NtcRequestResultInfo类 该类为UMC封装请求返回状态信息类。
|
||||
NtcRequestResultInfo类的属性信息如下:
|
||||
resultRetVal 返回状态码
|
||||
resultInfo 请求执行结果描述
|
||||
*/
|
||||
AbnormalFlowCleaningServiceStub.LinkProtectionStrategyTemplateForUMCResponse resp_link_temp;
|
||||
resp_link_temp = stub.linkProtectionStrategyTemplateForUMC(link_temp);
|
||||
System.out.println("ResultInfo: " + resp_link_temp.localOut.getResultInfo());
|
||||
System.out.println("resultReVal: " + resp_link_temp.localOut.getResultRetVal());
|
||||
} catch (RemoteException ex) {
|
||||
System.out.println(ex.toString());
|
||||
}
|
||||
// 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();
|
||||
// /*
|
||||
// 指定防护对象关联防护策略模板,关联后该防护策略模板将对该防护对象生效。
|
||||
// 输入参数:
|
||||
// protectName 防护对象名称
|
||||
// templateName 防护策略模板名称
|
||||
// */
|
||||
// AbnormalFlowCleaningServiceStub.LinkProtectionStrategyTemplateForUMC link_temp;
|
||||
// link_temp = new AbnormalFlowCleaningServiceStub.LinkProtectionStrategyTemplateForUMC();
|
||||
// String protectName = "23"; //目前已配置的防护对象名称有两个:10,23
|
||||
// /*
|
||||
// 防护策略模板UMC管理平台已配置
|
||||
// 模板名如下:Game_Server_10G、Game_Server_1G、DNS_Server_10G、DNS_Server_1G、WEB_Server_10G
|
||||
// WEB_Server_1G、General_Server_10G、General_Server_1G、General_Server_100M
|
||||
// */
|
||||
// String templateName = "Game_Server_10G";
|
||||
// link_temp.setProtectName(protectName);
|
||||
// link_temp.setTemplateName(templateName);
|
||||
// stub._getServiceClient().getOptions().setProperty(HTTPConstants.CHUNKED, Boolean.FALSE);
|
||||
// stub._getServiceClient().getOptions().setProperty(HTTPConstants.AUTHENTICATE, basicAuthentication);
|
||||
//
|
||||
// /*
|
||||
// response:
|
||||
// 输出参数:NtcRequestResultInfo类 该类为UMC封装请求返回状态信息类。
|
||||
// NtcRequestResultInfo类的属性信息如下:
|
||||
// resultRetVal 返回状态码
|
||||
// resultInfo 请求执行结果描述
|
||||
// */
|
||||
// AbnormalFlowCleaningServiceStub.LinkProtectionStrategyTemplateForUMCResponse resp_link_temp;
|
||||
// resp_link_temp = stub.linkProtectionStrategyTemplateForUMC(link_temp);
|
||||
// System.out.println("ResultInfo: " + resp_link_temp.localOut.getResultInfo());
|
||||
// System.out.println("resultReVal: " + resp_link_temp.localOut.getResultRetVal());
|
||||
// } catch (RemoteException ex) {
|
||||
// System.out.println(ex.toString());
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,46 +4,46 @@ import java.rmi.RemoteException;
|
|||
|
||||
public class TestmodBypassManualTractionStrategyForUMC {
|
||||
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();
|
||||
/*
|
||||
修改指定名称的旁路手动牵引策略配置信息
|
||||
输入参数:
|
||||
policyName 旁路手动牵引策略名称
|
||||
protectName 防护对象名称。
|
||||
ipRange 保护IP段。临时仅支持单个IP段,且仅支持IP-IP形式。
|
||||
*/
|
||||
AbnormalFlowCleaningServiceStub.ModBypassManualTractionStrategyForUMC modBypass;
|
||||
modBypass = new AbnormalFlowCleaningServiceStub.ModBypassManualTractionStrategyForUMC();
|
||||
String policyName = "1";
|
||||
String protectName = "10";
|
||||
String ipRange = "192.168.3.3-192.168.3.5";
|
||||
modBypass.setPolicyName(policyName);
|
||||
modBypass.setProtectName(protectName);
|
||||
modBypass.setIpRange(ipRange);
|
||||
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信息
|
||||
输出参数:
|
||||
resultRetVal 返回状态码。
|
||||
resultInfo 请求执行结果描述。
|
||||
执行成功NtcRequestResultInfo类的resultRetVal属性值为0。
|
||||
执行失败NtcRequestResultInfo类的resultRetVal属性值为非0。可获取resultInfo属性值查看失败提示信息。
|
||||
*/
|
||||
AbnormalFlowCleaningServiceStub.ModBypassManualTractionStrategyForUMCResponse respmodBypass;
|
||||
respmodBypass = stub.modBypassManualTractionStrategyForUMC(modBypass);
|
||||
System.out.println("ResultInfo: " + respmodBypass.localOut.getResultInfo());
|
||||
System.out.println("resultReVal: " + respmodBypass.localOut.getResultRetVal());
|
||||
} catch (RemoteException ex) {
|
||||
System.out.println(ex.toString());
|
||||
}
|
||||
// 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();
|
||||
// /*
|
||||
// 修改指定名称的旁路手动牵引策略配置信息
|
||||
// 输入参数:
|
||||
// policyName 旁路手动牵引策略名称
|
||||
// protectName 防护对象名称。
|
||||
// ipRange 保护IP段。临时仅支持单个IP段,且仅支持IP-IP形式。
|
||||
// */
|
||||
// AbnormalFlowCleaningServiceStub.ModBypassManualTractionStrategyForUMC modBypass;
|
||||
// modBypass = new AbnormalFlowCleaningServiceStub.ModBypassManualTractionStrategyForUMC();
|
||||
// String policyName = "1";
|
||||
// String protectName = "10";
|
||||
// String ipRange = "192.168.3.3-192.168.3.5";
|
||||
// modBypass.setPolicyName(policyName);
|
||||
// modBypass.setProtectName(protectName);
|
||||
// modBypass.setIpRange(ipRange);
|
||||
// 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信息
|
||||
// 输出参数:
|
||||
// resultRetVal 返回状态码。
|
||||
// resultInfo 请求执行结果描述。
|
||||
// 执行成功NtcRequestResultInfo类的resultRetVal属性值为0。
|
||||
// 执行失败NtcRequestResultInfo类的resultRetVal属性值为非0。可获取resultInfo属性值查看失败提示信息。
|
||||
// */
|
||||
// AbnormalFlowCleaningServiceStub.ModBypassManualTractionStrategyForUMCResponse respmodBypass;
|
||||
// respmodBypass = stub.modBypassManualTractionStrategyForUMC(modBypass);
|
||||
// System.out.println("ResultInfo: " + respmodBypass.localOut.getResultInfo());
|
||||
// System.out.println("resultReVal: " + respmodBypass.localOut.getResultRetVal());
|
||||
// } catch (RemoteException ex) {
|
||||
// System.out.println(ex.toString());
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,44 +2,44 @@ 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());
|
||||
}
|
||||
// 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());
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,44 +4,44 @@ import java.rmi.RemoteException;
|
|||
|
||||
public class TeststartBypassManualTractionStrategyForUMC {
|
||||
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();
|
||||
/*
|
||||
启动指定名称的旁路手动牵引策略。启动旁路手动牵引策略,UMC将立即启动引流清洗功能。
|
||||
输入参数:
|
||||
policyName 策略名称
|
||||
cleaningDevices 指定清洗设备列表
|
||||
1、清洗设备需包含在对应防护对象中。2、如为空串代表默认选择对应防护对象中的全部清洗设备
|
||||
*/
|
||||
AbnormalFlowCleaningServiceStub.StartBypassManualTractionStrategyForUMC startBypass;
|
||||
startBypass = new AbnormalFlowCleaningServiceStub.StartBypassManualTractionStrategyForUMC();
|
||||
String policyName = "1";
|
||||
String cleaningDevices = "10.88.76.41";
|
||||
startBypass.setPolicyName(policyName);
|
||||
startBypass.setCleaningDevices(cleaningDevices);
|
||||
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信息
|
||||
输出参数:
|
||||
resultRetVal 返回状态码。
|
||||
resultInfo 请求执行结果描述。
|
||||
执行成功NtcRequestResultInfo类的resultRetVal属性值为0。
|
||||
执行失败NtcRequestResultInfo类的resultRetVal属性值为非0。可获取resultInfo属性值查看失败提示信息。
|
||||
*/
|
||||
AbnormalFlowCleaningServiceStub.StartBypassManualTractionStrategyForUMCResponse respstartBypass;
|
||||
respstartBypass = stub.startBypassManualTractionStrategyForUMC(startBypass);
|
||||
System.out.println("ResultInfo: " + respstartBypass.localOut.getResultInfo());
|
||||
System.out.println("resultReVal: " + respstartBypass.localOut.getResultRetVal());
|
||||
} catch (RemoteException ex) {
|
||||
System.out.println(ex.toString());
|
||||
}
|
||||
// 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();
|
||||
// /*
|
||||
// 启动指定名称的旁路手动牵引策略。启动旁路手动牵引策略,UMC将立即启动引流清洗功能。
|
||||
// 输入参数:
|
||||
// policyName 策略名称
|
||||
// cleaningDevices 指定清洗设备列表
|
||||
// 1、清洗设备需包含在对应防护对象中。2、如为空串代表默认选择对应防护对象中的全部清洗设备
|
||||
// */
|
||||
// AbnormalFlowCleaningServiceStub.StartBypassManualTractionStrategyForUMC startBypass;
|
||||
// startBypass = new AbnormalFlowCleaningServiceStub.StartBypassManualTractionStrategyForUMC();
|
||||
// String policyName = "1";
|
||||
// String cleaningDevices = "10.88.76.41";
|
||||
// startBypass.setPolicyName(policyName);
|
||||
// startBypass.setCleaningDevices(cleaningDevices);
|
||||
// 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信息
|
||||
// 输出参数:
|
||||
// resultRetVal 返回状态码。
|
||||
// resultInfo 请求执行结果描述。
|
||||
// 执行成功NtcRequestResultInfo类的resultRetVal属性值为0。
|
||||
// 执行失败NtcRequestResultInfo类的resultRetVal属性值为非0。可获取resultInfo属性值查看失败提示信息。
|
||||
// */
|
||||
// AbnormalFlowCleaningServiceStub.StartBypassManualTractionStrategyForUMCResponse respstartBypass;
|
||||
// respstartBypass = stub.startBypassManualTractionStrategyForUMC(startBypass);
|
||||
// System.out.println("ResultInfo: " + respstartBypass.localOut.getResultInfo());
|
||||
// System.out.println("resultReVal: " + respstartBypass.localOut.getResultRetVal());
|
||||
// } catch (RemoteException ex) {
|
||||
// System.out.println(ex.toString());
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,44 +4,44 @@ import java.rmi.RemoteException;
|
|||
|
||||
public class TeststopBypassManualTractionStrategyForUMC {
|
||||
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();
|
||||
/*
|
||||
停止指定名称的旁路手动牵引策略。启动旁路手动牵引策略,UMC将立即启动引流清洗功能。
|
||||
输入参数:
|
||||
policyName 策略名称
|
||||
cleaningDevices 指定清洗设备列表
|
||||
1、清洗设备需包含在对应防护对象中。2、如为空串代表默认选择对应防护对象中的全部清洗设备
|
||||
*/
|
||||
AbnormalFlowCleaningServiceStub.StopBypassManualTractionStrategyForUMC stopBypass;
|
||||
stopBypass = new AbnormalFlowCleaningServiceStub.StopBypassManualTractionStrategyForUMC();
|
||||
String policyName = "1";
|
||||
String cleaningDevices = "10.88.76.41";
|
||||
stopBypass.setPolicyName(policyName);
|
||||
stopBypass.setCleaningDevices(cleaningDevices);
|
||||
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信息
|
||||
输出参数:
|
||||
resultRetVal 返回状态码。
|
||||
resultInfo 请求执行结果描述。
|
||||
执行成功NtcRequestResultInfo类的resultRetVal属性值为0。
|
||||
执行失败NtcRequestResultInfo类的resultRetVal属性值为非0。可获取resultInfo属性值查看失败提示信息。
|
||||
*/
|
||||
AbnormalFlowCleaningServiceStub.StopBypassManualTractionStrategyForUMCResponse respstopBypass;
|
||||
respstopBypass = stub.stopBypassManualTractionStrategyForUMC(stopBypass);
|
||||
System.out.println("ResultInfo: " + respstopBypass.localOut.getResultInfo());
|
||||
System.out.println("resultReVal: " + respstopBypass.localOut.getResultRetVal());
|
||||
} catch (RemoteException ex) {
|
||||
System.out.println(ex.toString());
|
||||
}
|
||||
// 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();
|
||||
// /*
|
||||
// 停止指定名称的旁路手动牵引策略。启动旁路手动牵引策略,UMC将立即启动引流清洗功能。
|
||||
// 输入参数:
|
||||
// policyName 策略名称
|
||||
// cleaningDevices 指定清洗设备列表
|
||||
// 1、清洗设备需包含在对应防护对象中。2、如为空串代表默认选择对应防护对象中的全部清洗设备
|
||||
// */
|
||||
// AbnormalFlowCleaningServiceStub.StopBypassManualTractionStrategyForUMC stopBypass;
|
||||
// stopBypass = new AbnormalFlowCleaningServiceStub.StopBypassManualTractionStrategyForUMC();
|
||||
// String policyName = "1";
|
||||
// String cleaningDevices = "10.88.76.41";
|
||||
// stopBypass.setPolicyName(policyName);
|
||||
// stopBypass.setCleaningDevices(cleaningDevices);
|
||||
// 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信息
|
||||
// 输出参数:
|
||||
// resultRetVal 返回状态码。
|
||||
// resultInfo 请求执行结果描述。
|
||||
// 执行成功NtcRequestResultInfo类的resultRetVal属性值为0。
|
||||
// 执行失败NtcRequestResultInfo类的resultRetVal属性值为非0。可获取resultInfo属性值查看失败提示信息。
|
||||
// */
|
||||
// AbnormalFlowCleaningServiceStub.StopBypassManualTractionStrategyForUMCResponse respstopBypass;
|
||||
// respstopBypass = stub.stopBypassManualTractionStrategyForUMC(stopBypass);
|
||||
// System.out.println("ResultInfo: " + respstopBypass.localOut.getResultInfo());
|
||||
// System.out.println("resultReVal: " + respstopBypass.localOut.getResultRetVal());
|
||||
// } catch (RemoteException ex) {
|
||||
// System.out.println(ex.toString());
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -2,33 +2,33 @@ package com.cmcc.hy.phoenix.dptech.wsdl;
|
|||
|
||||
public class TestInterface {
|
||||
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();
|
||||
AbnormalFlowCleaningServiceStub.GetAllDetectionObjectFromUMC getUMC = new AbnormalFlowCleaningServiceStub.GetAllDetectionObjectFromUMC();
|
||||
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);
|
||||
|
||||
|
||||
AbnormalFlowCleaningServiceStub.GetAllDetectionObjectFromUMCResponse resp = stub.getAllDetectionObjectFromUMC(getUMC);
|
||||
|
||||
for(AbnormalFlowCleaningServiceStub.DetectionObjectDataForService v : resp.localOut.getDetectionObjectDataForService()) {
|
||||
System.out.println("detectionDevices: " + v.localDetectionDevices);
|
||||
System.out.println("cleaningDevices: " + v.localCleaningDevices);
|
||||
System.out.println("detectionName: " + v.localDetectionName);
|
||||
System.out.println("ipSegment: " + v.localIpSegment);
|
||||
System.out.println("ipType: " + v.localIpType);
|
||||
System.out.println("cleaningType: " + v.localCleaningType);
|
||||
}
|
||||
} catch (org.apache.axis2.AxisFault ex) {
|
||||
System.out.println(ex.toString());
|
||||
} catch (java.rmi.RemoteException ex2) {
|
||||
System.out.println(ex2.toString());
|
||||
}
|
||||
// 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();
|
||||
// AbnormalFlowCleaningServiceStub.GetAllDetectionObjectFromUMC getUMC = new AbnormalFlowCleaningServiceStub.GetAllDetectionObjectFromUMC();
|
||||
// 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);
|
||||
//
|
||||
//
|
||||
// AbnormalFlowCleaningServiceStub.GetAllDetectionObjectFromUMCResponse resp = stub.getAllDetectionObjectFromUMC(getUMC);
|
||||
//
|
||||
// for(AbnormalFlowCleaningServiceStub.DetectionObjectDataForService v : resp.localOut.getDetectionObjectDataForService()) {
|
||||
// System.out.println("detectionDevices: " + v.localDetectionDevices);
|
||||
// System.out.println("cleaningDevices: " + v.localCleaningDevices);
|
||||
// System.out.println("detectionName: " + v.localDetectionName);
|
||||
// System.out.println("ipSegment: " + v.localIpSegment);
|
||||
// System.out.println("ipType: " + v.localIpType);
|
||||
// System.out.println("cleaningType: " + v.localCleaningType);
|
||||
// }
|
||||
// } catch (org.apache.axis2.AxisFault ex) {
|
||||
// System.out.println(ex.toString());
|
||||
// } catch (java.rmi.RemoteException ex2) {
|
||||
// System.out.println(ex2.toString());
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,58 +7,58 @@ import com.sun.org.apache.xpath.internal.objects.XString;
|
|||
*/
|
||||
public class TestaddProtectionObjectForUMC {
|
||||
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();
|
||||
AbnormalFlowCleaningServiceStub.AddProtectionObjectForUMC addPObject = new AbnormalFlowCleaningServiceStub.AddProtectionObjectForUMC();
|
||||
/*
|
||||
输入参数:
|
||||
属性 类型 说明
|
||||
detectionDevices string 检测设备列表。(无检测设备时可填写空串)
|
||||
cleaningDevices string 清洗设备列表。
|
||||
protectionName string 防护对象名称。
|
||||
ipSegment string 防护IP段。(注意:防护对象IP段格式同检测对象稍有不同,请参考下面的格式说明。)
|
||||
ipType int IP类型(V4:0;V6:1)。
|
||||
cleaningType int 清洗类型(Probe自动:3;Probe手动:4;第三方自动:1;第三方手动:2;无检测设备:0)。
|
||||
*/
|
||||
String detectionDevices = "";
|
||||
String cleaningDevices = "10.88.76.41";
|
||||
String protectionName = "test";
|
||||
String ipSegment = "1_192.168.1.5-192.168.1.6";
|
||||
int ipType = 0; //文档标错
|
||||
int cleaningType = 1; //文档标错
|
||||
|
||||
addPObject.setDetectionDevices(detectionDevices);
|
||||
addPObject.setCleaningDevices(cleaningDevices);
|
||||
addPObject.setProtectionName(protectionName);
|
||||
addPObject.setIpSegment(ipSegment);
|
||||
addPObject.setIpType(ipType);
|
||||
addPObject.setCleaningType(cleaningType);
|
||||
|
||||
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);
|
||||
|
||||
/*
|
||||
属性 类型 说明
|
||||
resultRetVal int 返回状态码。
|
||||
resultInfo string 请求执行结果描述。
|
||||
执行成功NtcRequestResultInfo类的resultRetVal属性值为0。
|
||||
执行失败NtcRequestResultInfo类的resultRetVal属性值为非0。可获取resultInfo属性值查看失败提示信息。
|
||||
*/
|
||||
AbnormalFlowCleaningServiceStub.AddProtectionObjectForUMCResponse response = stub.addProtectionObjectForUMC(addPObject);
|
||||
System.out.println("resultRetVal:" + response.localOut.getResultRetVal());
|
||||
System.out.println("resultInfo" + response.localOut.getResultInfo());
|
||||
|
||||
}catch (org.apache.axis2.AxisFault ex) {
|
||||
System.out.println(ex.toString());
|
||||
} catch (java.rmi.RemoteException ex2) {
|
||||
System.out.println(ex2.toString());
|
||||
}
|
||||
// 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();
|
||||
// AbnormalFlowCleaningServiceStub.AddProtectionObjectForUMC addPObject = new AbnormalFlowCleaningServiceStub.AddProtectionObjectForUMC();
|
||||
// /*
|
||||
// 输入参数:
|
||||
// 属性 类型 说明
|
||||
// detectionDevices string 检测设备列表。(无检测设备时可填写空串)
|
||||
// cleaningDevices string 清洗设备列表。
|
||||
// protectionName string 防护对象名称。
|
||||
// ipSegment string 防护IP段。(注意:防护对象IP段格式同检测对象稍有不同,请参考下面的格式说明。)
|
||||
// ipType int IP类型(V4:0;V6:1)。
|
||||
// cleaningType int 清洗类型(Probe自动:3;Probe手动:4;第三方自动:1;第三方手动:2;无检测设备:0)。
|
||||
// */
|
||||
// String detectionDevices = "";
|
||||
// String cleaningDevices = "10.88.76.41";
|
||||
// String protectionName = "test";
|
||||
// String ipSegment = "1_192.168.1.5-192.168.1.6";
|
||||
// int ipType = 0; //文档标错
|
||||
// int cleaningType = 1; //文档标错
|
||||
//
|
||||
// addPObject.setDetectionDevices(detectionDevices);
|
||||
// addPObject.setCleaningDevices(cleaningDevices);
|
||||
// addPObject.setProtectionName(protectionName);
|
||||
// addPObject.setIpSegment(ipSegment);
|
||||
// addPObject.setIpType(ipType);
|
||||
// addPObject.setCleaningType(cleaningType);
|
||||
//
|
||||
// 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);
|
||||
//
|
||||
// /*
|
||||
// 属性 类型 说明
|
||||
// resultRetVal int 返回状态码。
|
||||
// resultInfo string 请求执行结果描述。
|
||||
// 执行成功NtcRequestResultInfo类的resultRetVal属性值为0。
|
||||
// 执行失败NtcRequestResultInfo类的resultRetVal属性值为非0。可获取resultInfo属性值查看失败提示信息。
|
||||
// */
|
||||
// AbnormalFlowCleaningServiceStub.AddProtectionObjectForUMCResponse response = stub.addProtectionObjectForUMC(addPObject);
|
||||
// System.out.println("resultRetVal:" + response.localOut.getResultRetVal());
|
||||
// System.out.println("resultInfo" + response.localOut.getResultInfo());
|
||||
//
|
||||
// }catch (org.apache.axis2.AxisFault ex) {
|
||||
// System.out.println(ex.toString());
|
||||
// } catch (java.rmi.RemoteException ex2) {
|
||||
// System.out.println(ex2.toString());
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -5,41 +5,41 @@ package com.cmcc.hy.phoenix.dptech.wsdl;
|
|||
*/
|
||||
public class TestdeleteProtectionObjectForUMC {
|
||||
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();
|
||||
AbnormalFlowCleaningServiceStub.DeleteProtectionObjectForUMC deletePO = new AbnormalFlowCleaningServiceStub.DeleteProtectionObjectForUMC();
|
||||
/*
|
||||
输入参数:
|
||||
属性 类型 说明
|
||||
protectionName string 防护对象名称。
|
||||
*/
|
||||
String protectionName = "1";
|
||||
|
||||
deletePO.setProtectionName(protectionName);
|
||||
|
||||
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);
|
||||
|
||||
/*
|
||||
输出:NtcRequestResultInfo类的属性信息如下:
|
||||
属性 类型 说明
|
||||
resultRetVal int 返回状态码。
|
||||
resultInfo string 请求执行结果描述。
|
||||
*/
|
||||
AbnormalFlowCleaningServiceStub.DeleteProtectionObjectForUMCResponse response = stub.deleteProtectionObjectForUMC(deletePO);
|
||||
System.out.println("resultRetVal:"+response.localOut.getResultRetVal());
|
||||
System.out.println("resultInfo:"+response.localOut.getResultInfo());
|
||||
|
||||
}catch (org.apache.axis2.AxisFault ex) {
|
||||
System.out.println(ex.toString());
|
||||
} catch (java.rmi.RemoteException ex2) {
|
||||
System.out.println(ex2.toString());
|
||||
}
|
||||
// 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();
|
||||
// AbnormalFlowCleaningServiceStub.DeleteProtectionObjectForUMC deletePO = new AbnormalFlowCleaningServiceStub.DeleteProtectionObjectForUMC();
|
||||
// /*
|
||||
// 输入参数:
|
||||
// 属性 类型 说明
|
||||
// protectionName string 防护对象名称。
|
||||
// */
|
||||
// String protectionName = "1";
|
||||
//
|
||||
// deletePO.setProtectionName(protectionName);
|
||||
//
|
||||
// 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);
|
||||
//
|
||||
// /*
|
||||
// 输出:NtcRequestResultInfo类的属性信息如下:
|
||||
// 属性 类型 说明
|
||||
// resultRetVal int 返回状态码。
|
||||
// resultInfo string 请求执行结果描述。
|
||||
// */
|
||||
// AbnormalFlowCleaningServiceStub.DeleteProtectionObjectForUMCResponse response = stub.deleteProtectionObjectForUMC(deletePO);
|
||||
// System.out.println("resultRetVal:"+response.localOut.getResultRetVal());
|
||||
// System.out.println("resultInfo:"+response.localOut.getResultInfo());
|
||||
//
|
||||
// }catch (org.apache.axis2.AxisFault ex) {
|
||||
// System.out.println(ex.toString());
|
||||
// } catch (java.rmi.RemoteException ex2) {
|
||||
// System.out.println(ex2.toString());
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,44 +5,44 @@ package com.cmcc.hy.phoenix.dptech.wsdl;
|
|||
*/
|
||||
public class TestdeleteProtectionObjectIPRangeForUMC {
|
||||
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();
|
||||
AbnormalFlowCleaningServiceStub.DeleteProtectionObjectIPRangeForUMC deletePOIP = new AbnormalFlowCleaningServiceStub.DeleteProtectionObjectIPRangeForUMC();
|
||||
/*
|
||||
输入参数:
|
||||
属性 类型 说明
|
||||
protectionName String 防护对象名称。
|
||||
ipRangeIDs string 保护网段ID列表。
|
||||
*/
|
||||
String protectionName = "test";
|
||||
String ipRangeIDs = "1";
|
||||
|
||||
deletePOIP.setProtectionName(protectionName);
|
||||
deletePOIP.setIpRangeIDs(ipRangeIDs);
|
||||
|
||||
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);
|
||||
|
||||
/*
|
||||
输出:NtcRequestResultInfo类的属性信息如下:
|
||||
属性 类型 说明
|
||||
resultRetVal int 返回状态码。
|
||||
resultInfo string 请求执行结果描述。
|
||||
*/
|
||||
AbnormalFlowCleaningServiceStub.DeleteProtectionObjectIPRangeForUMCResponse response = stub.deleteProtectionObjectIPRangeForUMC(deletePOIP);
|
||||
System.out.println("resultRetVal:"+response.localOut.getResultRetVal());
|
||||
System.out.println("resultInfo:"+response.localOut.getResultInfo());
|
||||
|
||||
}catch (org.apache.axis2.AxisFault ex) {
|
||||
System.out.println(ex.toString());
|
||||
} catch (java.rmi.RemoteException ex2) {
|
||||
System.out.println(ex2.toString());
|
||||
}
|
||||
// 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();
|
||||
// AbnormalFlowCleaningServiceStub.DeleteProtectionObjectIPRangeForUMC deletePOIP = new AbnormalFlowCleaningServiceStub.DeleteProtectionObjectIPRangeForUMC();
|
||||
// /*
|
||||
// 输入参数:
|
||||
// 属性 类型 说明
|
||||
// protectionName String 防护对象名称。
|
||||
// ipRangeIDs string 保护网段ID列表。
|
||||
// */
|
||||
// String protectionName = "test";
|
||||
// String ipRangeIDs = "1";
|
||||
//
|
||||
// deletePOIP.setProtectionName(protectionName);
|
||||
// deletePOIP.setIpRangeIDs(ipRangeIDs);
|
||||
//
|
||||
// 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);
|
||||
//
|
||||
// /*
|
||||
// 输出:NtcRequestResultInfo类的属性信息如下:
|
||||
// 属性 类型 说明
|
||||
// resultRetVal int 返回状态码。
|
||||
// resultInfo string 请求执行结果描述。
|
||||
// */
|
||||
// AbnormalFlowCleaningServiceStub.DeleteProtectionObjectIPRangeForUMCResponse response = stub.deleteProtectionObjectIPRangeForUMC(deletePOIP);
|
||||
// System.out.println("resultRetVal:"+response.localOut.getResultRetVal());
|
||||
// System.out.println("resultInfo:"+response.localOut.getResultInfo());
|
||||
//
|
||||
// }catch (org.apache.axis2.AxisFault ex) {
|
||||
// System.out.println(ex.toString());
|
||||
// } catch (java.rmi.RemoteException ex2) {
|
||||
// System.out.println(ex2.toString());
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,27 +9,27 @@ out string UMC全部清洗设备列表(注:以英文逗号间隔)
|
|||
*/
|
||||
public class TestgetAllDetectDevices {
|
||||
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();
|
||||
AbnormalFlowCleaningServiceStub.GetAllDetectDevices getDDevices = new AbnormalFlowCleaningServiceStub.GetAllDetectDevices();
|
||||
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);
|
||||
|
||||
AbnormalFlowCleaningServiceStub.GetAllDetectDevicesResponse response = stub.getAllDetectDevices(getDDevices);
|
||||
|
||||
System.out.println("allDetectDevices: " + response.getOut());
|
||||
|
||||
} catch (org.apache.axis2.AxisFault ex) {
|
||||
System.out.println(ex.toString());
|
||||
} catch (java.rmi.RemoteException ex2) {
|
||||
System.out.println(ex2.toString());
|
||||
}
|
||||
// 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();
|
||||
// AbnormalFlowCleaningServiceStub.GetAllDetectDevices getDDevices = new AbnormalFlowCleaningServiceStub.GetAllDetectDevices();
|
||||
// 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);
|
||||
//
|
||||
// AbnormalFlowCleaningServiceStub.GetAllDetectDevicesResponse response = stub.getAllDetectDevices(getDDevices);
|
||||
//
|
||||
// System.out.println("allDetectDevices: " + response.getOut());
|
||||
//
|
||||
// } catch (org.apache.axis2.AxisFault ex) {
|
||||
// System.out.println(ex.toString());
|
||||
// } catch (java.rmi.RemoteException ex2) {
|
||||
// System.out.println(ex2.toString());
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,27 +9,27 @@ out string UMC全部检测设备列表(注:以英文逗号间隔)
|
|||
*/
|
||||
public class TestgetAllProtectDevices {
|
||||
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();
|
||||
AbnormalFlowCleaningServiceStub.GetAllProtectDevices getPDevices = new AbnormalFlowCleaningServiceStub.GetAllProtectDevices();
|
||||
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);
|
||||
|
||||
AbnormalFlowCleaningServiceStub.GetAllProtectDevicesResponse response = stub.getAllProtectDevices(getPDevices);
|
||||
|
||||
System.out.println("allProtectDevices: " + response.getOut());
|
||||
|
||||
} catch (org.apache.axis2.AxisFault ex) {
|
||||
System.out.println(ex.toString());
|
||||
} catch (java.rmi.RemoteException ex2) {
|
||||
System.out.println(ex2.toString());
|
||||
}
|
||||
// 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();
|
||||
// AbnormalFlowCleaningServiceStub.GetAllProtectDevices getPDevices = new AbnormalFlowCleaningServiceStub.GetAllProtectDevices();
|
||||
// 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);
|
||||
//
|
||||
// AbnormalFlowCleaningServiceStub.GetAllProtectDevicesResponse response = stub.getAllProtectDevices(getPDevices);
|
||||
//
|
||||
// System.out.println("allProtectDevices: " + response.getOut());
|
||||
//
|
||||
// } catch (org.apache.axis2.AxisFault ex) {
|
||||
// System.out.println(ex.toString());
|
||||
// } catch (java.rmi.RemoteException ex2) {
|
||||
// System.out.println(ex2.toString());
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,53 +7,53 @@ import com.sun.org.apache.xpath.internal.objects.XNull;
|
|||
*/
|
||||
public class TestgetAllProtectionObjectFromUMC {
|
||||
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();
|
||||
/*
|
||||
输入参数:无
|
||||
*/
|
||||
AbnormalFlowCleaningServiceStub.GetAllProtectionObjectFromUMC getPObject = new AbnormalFlowCleaningServiceStub.GetAllProtectionObjectFromUMC();
|
||||
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);
|
||||
|
||||
/*
|
||||
输出:数组ArrayOfProtectionObjectDataForService 函数返回值。该类为防护对象的数组。
|
||||
ArrayOfProtectionObjectDataForService类为ProtectionObjectDataForService类的数组。
|
||||
ProtectionObjectDataForService类的属性信息如下:
|
||||
属性 类型 说明
|
||||
detectionDevices string 检测设备列表。(无检测设备时为空串)
|
||||
cleaningDevices string 清洗设备列表。
|
||||
protectionName string 防护对象名称。
|
||||
ipSegment string 防护IP段。(注意:防护对象IP段格式同检测对象稍有不同,请参考下面的格式说明。)
|
||||
ipType string IP类型(V4:0;V6:1)。
|
||||
cleaningType string 清洗类型(Probe自动:3;Probe手动:4;第三方自动:1;第三方手动:2;无检测设备:0)。
|
||||
*/
|
||||
AbnormalFlowCleaningServiceStub.GetAllProtectionObjectFromUMCResponse response = stub.getAllProtectionObjectFromUMC(getPObject);
|
||||
try {
|
||||
for (AbnormalFlowCleaningServiceStub.ProtectionObjectDataForService v : response.localOut.getProtectionObjectDataForService()) {
|
||||
System.out.println("detectionDevices:" + v.getDetectionDevices());
|
||||
System.out.println("cleaningDevices:" + v.getCleaningDevices());
|
||||
System.out.println("protectionName:" + v.getProtectionName());
|
||||
System.out.println("ipSegment:" + v.getIpSegment());
|
||||
System.out.println("ipType:" + v.getIpType());
|
||||
System.out.println("cleaningType:" + v.getCleaningType());
|
||||
}
|
||||
} catch (NullPointerException ex) {
|
||||
System.out.println(ex.toString());
|
||||
}
|
||||
|
||||
|
||||
}catch (org.apache.axis2.AxisFault ex) {
|
||||
System.out.println(ex.toString());
|
||||
} catch (java.rmi.RemoteException ex2) {
|
||||
System.out.println(ex2.toString());
|
||||
}
|
||||
// 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();
|
||||
// /*
|
||||
// 输入参数:无
|
||||
// */
|
||||
// AbnormalFlowCleaningServiceStub.GetAllProtectionObjectFromUMC getPObject = new AbnormalFlowCleaningServiceStub.GetAllProtectionObjectFromUMC();
|
||||
// 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);
|
||||
//
|
||||
// /*
|
||||
// 输出:数组ArrayOfProtectionObjectDataForService 函数返回值。该类为防护对象的数组。
|
||||
// ArrayOfProtectionObjectDataForService类为ProtectionObjectDataForService类的数组。
|
||||
// ProtectionObjectDataForService类的属性信息如下:
|
||||
// 属性 类型 说明
|
||||
// detectionDevices string 检测设备列表。(无检测设备时为空串)
|
||||
// cleaningDevices string 清洗设备列表。
|
||||
// protectionName string 防护对象名称。
|
||||
// ipSegment string 防护IP段。(注意:防护对象IP段格式同检测对象稍有不同,请参考下面的格式说明。)
|
||||
// ipType string IP类型(V4:0;V6:1)。
|
||||
// cleaningType string 清洗类型(Probe自动:3;Probe手动:4;第三方自动:1;第三方手动:2;无检测设备:0)。
|
||||
// */
|
||||
// AbnormalFlowCleaningServiceStub.GetAllProtectionObjectFromUMCResponse response = stub.getAllProtectionObjectFromUMC(getPObject);
|
||||
// try {
|
||||
// for (AbnormalFlowCleaningServiceStub.ProtectionObjectDataForService v : response.localOut.getProtectionObjectDataForService()) {
|
||||
// System.out.println("detectionDevices:" + v.getDetectionDevices());
|
||||
// System.out.println("cleaningDevices:" + v.getCleaningDevices());
|
||||
// System.out.println("protectionName:" + v.getProtectionName());
|
||||
// System.out.println("ipSegment:" + v.getIpSegment());
|
||||
// System.out.println("ipType:" + v.getIpType());
|
||||
// System.out.println("cleaningType:" + v.getCleaningType());
|
||||
// }
|
||||
// } catch (NullPointerException ex) {
|
||||
// System.out.println(ex.toString());
|
||||
// }
|
||||
//
|
||||
//
|
||||
// }catch (org.apache.axis2.AxisFault ex) {
|
||||
// System.out.println(ex.toString());
|
||||
// } catch (java.rmi.RemoteException ex2) {
|
||||
// System.out.println(ex2.toString());
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,50 +7,50 @@ import com.sun.org.apache.xpath.internal.objects.XString;
|
|||
*/
|
||||
public class TestmodifyProtectionObjectForUMC {
|
||||
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();
|
||||
AbnormalFlowCleaningServiceStub.ModifyProtectionObjectForUMC modifyDO = new AbnormalFlowCleaningServiceStub.ModifyProtectionObjectForUMC();
|
||||
/*
|
||||
输入参数:
|
||||
属性 类型 说明
|
||||
protectionName string 防护对象名称。
|
||||
ipSegment string 防护IP段。(注意:防护对象IP段格式同检测对象稍有不同,请参考下面的格式说明。)
|
||||
ipType string IP类型(V4:0;V6:1)。
|
||||
cleaningType int 清洗类型(Probe自动:3;Probe手动:4;第三方自动:1;第三方手动:2;无检测设备:0)。 //文档类型错误
|
||||
*/
|
||||
String protectionName = "test";
|
||||
String ipSegment = "1_192.168.1.7-192.168.1.8";
|
||||
int ipType = 0; //文档错误
|
||||
int cleaningType = 0; //文档错误
|
||||
|
||||
modifyDO.setProtectionName(protectionName);
|
||||
modifyDO.setIpSegment(ipSegment);
|
||||
modifyDO.setIpType(ipType);
|
||||
modifyDO.setCleaningType(cleaningType);
|
||||
|
||||
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);
|
||||
|
||||
/*
|
||||
输出:NtcRequestResultInfo类的属性信息如下:
|
||||
属性 类型 说明
|
||||
resultRetVal int 返回状态码。
|
||||
resultInfo string 请求执行结果描述。
|
||||
*/
|
||||
AbnormalFlowCleaningServiceStub.ModifyProtectionObjectForUMCResponse response = stub.modifyProtectionObjectForUMC(modifyDO);
|
||||
System.out.println("resultRetVal:"+response.localOut.getResultRetVal());
|
||||
System.out.println("resultInfo:"+response.localOut.getResultInfo());
|
||||
|
||||
}catch (org.apache.axis2.AxisFault ex) {
|
||||
System.out.println(ex.toString());
|
||||
} catch (java.rmi.RemoteException ex2) {
|
||||
System.out.println(ex2.toString());
|
||||
}
|
||||
// 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();
|
||||
// AbnormalFlowCleaningServiceStub.ModifyProtectionObjectForUMC modifyDO = new AbnormalFlowCleaningServiceStub.ModifyProtectionObjectForUMC();
|
||||
// /*
|
||||
// 输入参数:
|
||||
// 属性 类型 说明
|
||||
// protectionName string 防护对象名称。
|
||||
// ipSegment string 防护IP段。(注意:防护对象IP段格式同检测对象稍有不同,请参考下面的格式说明。)
|
||||
// ipType string IP类型(V4:0;V6:1)。
|
||||
// cleaningType int 清洗类型(Probe自动:3;Probe手动:4;第三方自动:1;第三方手动:2;无检测设备:0)。 //文档类型错误
|
||||
// */
|
||||
// String protectionName = "test";
|
||||
// String ipSegment = "1_192.168.1.7-192.168.1.8";
|
||||
// int ipType = 0; //文档错误
|
||||
// int cleaningType = 0; //文档错误
|
||||
//
|
||||
// modifyDO.setProtectionName(protectionName);
|
||||
// modifyDO.setIpSegment(ipSegment);
|
||||
// modifyDO.setIpType(ipType);
|
||||
// modifyDO.setCleaningType(cleaningType);
|
||||
//
|
||||
// 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);
|
||||
//
|
||||
// /*
|
||||
// 输出:NtcRequestResultInfo类的属性信息如下:
|
||||
// 属性 类型 说明
|
||||
// resultRetVal int 返回状态码。
|
||||
// resultInfo string 请求执行结果描述。
|
||||
// */
|
||||
// AbnormalFlowCleaningServiceStub.ModifyProtectionObjectForUMCResponse response = stub.modifyProtectionObjectForUMC(modifyDO);
|
||||
// System.out.println("resultRetVal:"+response.localOut.getResultRetVal());
|
||||
// System.out.println("resultInfo:"+response.localOut.getResultInfo());
|
||||
//
|
||||
// }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