How can I tell gSOAP to ignore certain declarations of types in a header file so I can write class methods that use parameters of these types?
You can provide the type declarations in the header file and use the ‘extern’ qualifier or enclose the type declarations between [ and ] to make them ‘transient’, i.e. non-serializable. For example: extern class ostream; // can’t be (de)serialized so must be declared a transient type class ns__foo { public: char *s; struct soap *soap; // special field: already transient ns__foo(); [ ns__foo(const char *t); // transient constructor print(ostream &s); // transient method ] }; with e.g. the following implementation of ns__foo: ns__foo::ns__foo(const char *t) { s = (char*)soap_malloc(soap, strlen(t)+1); strcpy(s, t); } The ‘struct soap* soap’ field in this class is a special field set by gSOAP’s deserializers and the gSOAP-generated soap_new_ns__foo() function.