change eunit dep demo module
diff --git a/config_example/sys.config b/config_example/sys.config
index f33d74a..b100088 100644
--- a/config_example/sys.config
+++ b/config_example/sys.config
@@ -23,10 +23,10 @@
{protocol,hessian},
{port,20881},
{consumer,[
- {<<"com.ifcoder.demo.facade.User">>,[]}
+ {<<"org.apache.dubbo.erlang.sample.service.facade.UserOperator">>,[]}
]},
{provider,[
- {dubbo_service_user_impl,user2,<<"com.ifcoder.demo.facade.User">>,[]}
+ {dubbo_service_user_impl,userOperator,<<"org.apache.dubbo.erlang.sample.service.facade.UserOperator">>,[]}
]}
]}
diff --git a/test/consumer_SUITE.erl b/test/consumer_SUITE.erl
index a820b5d..ade6032 100644
--- a/test/consumer_SUITE.erl
+++ b/test/consumer_SUITE.erl
@@ -21,7 +21,7 @@
-compile(export_all).
-include_lib("common_test/include/ct.hrl").
--include("dubbo_service.hrl").
+-include("dubbo_sample_service.hrl").
%%--------------------------------------------------------------------
%% Function: suite() -> Info
%% Info = [tuple()]
@@ -44,7 +44,7 @@
dubboerl:start_provider(),
timer:sleep(2000),
dubboerl:start_consumer(),
- dubbo_service_app:register_type_list(),
+ dubbo_sample_service_app:register_type_list(),
timer:sleep(5000),
io:format(user, "test case start info ~p~n", [Start]),
[{appid, 1}].
@@ -142,15 +142,15 @@
json_sync_invoker(_Config) ->
application:set_env(dubboerl, protocol, json),
- R1 = user2:queryUserInfo(#userInfoRequest{username = "name", requestId = "111"}, #{sync=> true}),
+ R1 = userOperator:queryUserInfo(#userInfoRequest{username = "name", requestId = "111"}, #{sync=> true}),
io:format(user, "json_sync_invoker result ~p ~n", [R1]),
- R2 = user2:genUserId(),
+ R2 = userOperator:genUserId(),
io:format(user, "json_sync_invoker result2 ~p ~n", [R2]),
ok.
hessian_sync_invoker(_Config) ->
application:set_env(dubboerl, protocol, hessian),
- R1 = user2:queryUserInfo(#userInfoRequest{username = "name", requestId = "111"}, #{sync=> true}),
+ R1 = userOperator:queryUserInfo(#userInfoRequest{username = "name", requestId = "111"}, #{sync=> true}),
io:format(user, "json_sync_invoker result ~p ~n", [R1]),
- R2 = user2:genUserId(),
+ R2 = userOperator:genUserId(),
io:format(user, "json_sync_invoker result2 ~p ~n", [R2]),
ok.
\ No newline at end of file
diff --git a/test/dubbo_sample_service.hrl b/test/dubbo_sample_service.hrl
new file mode 100644
index 0000000..52458ea
--- /dev/null
+++ b/test/dubbo_sample_service.hrl
@@ -0,0 +1,13 @@
+
+-record(userInfoRequest,{
+ requestId ::list(),
+ username ::list()}).
+
+-record(userRes,{
+ userlist ::[]}).
+
+-record(userInfo,{
+ userName ::list(),
+ userAge ::integer(),
+ userId ::list()}).
+
diff --git a/test/dubbo_sample_service_app.erl b/test/dubbo_sample_service_app.erl
new file mode 100644
index 0000000..12771dc
--- /dev/null
+++ b/test/dubbo_sample_service_app.erl
@@ -0,0 +1,39 @@
+%%%-------------------------------------------------------------------
+%% @doc dubbo_sample_service public API
+%% @end
+%%%-------------------------------------------------------------------
+
+-module(dubbo_sample_service_app).
+
+-behaviour(application).
+
+%% Application callbacks
+-export([start/2, stop/1]).
+
+-include("dubbo_sample_service.hrl").
+-export([register_type_list/0]).
+
+%%====================================================================
+%% API
+%%====================================================================
+
+start(_StartType, _StartArgs) ->
+ register_type_list(),
+ dubbo_sample_service_sup:start_link().
+
+%%--------------------------------------------------------------------
+stop(_State) ->
+ ok.
+
+%%====================================================================
+%% Internal functions
+%%====================================================================
+
+
+register_type_list()->
+ List = dubbo_sample_service_type_list:get_list(),
+ lists:map(
+ fun({NativeType,ForeignType,Fields}) ->
+ dubbo_type_transfer:pre_process_typedef(NativeType,ForeignType,Fields)
+ end,List),
+ ok.
\ No newline at end of file
diff --git a/test/dubbo_sample_service_sup.erl b/test/dubbo_sample_service_sup.erl
new file mode 100644
index 0000000..a7e7ead
--- /dev/null
+++ b/test/dubbo_sample_service_sup.erl
@@ -0,0 +1,35 @@
+%%%-------------------------------------------------------------------
+%% @doc dubbo_sample_service top level supervisor.
+%% @end
+%%%-------------------------------------------------------------------
+
+-module(dubbo_sample_service_sup).
+
+-behaviour(supervisor).
+
+%% API
+-export([start_link/0]).
+
+%% Supervisor callbacks
+-export([init/1]).
+
+-define(SERVER, ?MODULE).
+
+%%====================================================================
+%% API functions
+%%====================================================================
+
+start_link() ->
+ supervisor:start_link({local, ?SERVER}, ?MODULE, []).
+
+%%====================================================================
+%% Supervisor callbacks
+%%====================================================================
+
+%% Child :: {Id,StartFunc,Restart,Shutdown,Type,Modules}
+init([]) ->
+ {ok, { {one_for_all, 0, 1}, []} }.
+
+%%====================================================================
+%% Internal functions
+%%====================================================================
diff --git a/test/dubbo_sample_service_type_list.erl b/test/dubbo_sample_service_type_list.erl
new file mode 100644
index 0000000..ce46bef
--- /dev/null
+++ b/test/dubbo_sample_service_type_list.erl
@@ -0,0 +1,15 @@
+-module(dubbo_sample_service_type_list).
+
+%% API
+-export([register_type_list/0,get_list/0]).
+
+-include("dubbo_sample_service.hrl").
+
+get_list()->
+ [
+ {userInfoRequest,<<"org.apache.dubbo.erlang.sample.service.bean.UserInfoRequest">>,record_info(fields,userInfoRequest)},
+ {userRes,<<"org.apache.dubbo.erlang.sample.service.bean.UserRes">>,record_info(fields,userRes)},
+ {userInfo,<<"org.apache.dubbo.erlang.sample.service.bean.UserInfo">>,record_info(fields,userInfo)} ].
+
+register_type_list()->
+ ok.
\ No newline at end of file
diff --git a/test/dubbo_service.hrl b/test/dubbo_service.hrl
deleted file mode 100644
index 1153844..0000000
--- a/test/dubbo_service.hrl
+++ /dev/null
@@ -1,30 +0,0 @@
-%%------------------------------------------------------------------------------
-%% Licensed to the Apache Software Foundation (ASF) under one or more
-%% contributor license agreements. See the NOTICE file distributed with
-%% this work for additional information regarding copyright ownership.
-%% The ASF licenses this file to You under the Apache License, Version 2.0
-%% (the "License"); you may not use this file except in compliance with
-%% the License. You may obtain a copy of the License at
-%%
-%% http://www.apache.org/licenses/LICENSE-2.0
-%%
-%% Unless required by applicable law or agreed to in writing, software
-%% distributed under the License is distributed on an "AS IS" BASIS,
-%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-%% See the License for the specific language governing permissions and
-%% limitations under the License.
-%%------------------------------------------------------------------------------
-
--record(userInfoRequest, {
- username :: list(),
- requestId :: list()}).
-
-
--record(userInfo, {
- userName :: list(),
- userId :: list(),
- userAge :: integer()}).
-
--record(userRes, {
- userlist :: []}).
-
diff --git a/test/dubbo_service_app.erl b/test/dubbo_service_app.erl
deleted file mode 100644
index bde5980..0000000
--- a/test/dubbo_service_app.erl
+++ /dev/null
@@ -1,51 +0,0 @@
-%%------------------------------------------------------------------------------
-%% Licensed to the Apache Software Foundation (ASF) under one or more
-%% contributor license agreements. See the NOTICE file distributed with
-%% this work for additional information regarding copyright ownership.
-%% The ASF licenses this file to You under the Apache License, Version 2.0
-%% (the "License"); you may not use this file except in compliance with
-%% the License. You may obtain a copy of the License at
-%%
-%% http://www.apache.org/licenses/LICENSE-2.0
-%%
-%% Unless required by applicable law or agreed to in writing, software
-%% distributed under the License is distributed on an "AS IS" BASIS,
-%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-%% See the License for the specific language governing permissions and
-%% limitations under the License.
-%%------------------------------------------------------------------------------
--module(dubbo_service_app).
-
--behaviour(application).
-
-%% Application callbacks
--export([start/2, stop/1]).
--export([register_type_list/0]).
-
--include("dubbo_service.hrl").
-
-
-%%====================================================================
-%% API
-%%====================================================================
-
-start(_StartType, _StartArgs) ->
- register_type_list(),
- dubbo_service_sup:start_link().
-
-%%--------------------------------------------------------------------
-stop(_State) ->
- ok.
-
-%%====================================================================
-%% Internal functions
-%%====================================================================
-
-
-register_type_list() ->
- List = dubbo_service_type_list:get_list(),
- lists:map(
- fun({NativeType, ForeignType, Fields}) ->
- dubbo_type_transfer:pre_process_typedef(NativeType, ForeignType, Fields)
- end, List),
- ok.
\ No newline at end of file
diff --git a/test/dubbo_service_sup.erl b/test/dubbo_service_sup.erl
deleted file mode 100644
index eb95c4d..0000000
--- a/test/dubbo_service_sup.erl
+++ /dev/null
@@ -1,46 +0,0 @@
-%%------------------------------------------------------------------------------
-%% Licensed to the Apache Software Foundation (ASF) under one or more
-%% contributor license agreements. See the NOTICE file distributed with
-%% this work for additional information regarding copyright ownership.
-%% The ASF licenses this file to You under the Apache License, Version 2.0
-%% (the "License"); you may not use this file except in compliance with
-%% the License. You may obtain a copy of the License at
-%%
-%% http://www.apache.org/licenses/LICENSE-2.0
-%%
-%% Unless required by applicable law or agreed to in writing, software
-%% distributed under the License is distributed on an "AS IS" BASIS,
-%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-%% See the License for the specific language governing permissions and
-%% limitations under the License.
-%%------------------------------------------------------------------------------
--module(dubbo_service_sup).
-
--behaviour(supervisor).
-
-%% API
--export([start_link/0]).
-
-%% Supervisor callbacks
--export([init/1]).
-
--define(SERVER, ?MODULE).
-
-%%====================================================================
-%% API functions
-%%====================================================================
-
-start_link() ->
- supervisor:start_link({local, ?SERVER}, ?MODULE, []).
-
-%%====================================================================
-%% Supervisor callbacks
-%%====================================================================
-
-%% Child :: {Id,StartFunc,Restart,Shutdown,Type,Modules}
-init([]) ->
- {ok, {{one_for_all, 0, 1}, []}}.
-
-%%====================================================================
-%% Internal functions
-%%====================================================================
diff --git a/test/dubbo_service_type_list.erl b/test/dubbo_service_type_list.erl
deleted file mode 100644
index 6c8f04d..0000000
--- a/test/dubbo_service_type_list.erl
+++ /dev/null
@@ -1,31 +0,0 @@
-%%------------------------------------------------------------------------------
-%% Licensed to the Apache Software Foundation (ASF) under one or more
-%% contributor license agreements. See the NOTICE file distributed with
-%% this work for additional information regarding copyright ownership.
-%% The ASF licenses this file to You under the Apache License, Version 2.0
-%% (the "License"); you may not use this file except in compliance with
-%% the License. You may obtain a copy of the License at
-%%
-%% http://www.apache.org/licenses/LICENSE-2.0
-%%
-%% Unless required by applicable law or agreed to in writing, software
-%% distributed under the License is distributed on an "AS IS" BASIS,
-%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-%% See the License for the specific language governing permissions and
-%% limitations under the License.
-%%------------------------------------------------------------------------------
--module(dubbo_service_type_list).
-
-%% API
--export([register_type_list/0, get_list/0]).
-
--include("dubbo_service.hrl").
-
-get_list() ->
- [
- {userInfoRequest, <<"com.ifcoder.demo.bean.UserInfoRequest">>, record_info(fields, userInfoRequest)},
- {userInfo, <<"com.ifcoder.demo.bean.UserInfo">>, record_info(fields, userInfo)},
- {userRes, <<"com.ifcoder.demo.bean.UserRes">>, record_info(fields, userRes)}].
-
-register_type_list() ->
- ok.
\ No newline at end of file
diff --git a/test/user2.erl b/test/user2.erl
deleted file mode 100644
index 7a9daaf..0000000
--- a/test/user2.erl
+++ /dev/null
@@ -1,181 +0,0 @@
-%%------------------------------------------------------------------------------
-%% Licensed to the Apache Software Foundation (ASF) under one or more
-%% contributor license agreements. See the NOTICE file distributed with
-%% this work for additional information regarding copyright ownership.
-%% The ASF licenses this file to You under the Apache License, Version 2.0
-%% (the "License"); you may not use this file except in compliance with
-%% the License. You may obtain a copy of the License at
-%%
-%% http://www.apache.org/licenses/LICENSE-2.0
-%%
-%% Unless required by applicable law or agreed to in writing, software
-%% distributed under the License is distributed on an "AS IS" BASIS,
-%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-%% See the License for the specific language governing permissions and
-%% limitations under the License.
-%%------------------------------------------------------------------------------
--module(user2).
-
--include_lib("dubboerl/include/dubbo.hrl").
--include_lib("dubboerl/include/hessian.hrl").
-
--define(CURRENT_CLASS_NAME, <<"com.ifcoder.demo.facade.User"/utf8>>).
--define(CURRENT_CLASS_VERSION, <<"0.0.0"/utf8>>).
-
--include("dubbo_service.hrl").
-
-
--export([test/0]).
-
-%% API
--export([
- getUserInfo/1,
- getUserInfo/2,
- genUserId/0,
- genUserId/1,
- queryUserInfo/1,
- queryUserInfo/2,
- queryUserList/1,
- queryUserList/2]).
-
--export([get_method_999_list/0]).
-
-%% behaviour
--callback getUserInfo(Arg0 :: list()) -> #userInfo{}.
--callback genUserId() -> list().
--callback queryUserInfo(Arg0 :: #userInfoRequest{}) -> #userInfo{}.
--callback queryUserList(Arg0 :: list()) -> #userRes{}.
-
-get_method_999_list() ->
- [
- getUserInfo,
- genUserId,
- queryUserInfo,
- queryUserList].
-
-
-
--spec getUserInfo(Arg0 :: list()) ->
- {ok, reference()}|
- {ok, reference(), Data :: #userInfo{}, RpcContent :: list()}|
- {error, Reason :: timeout|no_provider|any()}.
-getUserInfo(Arg0) ->
- getUserInfo(Arg0, #{}).
-
-getUserInfo(Arg0, RequestOption) ->
-
- Data = #dubbo_rpc_invocation{
- className = ?CURRENT_CLASS_NAME,
- classVersion = ?CURRENT_CLASS_VERSION,
- methodName = <<"getUserInfo">>,
- parameterDesc = <<"Ljava/lang/String;"/utf8>>,
- parameterTypes = [
- #type_def{foreign_type = <<"java.lang.String">>,
- native_type = string,
- fieldnames = []}
- ],
- parameters = [
- Arg0
- ],
- attachments = [
- {<<"path">>, ?CURRENT_CLASS_NAME},
- {<<"interface">>, ?CURRENT_CLASS_NAME}
- ]
- },
- Request = dubbo_adapter:reference(Data),
- dubbo_invoker:invoke_request(?CURRENT_CLASS_NAME, Request, RequestOption).
-
-
--spec genUserId() ->
- {ok, reference()}|
- {ok, reference(), Data :: list(), RpcContent :: list()}|
- {error, Reason :: timeout|no_provider|any()}.
-genUserId() ->
- genUserId(#{}).
-
-genUserId(RequestOption) ->
-
- Data = #dubbo_rpc_invocation{
- className = ?CURRENT_CLASS_NAME,
- classVersion = ?CURRENT_CLASS_VERSION,
- methodName = <<"genUserId">>,
- parameterDesc = <<""/utf8>>,
- parameterTypes = [
-
- ],
- parameters = [
-
- ],
- attachments = [
- {<<"path">>, ?CURRENT_CLASS_NAME},
- {<<"interface">>, ?CURRENT_CLASS_NAME}
- ]
- },
- Request = dubbo_adapter:reference(Data),
- dubbo_invoker:invoke_request(?CURRENT_CLASS_NAME, Request, RequestOption).
-
-
--spec queryUserInfo(Arg0 :: #userInfoRequest{}) ->
- {ok, reference()}|
- {ok, reference(), Data :: #userInfo{}, RpcContent :: list()}|
- {error, Reason :: timeout|no_provider|any()}.
-queryUserInfo(Arg0) ->
- queryUserInfo(Arg0, #{}).
-
-queryUserInfo(Arg0, RequestOption) ->
-
- Data = #dubbo_rpc_invocation{
- className = ?CURRENT_CLASS_NAME,
- classVersion = ?CURRENT_CLASS_VERSION,
- methodName = <<"queryUserInfo">>,
- parameterDesc = <<"Lcom/ifcoder/demo/bean/UserInfoRequest;"/utf8>>,
- parameterTypes = [
- #type_def{foreign_type = <<"com.ifcoder.demo.bean.UserInfoRequest">>,
- native_type = userInfoRequest,
- fieldnames = record_info(fields, userInfoRequest)}
- ],
- parameters = [
- Arg0
- ],
- attachments = [
- {<<"path">>, ?CURRENT_CLASS_NAME},
- {<<"interface">>, ?CURRENT_CLASS_NAME}
- ]
- },
- Request = dubbo_adapter:reference(Data),
- dubbo_invoker:invoke_request(?CURRENT_CLASS_NAME, Request, RequestOption).
-
-
--spec queryUserList(Arg0 :: list()) ->
- {ok, reference()}|
- {ok, reference(), Data :: #userRes{}, RpcContent :: list()}|
- {error, Reason :: timeout|no_provider|any()}.
-queryUserList(Arg0) ->
- queryUserList(Arg0, #{}).
-
-queryUserList(Arg0, RequestOption) ->
-
- Data = #dubbo_rpc_invocation{
- className = ?CURRENT_CLASS_NAME,
- classVersion = ?CURRENT_CLASS_VERSION,
- methodName = <<"queryUserList">>,
- parameterDesc = <<"Ljava/lang/String;"/utf8>>,
- parameterTypes = [
- #type_def{foreign_type = <<"java.lang.String">>,
- native_type = string,
- fieldnames = []}
- ],
- parameters = [
- Arg0
- ],
- attachments = [
- {<<"path">>, ?CURRENT_CLASS_NAME},
- {<<"interface">>, ?CURRENT_CLASS_NAME}
- ]
- },
- Request = dubbo_adapter:reference(Data),
- dubbo_invoker:invoke_request(?CURRENT_CLASS_NAME, Request, RequestOption).
-
-
-test() ->
- queryUserInfo(#userInfoRequest{username = "name", requestId = "111"}, #{sync=> true}).
\ No newline at end of file
diff --git a/test/userOperator.erl b/test/userOperator.erl
new file mode 100644
index 0000000..0d35917
--- /dev/null
+++ b/test/userOperator.erl
@@ -0,0 +1,164 @@
+-module(userOperator).
+
+-include_lib("dubboerl/include/dubbo.hrl").
+-include_lib("dubboerl/include/hessian.hrl").
+
+-define(CURRENT_CLASS_NAME,<<"org.apache.dubbo.erlang.sample.service.facade.UserOperator"/utf8>>).
+-define(CURRENT_CLASS_VERSION,<<"0.0.0"/utf8>>).
+
+-include("dubbo_sample_service.hrl").
+
+
+
+-export([test/0]).
+%% API
+-export([
+ getUserInfo/1,
+ getUserInfo/2,
+ genUserId/0,
+ genUserId/1,
+ queryUserInfo/1,
+ queryUserInfo/2,
+ queryUserList/1,
+ queryUserList/2]).
+
+-export([get_method_999_list/0]).
+
+%% behaviour
+-callback getUserInfo(Arg0::list())-> #userInfo{}.
+-callback genUserId()-> list().
+-callback queryUserInfo(Arg0::#userInfoRequest{})-> #userInfo{}.
+-callback queryUserList(Arg0::list())-> #userRes{}.
+
+get_method_999_list()->
+ [
+ getUserInfo,
+ genUserId,
+ queryUserInfo,
+ queryUserList].
+
+
+
+-spec getUserInfo(Arg0::list())->
+ {ok,reference()}|
+ {ok,reference(),Data::#userInfo{},RpcContent::list()}|
+ {error,Reason::timeout|no_provider|any()}.
+getUserInfo(Arg0)->
+ getUserInfo(Arg0 ,#{}).
+
+getUserInfo(Arg0, RequestOption)->
+
+ Data = #dubbo_rpc_invocation{
+ className = ?CURRENT_CLASS_NAME,
+ classVersion = ?CURRENT_CLASS_VERSION,
+ methodName = <<"getUserInfo">>,
+ parameterDesc = <<"Ljava/lang/String;"/utf8>>,
+ parameterTypes = [
+ #type_def{foreign_type = <<"java.lang.String">>,
+ native_type = string,
+ fieldnames = []}
+ ],
+ parameters = [
+ Arg0
+ ],
+ attachments = [
+ {<<"path">>, ?CURRENT_CLASS_NAME},
+ {<<"interface">> , ?CURRENT_CLASS_NAME}
+ ]
+ },
+ Request = dubbo_adapter:reference(Data),
+ dubbo_invoker:invoke_request(?CURRENT_CLASS_NAME,Request,RequestOption).
+
+
+-spec genUserId()->
+ {ok,reference()}|
+ {ok,reference(),Data::list(),RpcContent::list()}|
+ {error,Reason::timeout|no_provider|any()}.
+genUserId()->
+ genUserId( #{}).
+
+genUserId( RequestOption)->
+
+ Data = #dubbo_rpc_invocation{
+ className = ?CURRENT_CLASS_NAME,
+ classVersion = ?CURRENT_CLASS_VERSION,
+ methodName = <<"genUserId">>,
+ parameterDesc = <<""/utf8>>,
+ parameterTypes = [
+
+ ],
+ parameters = [
+
+ ],
+ attachments = [
+ {<<"path">>, ?CURRENT_CLASS_NAME},
+ {<<"interface">> , ?CURRENT_CLASS_NAME}
+ ]
+ },
+ Request = dubbo_adapter:reference(Data),
+ dubbo_invoker:invoke_request(?CURRENT_CLASS_NAME,Request,RequestOption).
+
+
+-spec queryUserInfo(Arg0::#userInfoRequest{})->
+ {ok,reference()}|
+ {ok,reference(),Data::#userInfo{},RpcContent::list()}|
+ {error,Reason::timeout|no_provider|any()}.
+queryUserInfo(Arg0)->
+ queryUserInfo(Arg0 ,#{}).
+
+queryUserInfo(Arg0, RequestOption)->
+
+ Data = #dubbo_rpc_invocation{
+ className = ?CURRENT_CLASS_NAME,
+ classVersion = ?CURRENT_CLASS_VERSION,
+ methodName = <<"queryUserInfo">>,
+ parameterDesc = <<"Lorg/apache/dubbo/erlang/sample/service/bean/UserInfoRequest;"/utf8>>,
+ parameterTypes = [
+ #type_def{foreign_type = <<"org.apache.dubbo.erlang.sample.service.bean.UserInfoRequest">>,
+ native_type = userInfoRequest,
+ fieldnames = record_info(fields,userInfoRequest)}
+ ],
+ parameters = [
+ Arg0
+ ],
+ attachments = [
+ {<<"path">>, ?CURRENT_CLASS_NAME},
+ {<<"interface">> , ?CURRENT_CLASS_NAME}
+ ]
+ },
+ Request = dubbo_adapter:reference(Data),
+ dubbo_invoker:invoke_request(?CURRENT_CLASS_NAME,Request,RequestOption).
+
+
+-spec queryUserList(Arg0::list())->
+ {ok,reference()}|
+ {ok,reference(),Data::#userRes{},RpcContent::list()}|
+ {error,Reason::timeout|no_provider|any()}.
+queryUserList(Arg0)->
+ queryUserList(Arg0 ,#{}).
+
+queryUserList(Arg0, RequestOption)->
+
+ Data = #dubbo_rpc_invocation{
+ className = ?CURRENT_CLASS_NAME,
+ classVersion = ?CURRENT_CLASS_VERSION,
+ methodName = <<"queryUserList">>,
+ parameterDesc = <<"Ljava/lang/String;"/utf8>>,
+ parameterTypes = [
+ #type_def{foreign_type = <<"java.lang.String">>,
+ native_type = string,
+ fieldnames = []}
+ ],
+ parameters = [
+ Arg0
+ ],
+ attachments = [
+ {<<"path">>, ?CURRENT_CLASS_NAME},
+ {<<"interface">> , ?CURRENT_CLASS_NAME}
+ ]
+ },
+ Request = dubbo_adapter:reference(Data),
+ dubbo_invoker:invoke_request(?CURRENT_CLASS_NAME,Request,RequestOption).
+
+test() ->
+ queryUserInfo(#userInfoRequest{username = "name", requestId = "111"}, #{sync=> true}).
\ No newline at end of file