diff --git a/src/test/java/com/cmcc/hy/phoenix/dptech/TestaddDetectionObjectForUMC.java b/src/test/java/com/cmcc/hy/phoenix/dptech/TestaddDetectionObjectForUMC.java new file mode 100644 index 00000000..98c35965 --- /dev/null +++ b/src/test/java/com/cmcc/hy/phoenix/dptech/TestaddDetectionObjectForUMC.java @@ -0,0 +1,34 @@ +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(); + 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); + + 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()); + } + } +}