Skip to content

Commit

Permalink
Parse soap 1.1 faults
Browse files Browse the repository at this point in the history
  • Loading branch information
deadtrickster committed Feb 9, 2018
1 parent 856b5c4 commit 1b85a23
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 94 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ rel/example_project
*~
logs
rebar.lock
.rebar3
5 changes: 3 additions & 2 deletions src/soap_client_util.erl
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ parse_mime(Message, Model, Http_status, Http_headers,

parse_xml(Message, Model, Http_status, Http_headers,
Version, Ns, Handler, Attachments, HTTP_body) ->
try erlsom:parse_sax(Message,
try erlsom:parse_sax(Message,
#p_state{model = Model, version = Version,
soap_ns = Ns, state = start,
handler = Handler},
Expand Down Expand Up @@ -356,8 +356,9 @@ xml_parser_cb({startElement, Ns, "Fault", _Prfx, _Attrs} = Event,
#p_state{state = body,
version = Version,
namespaces = Namespaces,
model = Model,
soap_ns = Ns} = S) ->
Start_state = soap_fault:parse_fault_start(Version),
Start_state = soap_fault:parse_fault_start(Version, Model),
Fault_parser = fun soap_fault:parse_fault/3,
S1 = parse_event(Fault_parser, startDocument, Namespaces, Start_state),
%% the event that we just received from the sax parser is recycled
Expand Down
Loading

0 comments on commit 1b85a23

Please sign in to comment.