At the moment can you please guide me how to configure these erlsom and erlsoap packages.<br><br>Normally in erlang shell I can invoke erlang modules like<br><br>module_name:fundction(parameters).<br><br>How to configure above packages with the existing erlang system.<br>
<br>Thanks in advance for your kind reply <br><br> Regards<br> Thilani<br><br> Computer Science and Engineering<br> University of Moratuwa<br> Sri Lanka<br> <a href="http://www.thilani.blogspot.com/" target="_blank">http://www.thilani.blogspot.com</a><br>
<a href="http://www.cgmax.blogspot.com/" target="_blank">http://www.cgmax.blogspot.com</a> <br><br><div class="gmail_quote">On Tue, Jun 3, 2008 at 11:49 AM, Willem de Jong <<a href="mailto:w.a.de.jong@gmail.com">w.a.de.jong@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>Hi Thilani,</div>
<div> </div>
<div>Do you need to implement a client (sending a request and receiving a response) or a server (receiving a request and sending a response)?</div>
<div> </div>
<div>For a server the code could look something like this:</div>
<div> </div>
<div><font face="courier new,monospace">-module(minimal_soap_server).<br>-compile(export_all).</font></div>
<p><font face="courier new,monospace">-include("sms.hrl"). % .hrl file generated by erlsom</font></p>
<p><font face="courier new,monospace">start() -><br> mod_soap:start(),<br> ok = mod_soap:add_callback("/parlay_sms", <br> "parlayx_sms_send_service_3_1.wsdl", <br> fun(_I, _Header, Body) -> handler(Body) end).</font></p>
<p><font face="courier new,monospace">handler([#'p:sendSms'{addresses = To,<br> message = Text}]) -><br> {ok, send(To, Text)}.</font></p>
<p><font face="courier new,monospace">send(To, Text) -><br> [#'p:sendSmsResponse'{'result' = "sending " ++ Text ++ " to: " ++ To}].</font></p>
<div>As you can see, you need to have a WSDL.</div>
<div> </div>
<div>You need to install erlsoap and erlsom. That should be relatively easy: download the files, put them in the right place and compile them. I think you also need to provide a simple configuration file for erlsoap. Let me know if you need more information.</div>
<div> </div>
<div>A simple client might look like this:</div>
<div> </div>
<div><font face="courier new,monospace">-module(minimal_client).<br>-export([sms/2]).</font></div>
<p><font face="courier new,monospace">-include("sms.hrl").<br>sms(To, Text) -><br> Wsdl = yaws_soap_lib:initModel("</font><a><font face="courier new,monospace">file://parlayx_sms_send_service_3_1.wsdl</font></a><font face="courier new,monospace">"),<br>
Sms = #'p:sendSms'{addresses = [To],<br> senderName = "Sender",<br> message = Text},<br> yaws_soap_lib:call(Wsdl, "sendSms", [], [Sms]).<br></font></p>
<div><br>This uses the soap client code provided with yaws, but the erlsoap client is essentially the same. Again you will need a WSDL, and erlsom has to be installed.</div>
<div> </div>
<div>Good luck,</div>
<div>Willem<br> </div>
<div><div><div></div><div class="Wj3C7c"><span class="gmail_quote">On 6/2/08, <b class="gmail_sendername">Thilani Abeysinghe</b> <<a href="mailto:a.thilani@gmail.com" target="_blank">a.thilani@gmail.com</a>> wrote:</span>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;"><div><div></div><div class="Wj3C7c"> Hi All<br> I want to use ErlSoap package for sending SOAP messages using Erlang.<br>
Can you please tell me how to configure the Erlsoap package.I use windows<br>
platform<br> Thanks in Advance<br><br> Regards<br> Thilani<br><br> Computer Science and Engineering<br> University of Moratuwa<br> Sri Lanka<br> <a href="http://www.thilani.blogspot.com/" target="_blank">http://www.thilani.blogspot.com</a><br>
<a href="http://www.cgmax.blogspot.com/" target="_blank">http://www.cgmax.blogspot.com</a> <br></div></div>_______________________________________________<br>erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br><a href="http://www.erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div><br>
</blockquote></div><br>