Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in case service interface has generic paramater #641

Open
eutkin opened this issue Jul 19, 2019 · 0 comments · May be fixed by #642
Open

Error in case service interface has generic paramater #641

eutkin opened this issue Jul 19, 2019 · 0 comments · May be fixed by #642

Comments

@eutkin
Copy link

eutkin commented Jul 19, 2019

project for reproducing: sample.

I have two node. First node (Consumer) provide service InvalidConsumer.
Second node (Provider) provide service Producer.

@Service
public interface InvalidConsumer {

    @ServiceMethod
    Mono<String> consume(List<String> input);
}

@Service
public interface Producer {

  @ServiceMethod
  Flux<String> invalidProduce();
}

When Producer call Consumer, i get this exception.

Next. Let see constructor of MethodInfo:

MethodInfo methodInfo =
                              new MethodInfo(
                                  Reflect.serviceName(serviceInterface),
                                  Reflect.methodName(method),
                                  Reflect.parameterizedReturnType(method),
                                  Reflect.isReturnTypeServiceMessage(method),
                                  Reflect.communicationMode(method),
                                  method.getParameterCount(),
                                  Reflect.requestType(method),
                                  Reflect.isRequestTypeServiceMessage(method),
                                  Reflect.isAuth(method));

We get requestType as Reflect.requestType(method).

If we have in method argument of type List<String> (not FLux<String>) we get request type is String. But the service will be transferred to List<String> instead of String and we will receive a serialization exception

@segabriel segabriel linked a pull request Jul 21, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant