Menu

#40 common method definitions as part struct soap in C++

open
5
2008-07-28
2008-06-24
David Rusek
No

I would like to see the struct soap object under C++ define the server side interface and provide the default implementations that are currently generated for every derived class, ie, I wand to see the following methods defined under the soap:: namespace:

virtual int soap_close_socket();
virtual int soap_senderfault();
virtual int soap_senderfault();
virtual int soap_receiverfault();
virtual int soap_receiverfault();
virtual void soap_print_fault();
virtual void soap_stream_fault();
virtual char *soap_sprint_fault();
virtual void soap_noheader();
virtual int run();)
virtual SOAP_SOCKET bind();
virtual SOAP_SOCKET accept();
virtual int serve();
virtual int dispatch();

Then, I can pass my derived services to thread pools, etc, as the base class. I would be more than happy to submit a patch if necessary.

Discussion

  • David Rusek

    David Rusek - 2008-06-24
    • summary: pure virtual methods in struct soap for C++ --> common method definitions as part struct soap in C++
     
  • David Rusek

    David Rusek - 2008-06-25

    Logged In: YES
    user_id=1319023
    Originator: YES

    EDIT:

    I would like to edit my request.

    Two abstract classes need to be defined:
    SoapServer and SoapClient
    SoapServer extends struct soap and should include:
    virtual int soap_close_socket();
    virtual int soap_senderfault();
    virtual int soap_senderfault();
    virtual int soap_receiverfault();
    virtual int soap_receiverfault();
    virtual void soap_print_fault();
    virtual void soap_stream_fault();
    virtual char *soap_sprint_fault();
    virtual void soap_noheader();
    virtual int run();)
    virtual SOAP_SOCKET bind();
    virtual SOAP_SOCKET accept();
    virtual int serve();
    virtual int dispatch();

    In addition, SoapServer needs a virtual copy constructor in the form: "virtual struct soap *clone()"

    SoapClient extends struct soap and should include:
    virtual void soap_noheader();
    virtual const SOAP_ENV__Fault *soap_fault();
    virtual const char *soap_fault_string();
    virtual const char *soap_fault_detail();
    virtual int soap_close_socket();
    virtual void soap_print_fault();
    virtual void soap_stream_fault();
    virtual char *soap_sprint_fault();

    These two abstract classes should contain definitions for any common methods

    The soapcpp2 tool should then be modified to generate the virtual copy constructor for all generated SoapServer instances in addition to having generated server and client proxy classes extend SoapServer and SoapClient respectively.

     
  • Robert van Engelen

    • assigned_to: nobody --> engelen
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.