in rpc/dubbo/java-client/src/main/java/org/apache/dubbo/sample/Consumer.java [205:250]
public static void startComplexConsumerService() {
ReferenceConfig<ComplexProvider> ref = new ReferenceConfig<>();
ref.setInterface(ComplexProvider.class);
ref.setCheck(false);
ref.setProtocol(CommonConstants.DUBBO_PROTOCOL);
ref.setLazy(true);
ref.setTimeout(100000);
ref.setApplication(new ApplicationConfig("user-info-client"));
ref.setRegistry(new RegistryConfig("zookeeper://127.0.0.1:2181"));
final ComplexProvider complexProvider = ref.get();
// complexProvider.invokeWithEmptyReq();
// complexProvider.invokeWithSingleString("single string");
// complexProvider.invokeWithMultiString("string1", "string2", "string3");
// String [] strList = new String []{"first string"," second string"};
// complexProvider.invokeWithStringList(strList );
// String rsp = complexProvider.invokeWithEmptyReqStringRsp();
// System.out.println("get rsp = "+ rsp);
ComplexData cpxData = new ComplexData();
cpxData.booleanData = true;
cpxData.stringData = "test string";
cpxData.byteData = new byte[] {1, 12, 4, 3, 3,3};
cpxData.int16Data =16;
cpxData.intData = 32;
cpxData.int64Data = 64;
cpxData.arrayListData = new String[]{"array1", "array2"};
// cpxData.arrayUserData = new User[]{new User(), new User(), new User()};
cpxData.userDefinedData = new User();
cpxData.userDefinedData.setAge(18);
cpxData.userDefinedData.setId("iojfioj");
cpxData.stringStringHashMap = new HashMap<>();
// cpxData.stringStringHashMap.put("key1", "value");
// cpxData.stringStringHashMap.put("key2", "value");
// cpxData.stringUserDefinedPtrMapData = new HashMap<>();
// cpxData.stringUserDefinedPtrMapData.put("key1", new User());
// cpxData.stringUserDefinedPtrMapData.put("key2", new User());
// ComplexData response = complexProvider.invokeWithComplexReqComplexRspPtr(cpxData);
// System.out.println("get complex = "+ response);
int rsp = complexProvider.InvokeWithMultiBasicData("str",new byte[]{1, 3, 4,6,7}, 32, true);
System.out.println("get multi basic rsp = "+ rsp);
}