Giter VIP home page Giter VIP logo

Comments (1)

vinoski avatar vinoski commented on July 19, 2024

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:

<soap:Fault>
    <faultcode>soap:Server</faultcode>
...

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):

Fault = #'soap:Fault'{
    faultcode = {qname, "http://schemas.xmlsoap.org/soap/envelope/",
                        "soap", "Server", undefined},
    faultstring = Error},
{ok, undefined, Fault, 500, undefined}

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.

from yaws.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.