After defining a struct in the .h ws definition file
struct ap__soapResult
{
    public:
    std::string errorMsg;
    enum ap__status state;
};

I can use it as a member in another struct, which is used as return 
parameter of a soap method.
struct ap__stwTestResult
{
    public:
    std::string msg;
    enum ap__status state;
    struct ap__soapResult ap__soapResult;
};

But if I use the same struct ap__soapResultElement directly as return 
parameter type, I'll get an invalid wsdl file.

int ap__getSystemInfo( enum ap__systemInfo, struct ap__soapResult& result);

The problem is that for a return param the wsdl definition has to be:
  <element name="soapResult">

On the other hand for a struct member in a struct we need in the wsdl:
<complexType name="soapResult">

The solution is to define 2 similar structs with 2 different names.

I think this should be documented anywhere.

Stefan

Reply via email to