<div>Hello Mike,</div>
<div> </div>
<div>If I understand correctly, most of your tests are using a WSDL file as input for the erlsom:write_xsd_hrl_file() function. That doesn't work, because this function expects an XSD as its input.</div>
<div> </div>
<div>If you want to create a .hrl file from a WSDL file, you can try the function erlsoap_lib:write_hrl(Url, Target). When I tried this, it worked for the weather forecast example. It didn't work for the Foreclosures example, because the URL didn't return a WSDL. It also didn't work for the SEMP example, because the WSDL contains an empty <extension /> tag, which is illegal (if I understand the XML Schema spec correctly).</div>

<div> </div>
<div>I have to say that you are likely to meet with some challenges it you try to use erlsoap. Not because of erlsom, but rather because erlsoap is not really ready. I think many people would welcome proper support for SOAP in Erlang, but it looks like nobody is willing to do the work. Possibly because the people who are willing and able to do open source software development dislike SOAP (who can blame them...), and the ones that are more or less forced to use SOAP don't have the time to do the work.</div>

<div> </div>
<div>Regards,</div>
<div>Willem <br></div>
<div class="gmail_quote">On Thu, May 21, 2009 at 10:24 AM, Mike Ziebeck <span dir="ltr"><<a href="mailto:mike@ziebeck.net">mike@ziebeck.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Willem de Jong schrieb:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hello Mike, 
<div class="im"><br> ..<br>If you just wanted to test the capabilities of Erlsom, then I suggest you do a couple more tests with more "normal" schema's<br></div></blockquote><br>Hello Willem,<br><br>my aim was to explore the capabilities of erlang to client/serve for SOA.<br>
<br>Starting out with erlsoap (using it, creating the model from WSDL failed),<br>I went down the stairs of abstraction stepwise. OTP::xmerl now parses the<br>XMLSchema file after ensuring it can find additional schema definition<br>
files like datatypes.dtd & XMLSchema.dtd. So I tryed to come back to<br>erlsom and see, if its working with datatypes.dtd & XMLSchema.dtd in<br>its path - before trying erlsoap again. 
<div class="im"><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">(let me know if you encounter more problems..).<br></blockquote></div>I have tested some more WSDL from the net and they cause erlsom throw<br>
exceptions too. Examples are:<br><br> %% not working [WebService: USA Weather Forecast]<br> %% not working [WebService: Bank Foreclosures Database]<br> %% not working [WebService: Simple Event Management Protocol Service]<br>
<br>See the attached file for more reproduction code. <br>
<div class="im">
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">For example, you could do:<br>15> erlsom:scan_file("BookStore.xsd", erlsom_parseXsd:xsdModel()).<br>
</blockquote></div>Ok, I'll check this out.<br><br>Thanks,<br><font color="#888888"> Mike<br></font><br>%% Author: Mike Ziebeck<br>%% Created: 20.05.2009<br>%% Description: Test case modul for erlsom<br>-module(erlsomtest).<br>
<br>%%<br>%% Include files<br>%%<br><br>%%<br>%% Exported Functions<br>%%<br>-export([test/0]).<br><br>%%<br>%% API Functions<br>%%<br><br>%%<br>%% function:    test/0<br>%% description: download + write *.hdr file for <a href="http://www.w3.org/2001/XMLSchema" target="_blank">www.w3.org/2001/XMLSchema</a><br>
%%<br>test() -><br>   %% not working [XMLSchema]<br>   %% {Prefix,Url}={"xml_schema","<a href="http://www.w3.org/2001/XMLSchema.xsd" target="_blank">http://www.w3.org/2001/XMLSchema.xsd</a>"},<br>   %% not working [WebService: USA Weather Forecast]<br>
       %% {Prefix,Url}={"WeatherForecast","<a href="http://www.webservicex.net/WeatherForecast.asmx?WSDL" target="_blank">http://www.webservicex.net/WeatherForecast.asmx?WSDL</a>"},<br>       %% not working [WebService: Bank Foreclosures Database]<br>
   %% {Prefix,Url}={"BankForeclosures","<a href="http://www.foreclosuredatabank.com/soapserver.php?wsdl" target="_blank">http://www.foreclosuredatabank.com/soapserver.php?wsdl</a>"},<br>       %% not working [WebService: Simple Event Management Protocol Service]<br>
   {Prefix,Url}={"SEMP","<a href="http://service.utilitystatus.com/semp/services/semp?wsdl" target="_blank">http://service.utilitystatus.com/semp/services/semp?wsdl</a>"},<br>       %% working [xmlsoap-envelope]<br>
   %% {Prefix,Url}={"soap_envelope","<a href="http://schemas.xmlsoap.org/soap/envelope/" target="_blank">http://schemas.xmlsoap.org/soap/envelope/</a>"},<br>       inets:start(),<br>   FileName = filename:join([filename:dirname(code:which(?MODULE)), Prefix]),<br>
       {ok, {{"HTTP/1.1", 200, "OK"}, _HeadRcv, Body}} = http:request(Url),<br>       file:write_file(FileName++".xsd", list_to_binary(Body)),<br>       erlsom:write_xsd_hrl_file(FileName++".xsd", FileName++".hrl").<br>
<br>%%<br>%% Local Functions<br>%%<br></blockquote></div><br>