dragon-zhang commented on code in PR #3408:
URL: https://github.com/apache/incubator-shenyu/pull/3408#discussion_r874649222


##########
shenyu-client/shenyu-client-motan/src/main/java/org/apache/shenyu/client/motan/MotanServiceBeanPostProcessor.java:
##########
@@ -168,6 +179,39 @@ private MetaDataRegisterDTO buildMetaDataDTO(final 
Class<?> clazz, final MotanSe
                 .build();
     }
 
+    private MetaDataRegisterDTO buildMetaDataDTO(final Class<?> clazz, final 
MotanService service,
+                                                 final ShenyuMotanClient 
shenyuMotanClient, final String path) {
+        String appName = this.appName;
+        String desc = shenyuMotanClient.desc();
+        String host = IpUtils.isCompleteHost(this.host) ? this.host : 
IpUtils.getHost(this.host);
+        int port = StringUtils.isBlank(this.port) ? -1 : 
Integer.parseInt(this.port);
+        String configRuleName = shenyuMotanClient.ruleName();
+        String ruleName = ("".equals(configRuleName)) ? path : configRuleName;
+        String serviceName;
+        if (void.class.equals(service.interfaceClass())) {
+            if (clazz.getInterfaces().length > 0) {
+                serviceName = clazz.getInterfaces()[0].getName();
+            } else {
+                throw new ShenyuClientIllegalArgumentException("Failed to 
export remote service class " + clazz.getName()
+                        + ", cause: The @Service undefined interfaceClass or 
interfaceName, and the service class unimplemented any interfaces.");
+            }
+        } else {
+            serviceName = service.interfaceClass().getName();
+        }
+        return MetaDataRegisterDTO.builder()

Review Comment:
   Lost `rpcExt`, which will cause an exception in the call of the 
`MotanPlugin`. The `metadata` of `motan` and `tars` client seems wrong. I'm 
discussing it with other developers. Please wait until I have a conclusion 
before continuing the development.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to