Skip to content

Commit

Permalink
support on addtional specified prefix when rpc call by method: yaws_s…
Browse files Browse the repository at this point in the history
…oap_lib:call.
  • Loading branch information
ericliang authored and Claes Wikstrom committed Nov 23, 2009
1 parent d8df08c commit 813f032
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/yaws_soap_lib.erl
Expand Up @@ -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,
Expand Down Expand Up @@ -111,6 +111,23 @@ call(Wsdl, Operation, ListOfData) when is_record(Wsdl, wsdl) ->
Else
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.
%%% --------------------------------------------------------------------
Expand Down

0 comments on commit 813f032

Please sign in to comment.