diff --git a/src/main/java/com/dispose/ability/impl/HuaWeiFireWallAbilityImpl.java b/src/main/java/com/dispose/ability/impl/HuaWeiFireWallAbilityImpl.java index 95e609cc..469f3565 100644 --- a/src/main/java/com/dispose/ability/impl/HuaWeiFireWallAbilityImpl.java +++ b/src/main/java/com/dispose/ability/impl/HuaWeiFireWallAbilityImpl.java @@ -13,6 +13,7 @@ import com.dispose.pojo.po.MulReturnType; import com.dispose.pojo.vo.DeviceFirewareInfo; import com.dispose.security.arithmetic.CryptoHelper; import com.huaweifirewall.dispose.common.HuaWeiFireWallCreatePolicyReq; +import com.huaweifirewall.dispose.common.SourceIp; import com.huaweifirewall.dispose.protocol.HuaWeiFireWallInterface; import inet.ipaddr.IPAddress; import inet.ipaddr.IPAddressString; @@ -118,8 +119,11 @@ public class HuaWeiFireWallAbilityImpl implements DisposeAbility { return new MulReturnType<>(ErrorCode.ERR_LOGOUT, ""); } + SourceIp sourceIp = new SourceIp(); + sourceIp.setAddressIpv4(disposeObj); + HuaWeiFireWallCreatePolicyReq policyReq = HuaWeiFireWallCreatePolicyReq.builder() - .sourceIp(disposeObj).action(false).build(); + .sourceIp(sourceIp).action(false).build(); try { log.info("++++Begging HuaWei FireWall Start Cleanup Task: {}", disposeObject); diff --git a/src/main/java/com/huaweifirewall/dispose/protocol/HuaWeiFireWallInterface.java b/src/main/java/com/huaweifirewall/dispose/protocol/HuaWeiFireWallInterface.java index 6a5cb973..196bf1fd 100644 --- a/src/main/java/com/huaweifirewall/dispose/protocol/HuaWeiFireWallInterface.java +++ b/src/main/java/com/huaweifirewall/dispose/protocol/HuaWeiFireWallInterface.java @@ -118,7 +118,7 @@ public class HuaWeiFireWallInterface { /** * 将string类型的XML转换成对象 */ - public static Object convertXmlStrToObject(Class clazz, String xmlStr) { + public static Object convertXmlStrToObject(Class clazz, String xmlStr) { Object xmlObject = null; try { JAXBContext context = JAXBContext.newInstance(clazz); diff --git a/src/test/java/com/dispose/test/common/HttpBodyXmlTest.java b/src/test/java/com/dispose/test/common/HttpBodyXmlTest.java index 1608ac81..06247028 100644 --- a/src/test/java/com/dispose/test/common/HttpBodyXmlTest.java +++ b/src/test/java/com/dispose/test/common/HttpBodyXmlTest.java @@ -92,7 +92,7 @@ public class HttpBodyXmlTest { /** * 将string类型的XML转换成对象 */ - public static Object convertXmlStrToObject(Class clazz, String xmlStr) { + public static Object convertXmlStrToObject(Class clazz, String xmlStr) { Object xmlObject = null; try { JAXBContext context = JAXBContext.newInstance(clazz);