[erlang-questions] \bclarify: Exception on erlsom:write_xsd_hrl_file for XMLSchema

Mike Ziebeck mike@REDACTED
Sat Jun 6 16:15:38 CEST 2009


Willem de Jong schrieb:
> Hello Mike,
>  
> 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.
Hello Willem,

 indeed. My fault. Because of the in-document schema definition of those 
WSDL
 files I was a little too optimistic erlsom:write_xsd_hrl_file() could 
do the
 job. So for now I've got an other real world .xsd that erlsom cannot 
handle.
 It's the SOAP 1.1 .XSD found here: 
http://schemas.xmlsoap.org/soap/encoding/
 resulting in:

 erlsom_test: write_xsd_hrl_file_test_ (info: not working)...*failed*
 ::throw:{error,"Group or anonymous sequence nested too deep"}
  in function erlsom_writeHrl:writeXsdHrlFile/2
  in call from erlsom:write_xsd_hrl_file/3

 To reproduce that using eunit-2.1.1. see the attached unit testing
 modul.

Regards,
Mike

-- Output as follows:
=======================================================
Erlang R13B (erts-5.7.1) [smp:2:2] [rq:2] [async-threads:0]

(node_a@REDACTED)1> erlsom_test:test().
erlsom_test: write_xsd_hrl_file_test_ (info: not working)...*failed*
::throw:{error,
          [{exception,{error,{"2 - Unexpected event, expected end-tag"}}},
           {stack,[schemaType]},
           {received,
               {startElement,"http://www.w3.org/2001/XMLSchema","notation",
                   "xs",
                   [{attribute,"system",[],[],
                        "http://www.w3.org/2000/08/XMLSchema.xsd"},
                    {attribute,"public",[],[],[...]},
                    {attribute,"name",[],[],...}]}}]}
  in function erlsom_writeHrl:writeXsdHrlFile/2
  in call from erlsom:write_xsd_hrl_file/3


erlsom_test: write_xsd_hrl_file_test_ (info: not working)...*failed*
::throw:{error,"Group or anonymous sequence nested too deep"}
  in function erlsom_writeHrl:writeXsdHrlFile/2
  in call from erlsom:write_xsd_hrl_file/3


=======================================================
  Failed: 2.  Skipped: 0.  Passed: 7.
error

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: erlsom_test.erl
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20090606/5e6c9ea9/attachment.ksh>


More information about the erlang-questions mailing list