Permalink
Browse files

support on addtional specified prefix when rpc call by method: yaws_s…

…oap_lib:call.
  • Loading branch information...
1 parent d8df08c commit 813f032e953a477a8d2046634bbf047ed737a0c9 @ericliang ericliang committed with Nov 20, 2009
Showing with 18 additions and 1 deletion.
  1. +18 −1 src/yaws_soap_lib.erl
View
19 src/yaws_soap_lib.erl
@@ -12,7 +12,7 @@
-export([initModel/1, initModel/2,
initModelFile/1,
config_file_xsd/0,
- call/3, call/4, call/6,
+ call/3, call/4, call/5, call/6,
call_attach/4, call_attach/5, call_attach/7,
write_hrl/2, write_hrl/3,
findHeader/2,
@@ -112,6 +112,23 @@ call(Wsdl, Operation, ListOfData) when is_record(Wsdl, wsdl) ->
end.
%%% --------------------------------------------------------------------
+%%% With additional specified prefix
+%%% --------------------------------------------------------------------
+call(WsdlURL, Operation, ListOfData, prefix, Prefix) when is_list(WsdlURL) ->
+ Wsdl = initModel(WsdlURL, Prefix),
+ call(Wsdl, Operation, ListOfData, prefix, Prefix );
+call(Wsdl, Operation, ListOfData, prefix, Prefix) when is_record(Wsdl, wsdl) ->
+ case get_operation(Wsdl#wsdl.operations, Operation) of
+ {ok, Op} ->
+ Msg = mk_msg(Prefix, Operation, ListOfData),
+ call(Wsdl, Operation, Op#operation.port,
+ Op#operation.service, [], Msg);
+ Else ->
+ Else
+ end.
+
+
+%%% --------------------------------------------------------------------
%%% Takes the actual records for the Header and Body message.
%%% --------------------------------------------------------------------
call(WsdlURL, Operation, Header, Msg) when is_list(WsdlURL) ->

0 comments on commit 813f032

Please sign in to comment.