-
Notifications
You must be signed in to change notification settings - Fork 75
Open
Description
Hi,
I use the library to consume SOAP service and when error 500 occurres, the XML returns as string, like following:
{:error,
{:client,
{:parsing_message, 500,
[{'connection', 'close'}, {'date', 'Mon, 21 Aug 2017 09:13:58 GMT'},
{'server', 'serverName'}, {'content-length', '525'},
{'content-type', 'text/xml;charset=utf-8'}], :error, :function_clause}},
"<?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S=\"http://schemas.xmlsoap.org/soap/envelope/\"><S:Body><S:Fault xmlns:ns4=\"http://www.w3.org/2003/05/soap-envelope\"><faultcode>S:Server</faultcode><faultstring>FailtString</faultstring><detail><ns2:RecordName xmlns:ns2=\"http://soap.url\"><errorCode>NOT_FOUND</errorCode><message>Error Message</message></ns2:RecordName></detail></S:Fault></S:Body></S:Envelope>"}
There is generated record for fault message, but it is not used.
-record('P:RecordName ', {
errorCode :: string() | undefined,
message :: string() | undefined}).
How to make it parse XML into a erlang records when SOAP service returns an error?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels