<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hello,</div><div><br></div><div>Yes, simples solution is httpc + xmerl for xml parsing. All components are otp built-in. </div><div>but ready made soap client might give you some advantage on envelope parsing.</div><div><br></div><div>- Dmitry</div><br><div><div>On Nov 17, 2012, at 7:27 PM, Thomas Elsgaard wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">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/">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/">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/">http://schemas.xmlsoap.org/soap/envelope/</a>" xmlns:SOAP-ENC="<a href="http://schemas.xmlsoap.org/soap/encoding/">http://schemas.xmlsoap.org/soap/encoding/</a>" xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>" xmlns:xsd="<a href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</a>" xmlns:ns="<a href="http://schemas.ericsson.com/cai3g1.0/2003/05/30/">http://schemas.ericsson.com/cai3g1.0/2003/05/30/</a>" xmlns:ns2="<a href="http://schemas.ericsson.com/cai3g1.0/2004/01/22/">http://schemas.ericsson.com/cai3g1.0/2004/01/22/</a>" xmlns:ns3="<a href="http://schemas.ericsson.com/cai3g1.1/">http://schemas.ericsson.com/cai3g1.1/</a>" xmlns:ns4="<a href="http://schemas.ericsson.com/cai3g1.2/">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>erlang-questions mailing list<br><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>http://erlang.org/mailman/listinfo/erlang-questions<br></blockquote></div><br></body></html>