<p>Hi Thomas,</p>
<p>if all you really need, is that one specific call, then rolling your own simple solution with httpc and xmerl is the quickest route. And xmerl_xs is very handy for retrieving the result value.</p>
<p>Only when you get to the stage of dealing with multiple SOAP operations and more complicated XML structures does something more "integrated" become viable.</p>
<p>Robby<br>
</p>
<div class="gmail_quote">On Nov 17, 2012 5:27 PM, "Thomas Elsgaard" <<a href="mailto:thomas.elsgaard@gmail.com">thomas.elsgaard@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi list<div><br></div><div>I need to interface with an SOAP service, and i would like to keep it as simple as possible, so basically i would like just to send the XML via HTTP and parse the response, what is the best approach for this with Erlang?</div>

<div><br></div><div>Could i use httpc, or should i go for the SOAP client via Yaws? </div><div><br></div><div>The request i need to send is:</div><div><br></div><div>-------------------------</div><div><?xml version="1.0" encoding="UTF-8"?></div>

<div><soapenv:Envelope xmlns:soapenv="<a href="http://schemas.xmlsoap.org/soap/envelope/" target="_blank">http://schemas.xmlsoap.org/soap/envelope/</a>"></div><div>    <soapenv:Header /></div><div>    <Body></div>

<div>        <ns:Login xmlns:ns="<a href="http://schemas.ericsson.com/cai3g1.1/" target="_blank">http://schemas.ericsson.com/cai3g1.1/</a>"></div><div>            <ns:userId>"xxxx"</ns:userId></div>
<div>
            <ns:pwd>"xxxx"</ns:pwd></div><div>        </ns:Login></div><div>    </Body></div><div></soapenv:Envelope> </div><div>-------------------------</div><div><br></div><div>
And i need to get the sessionId in the response:</div>
<div><br></div><div>-------------------------</div><div><div><?xml version="1.0" encoding="UTF-8"?></div><div><SOAP-ENV:Envelope xmlns:SOAP-ENV="<a href="http://schemas.xmlsoap.org/soap/envelope/" target="_blank">http://schemas.xmlsoap.org/soap/envelope/</a>" xmlns:SOAP-ENC="<a href="http://schemas.xmlsoap.org/soap/encoding/" target="_blank">http://schemas.xmlsoap.org/soap/encoding/</a>" xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>" xmlns:xsd="<a href="http://www.w3.org/2001/XMLSchema" target="_blank">http://www.w3.org/2001/XMLSchema</a>" xmlns:ns="<a href="http://schemas.ericsson.com/cai3g1.0/2003/05/30/" target="_blank">http://schemas.ericsson.com/cai3g1.0/2003/05/30/</a>" xmlns:ns2="<a href="http://schemas.ericsson.com/cai3g1.0/2004/01/22/" target="_blank">http://schemas.ericsson.com/cai3g1.0/2004/01/22/</a>" xmlns:ns3="<a href="http://schemas.ericsson.com/cai3g1.1/" target="_blank">http://schemas.ericsson.com/cai3g1.1/</a>" xmlns:ns4="<a href="http://schemas.ericsson.com/cai3g1.2/" target="_blank">http://schemas.ericsson.com/cai3g1.2/</a>"></div>

<div>    <SOAP-ENV:Header></SOAP-ENV:Header></div><div>    <SOAP-ENV:Body></div><div>        <ns3:LoginResponse></div><div>            <ns3:sessionId>84c3646484c36464000000001353168328092</ns3:sessionId></div>

<div>            <ns3:baseSequenceId>5584289115023516944</ns3:baseSequenceId></div><div>        </ns3:LoginResponse></div><div>    </SOAP-ENV:Body></div><div></SOAP-ENV:Envelope></div></div>
<div>
<div>-------------------------</div><div></div></div><div><br></div>
<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div>