willemdj/erlsom — Issue #8: Problem using detergent
Author: goddang
Created: 2011-11-03 22:26:38+00:00
State: open

Hi,

I'm using detergent as a soap client and have this code:
SoapRes = detergent:call(Wsdl, "GenerateChallenge", [],
[#'p:GenerateChallengeRequest'{provider = Client},
#'p:GenerateChallengeRequest'{transactionID = "1"},
#'p:GenerateChallengeRequest'{policy = "Test"}]),

it gives me this erlsom error which I can't understand:
{error,{error,function_clause,
[{erlsom_write,processAnyAttributes,
[2,[],
[{ns,"http://schemas.xmlsoap.org/soap/envelope/",
"soap"},
{ns,"http://www.w3.org/2001/XMLSchema","xsd"},
{ns,"urn:www.sll.se/wsdl/soap/osif","p"}],
{[{"soap",
"http://schemas.xmlsoap.org/soap/envelope/"}],
0}]},
{erlsom_write,processAlternativeValue,8},
{erlsom_write,processElementValues,7},
{erlsom_write,struct2xml,6},
{erlsom_write,processAlternativeValue,8},
{erlsom_write,processElementValues,7},
{erlsom_write,struct2xml,6},
{erlsom_write,processAlternativeValue,8}]}}

My record looks like this:
-record('p:GenerateChallengeRequest', {'provider', 'transactionID', 'policy'}).

My record used to look like this:
-record('p:GenerateChallengeRequest', {anyAttribs, 'provider', 'transactionID', 'policy'}).

as autogenerated from write_hlr() but erlsom kept complaining about nil values so I changed it.

/dang