REM 编写UMC接口调用测试
This commit is contained in:
lijinxing 2020-03-27 16:33:39 +08:00
parent 07951f4b37
commit 752838088e
3 changed files with 245971 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,34 @@
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());
}
}
}