bet365 / soap

Make it easy to use SOAP from Erlang
Apache License 2.0
200 stars 74 forks source link

WSDL - #26

Open ulutomaz opened 7 years ago

ulutomaz commented 7 years ago

Hi,

while trying to go with the procedure, I get an error while calling soap:wsdl2erlang("<local fs .wsdl>")


. . . Which http client must be used? 1: ibrowse 2: inets Select a number: 1 ** exception error: no match of right hand side value {error,[{exception,{error,"Unexpected attribute (not namespace qualified): final"}}, {stack,[schemaType]}, {received,{startElement,"http://www.w3.org/2001/XMLSchema", "simpleType","xs", [{attribute,"final",[],[],"restriction"}, {attribute,"name",[],[],"LocationServiceType"}]}}]}


Though, if I use SoapUI with this wsdl and it works.

This error is something that I don't know how to interpret.

I am really not sure how to proceed

Best

willemdj commented 6 years ago

This is probably an error in erlsom, the XML parser. It should accept the 'final' attribute here (as it does elsewhere).

The solution is easy (if not very satisfactory): simply remove it. The 'final' attribute imposes some restrictions on the messages, but erlsom will not enforce those anyway. Erlsom does do quite a few checks on the structure of the messages, but it is not exhaustive, see the limitations listed in the erlsom README.