Closed RomanShestakov closed 12 years ago
Hi Roman,
I am afraid that this is indeed missing.
If you only require it for writing, it would probably be easy to fix it. You would still have to provide a "nil" value, though.
If you also require it for reading (parsing), then I think it will be a bit more complicated, but probably still not very difficult. Nevertheless, I don't think I will find the time to do it in the next couple of weeks, sorry.
Regards, Willem
Thanks a lot Willem, this would be super useful, found another case when nillable value is not parsed correctly in the reply from the web service, if you want can try to create a test case for this as well.
Regards, Roman
one more comment:
the following soap request (for example above with getAllMarket service) works:
I improved the handling of xsi:nil values. It should work now (see the documentation for an example).
hi,
I am trying to implement erlang-based gateway to betfair, betting exchange, which has SOAP based APi.
I am using Erlsom to parse Wsdl and soap and "detergent" to make soap calls. Detergent is basically a clone of yaws soap module.
Unfortunately, I keep running into all sort of issues, some of them seem to be related to Erlsom parsing features
e.g. the current issue, erlsom fails to parse a call with nillable arguments.
to replicate:
you should get :
exception throw: {error,"No value provided for non-optional element"} in function erlsom_write:struct2xml/6 in call from erlsom_write:processAlternativeValue/8 in call from erlsom_write:processElementValues/7 in call from erlsom_write:struct2xml/6 in call from erlsom_write:processAlternativeValue/8 in call from erlsom_write:processElementValues/7 in call from erlsom_write:struct2xml/6 in call from erlsom_write:processAlternativeValue/8
the example in test_case.erl module is doing the following:
getAllMarkets, expects one mandatory param, header of type 'P:APIRequestHeader' and 5 other params, which are optional, and which i want to avoid specifying.
here is the desc. of GetAll MarketsReq from wsdl, it specs params as nillable.