You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following is from Willem de Jong, the primary contributor of the Yaws SOAP support.
Unfortunately this is not as easy as it should be. One of the problems is the fact that the faultcode element has to be a qualified name. It might for example look like this:
Note that the soap: in the value has to match the prefix of a declared namespace, and the declaration of namespaces is something that is kind of hard to control (it is something that you would typically like your libraries to take care of).
You could try to do this (using some undocumented erlsom support for qualified names):
Note that I used ok instead of error, and that I used a tuple with 5 elements in order to be able to specify the result code (500).
Alternatively, you can have a look at the result() function in yaws_soap_srv.erl and the makeFault() function in yaws_soap_lib.erl, and adapt these to your needs. That should be relatively straightforward.
Hello,
I'm trying to generate a soap fault from a yaws soap endpoint, what's the correct return from handle function ?
I'm trying with:
{error,undefined,
#'soap:Fault'{
anyAttribs = [],
faultcode = "error",
faultstring = Error
}
}
But yaws_soap_srv prints :
yaws_soap_srv(239): Srv Error: "Error processing message: {error,undefined,\n {'soap:Fault',[],"error","econnrefused",\n undefined,undefined}}"
Any idea ?
Thanks. Regards.
The text was updated successfully, but these errors were encountered: